Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 135 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ version = "0.7.7"

[workspace.dependencies]
anyhow = "1.0"
anstyle = "1.0"
clap = { version = "4.5", features = ["derive"] }
clap_complete = "4.5"
ed25519-dalek = "2.2"
hex = "0.4"
indicatif = "0.18"
semver = { version = "1.0", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ cargo run -p crosspack-cli -- --registry-root /path/to/registry install ripgrep
| `init-shell [--shell <bash\|zsh\|fish\|powershell>]` | Print shell setup snippet that adds Crosspack bin directory to `PATH` and loads Crosspack/package completion scripts. |

Output contract notes:
- Human-facing lifecycle commands automatically use rich status badges on interactive terminals.
- Human-facing lifecycle commands automatically use an enhanced interactive terminal presentation on TTYs (section framing, semantic color, and progress indicators).
- Non-interactive usage (for example pipes/redirects) stays plain and deterministic.
- Machine-oriented lines remain unchanged, including dry-run `transaction_preview` / `transaction_summary` / `risk_flags` / `change_*` records and `update summary: updated=<n> up-to-date=<n> failed=<n>`.

Expand Down
2 changes: 2 additions & 0 deletions crates/crosspack-cli/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- `src/main.rs`: defines `Cli`, `Commands`, `RegistryCommands`, and all dispatch logic in `main()`.
- `main()` match arms are integration boundaries; keep orchestration here and domain behavior in library crates.
- Shared output helpers (`resolve_output_style`, `render_status_line`, `format_*`) are contract code, not cosmetic glue.
- Renderer boundaries (`TerminalRenderer`, section/status/progress helpers, `format_*`) are contract code, not cosmetic glue.
- Transaction orchestration entrypoints (`execute_with_transaction`, `ensure_no_active_transaction_for`, rollback/repair paths) must remain centralized for consistent preflight and recovery behavior.
- Completion entrypoints (`Completions`, `InitShell`, completion sync helpers) are part of runtime UX and post-install maintenance.

Expand All @@ -27,6 +28,7 @@
- Dry-run transaction preview lines are contract-critical keys: `transaction_preview`, `transaction_summary`, `risk_flags`, `change_add`, `change_remove`, `change_replace`, `change_transition`.
- Keep ordering stable in machine-oriented output (summary before change lines; deterministic sort where already applied).
- Keep update and registry formatters centralized; do not inline ad hoc `println!` variants that drift wording or field order.
- Keep interactive enhancements additive (section headers/progress framing); plain mode remains the compatibility surface.
- Error/guidance messages tied to trust/snapshot flows should remain explicit and actionable; do not replace with vague failures.

## ANTI-PATTERNS (CLI)
Expand Down
2 changes: 2 additions & 0 deletions crates/crosspack-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ path = "src/main.rs"

[dependencies]
anyhow.workspace = true
anstyle.workspace = true
clap.workspace = true
clap_complete.workspace = true
crosspack-core = { path = "../crosspack-core" }
crosspack-installer = { path = "../crosspack-installer" }
crosspack-registry = { path = "../crosspack-registry" }
crosspack-resolver = { path = "../crosspack-resolver" }
crosspack-security = { path = "../crosspack-security" }
indicatif.workspace = true
semver.workspace = true
serde_json.workspace = true

Expand Down
Loading