Commit graph

5 commits

Author SHA1 Message Date
Marco Allegretti
f1c6e55e09 cli: add pin command
Add a new 'pin' subcommand to rewrite base.image to an explicit URL.

Extend build and rebuild with --locked, --offline, and --require-pinned-image,
and wire flags into the core engine build options.
2026-02-23 18:29:46 +01:00
Marco Allegretti
32296bd75a Fix clippy warnings in new command
Refactor the 'karapace new' implementation to satisfy clippy -D warnings.

Adjust path handling, defaults, and string assignment to avoid pedantic lints.
2026-02-23 12:42:00 +01:00
Marco Allegretti
8e90f45efc Add new and tui CLI commands
Add 'karapace new' to generate a manifest from templates or prompts.

Add 'karapace tui' to launch the terminal UI.

Improve env-id resolution errors in non-JSON output with suggestions.

Add dialoguer and toml as CLI dependencies.
2026-02-23 12:15:39 +01:00
Marco Allegretti
fd7313a318 fix CI: skip prereq check for mock backend, add bash to opensuse
- Add KARAPACE_SKIP_PREREQS=1 env var check to skip runtime prerequisite
  checks (user namespaces, fuse-overlayfs) when testing with mock backend
- Set KARAPACE_SKIP_PREREQS=1 in CLI integration test helper
- Add bash to opensuse/tumbleweed container deps (required by
  dtolnay/rust-toolchain action)
2026-02-22 19:56:47 +01:00
Marco Allegretti
1416b0fc99 feat: karapace-cli — 23 commands, thin dispatcher, progress indicators
- 23 commands, each in its own module under commands/
- Thin main.rs dispatcher with clap subcommand routing
- Progress spinners (indicatif) and colored state output (console)
- Environment resolution by env_id, short_id, name, or prefix
- Structured JSON output (--json) on all query commands
- --verbose/-v for debug, --trace for trace-level logging
- KARAPACE_LOG env var for fine-grained log control
- Exit codes: 0 success, 1 failure, 2 manifest error, 3 store error
- Prerequisite check before runtime operations
- Shell completions (bash/zsh/fish/elvish/powershell) and man page generation
2026-02-22 18:37:54 +01:00