Commit cb0fede
Add package manager with trance.json manifest support to CLI (#15)
* Initial plan
* Initial planning for HypnoScript package manager implementation
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
* Implement package manager with trance.json manifest support
- Add package.rs module with PackageManager implementation
- Support trance.json manifest (ritualName, mantra, anchors, etc.)
- Support trance-lock.json for dependency locking
- Add CLI commands: init, install, add, remove, list, validate, run-suggestion
- Include CLI and library project templates
- Add comprehensive tests for package manager functionality
- Update README with package manager documentation
- Add PACKAGE_MANAGER.md with detailed usage guide
- Include example trance.json file
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
* Add implementation summary for package manager
- Document all implemented features
- Include usage examples
- List code quality metrics
- Describe architecture and design decisions
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
* Rename 'run-suggestion' to 'run' and 'run' to 'exec'
- Rename file execution command from 'run' to 'exec' (with 'execute' alias)
- Rename script execution command from 'run-suggestion' to 'run'
- Update all documentation (README.md, PACKAGE_MANAGER.md)
- Update templates to use 'hypnoscript exec' for file execution
- Update example trance.json file
- All tests passing (207 total)
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
* Add 'hyp' as a short alias for 'hypnoscript' command
- Added [[bin]] sections in Cargo.toml to create both binaries
- Both 'hypnoscript' and 'hyp' are now available and identical
- Updated README.md to document the alias
- Updated PACKAGE_MANAGER.md to mention both forms
- All tests passing (207 total)
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
* Address 12 code review comments from PR reviewer
1. Fix version validation to use semver::VersionReq::parse() for all version specs
2. Update README examples to show correct `add` command syntax with --version flag
3. Change basic template entry point from src/main.hyp to src/lib.hyp for consistency
4. Extract hardcoded default version to constant DEFAULT_PACKAGE_VERSION
5. Update IMPLEMENTATION_SUMMARY docs: run-suggestion -> run, hypnoscript run -> exec
6. Translate German text to English in README (multiple locations)
7. Remove excessive blank lines in README
8. Change "Tests & Qualitätssicherung" to "Tests & Quality Assurance"
All tests passing, clippy clean, version validation improved.
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
* Implement actual command execution for 'run' command
- Parse suggestion command string and execute using std::process::Command
- Commands now execute immediately instead of just displaying what would run
- Inherit stdin/stdout/stderr for interactive commands
- Proper error handling for command failures and missing executables
- Exit codes properly propagated from executed commands
Example: 'hypnoscript run test' now actually executes the test command
defined in trance.json suggestions instead of just showing it.
All tests passing, clippy clean.
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
* Fix command syntax in IMPLEMENTATION_SUMMARY documentation
Changed 'hypnoscript add pkg@^1.0.0' to correct syntax:
'hypnoscript add pkg --version "^1.0.0"'
The CLI expects --version flag, not @ syntax.
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
* Fix command parsing and README formatting issues
1. Replace split_whitespace() with shlex for proper shell argument parsing
- Now correctly handles quoted arguments with spaces
- Fixes: echo "Hello World" now works as expected
- Added shlex 1.3 dependency
2. Remove excessive blank lines in README
- Fixed bash code block formatting
- Fixed list items formatting
- Fixed JSON example formatting
All tests passing, clippy clean.
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
* Fix documentation issues
1. Remove excessive blank lines from README.md package manager section
2. Remove script execution from future enhancements in PACKAGE_MANAGER.md
(already implemented in commit 7)
3. Remove script execution from future enhancements in IMPLEMENTATION_SUMMARY
(already implemented in commit 7)
4. Update package.rs line count from 621 to 654 lines
All tests passing, clippy clean.
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>1 parent 3954250 commit cb0fede
8 files changed
Lines changed: 1399 additions & 11 deletions
File tree
- examples
- hypnoscript-cli
- src
- hypnoscript-compiler
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
0 commit comments