Skip to content

refactor(voidbox): split CLI into modules and add snapshot subcommands#29

Merged
cspinetta merged 4 commits intomainfrom
feat/voidbox-cli-modular-snapshot
Mar 23, 2026
Merged

refactor(voidbox): split CLI into modules and add snapshot subcommands#29
cspinetta merged 4 commits intomainfrom
feat/voidbox-cli-modular-snapshot

Conversation

@cspinetta
Copy link
Collaborator

Description

Refactors the voidbox binary from a single voidbox.rs into a src/bin/voidbox/ module tree for maintainability. Adds clap-based CLI structure, merged config at setting level (VOIDBOX_*, YAML, --*), voidbox snapshot subcommands (create / list / delete) with KVM and VZ paths, and extends snapshot_store with VOIDBOX_HOME and helpers to list/delete snapshots under a configurable base. Updates README, AGENTS, CONTRIBUTING, static site docs, and nfpm packaging metadata.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Related Issues

Fixes #
Related to #

Changes Made

  • Split voidbox entrypoint into src/bin/voidbox/{main,backend,banner,cli_config,output,snapshot}.rs and point [[bin]] at main.rs.
  • Add clap-based CLI and centralized CLI config merge (cli_config.rs).
  • Implement voidbox snapshot create/list/delete; platform-specific create for Linux (KVM) vs macOS (VZ).
  • Extend snapshot_store: VOIDBOX_HOME default base, list_snapshots_in / delete_snapshot_in, Display for SnapshotType.
  • Refresh user/agent/contributing docs and site HTML; extend nfpm.yaml.

Testing

  • All existing tests pass (cargo test --workspace)
  • Added new tests for the changes
  • Tested manually with mock sandbox
  • Tested manually with KVM sandbox (if applicable)
  • Tested manually with VZ VM sandbox (if applicable)
  • Verified examples still work

Test Commands Run

./target/release/voidbox config init
./target/release/voidbox config validate
./target/release/voidbox serve

And many more

Documentation

  • Updated inline code documentation
  • Updated README.md (if user-facing changes)
  • Updated CHANGELOG.md
  • Added/updated examples (if applicable)

Code Quality

  • Code follows project style guidelines (cargo fmt)
  • No clippy warnings (cargo clippy --workspace --all-targets)
  • Documentation builds without warnings (cargo doc --no-deps)
  • All files have appropriate licensing headers (if applicable)

Screenshots (if applicable)

❯ ./target/release/voidbox --help
Composable workflow sandbox with KVM micro-VMs and native observability

Usage: voidbox [OPTIONS] <COMMAND>

Commands:
  run       Run a spec file (local, in-process)
  exec      Execute a command in a sandbox (legacy, deprecated)
  validate  Validate a spec file without running it
  inspect   Inspect a spec file: validate and show resolved configuration
  skills    List skills defined in a spec file
  status    Query run status from the daemon (remote only)
  logs      Fetch run logs from the daemon (remote only)
  tui       Interactive TUI (connects to daemon)
  snapshot  Manage VM snapshots
  config    Manage CLI configuration
  version   Print version information
  serve     Internal HTTP daemon (future `voidboxd`)
  help      Print this message or the help of the given subcommand(s)

Options:
      --output <OUTPUT>        Output format: human (default) or json [default: human]
      --no-banner              Suppress the ASCII startup banner
      --log-level <LOG_LEVEL>  Override log level (trace, debug, info, warn, error) [env: VOIDBOX_LOG_LEVEL=]
  -h, --help                   Print help
  -V, --version                Print version

Checklist

  • My code follows the project's coding standards
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Notes

My tests were focused on local executions (no daemon) on Mac. Looking for a manual test on Linux before merging.

@cspinetta cspinetta marked this pull request as ready for review March 22, 2026 22:57
@cspinetta cspinetta merged commit f2f0444 into main Mar 23, 2026
18 checks passed
@cspinetta cspinetta deleted the feat/voidbox-cli-modular-snapshot branch March 23, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant