Skip to content

feat(cli): implement info command for boxlite-cli#201

Merged
DorianZheng merged 3 commits intoboxlite-ai:mainfrom
shayne-snap:feat/cli_info_command
Feb 9, 2026
Merged

feat(cli): implement info command for boxlite-cli#201
DorianZheng merged 3 commits intoboxlite-ai:mainfrom
shayne-snap:feat/cli_info_command

Conversation

@shayne-snap
Copy link
Copy Markdown
Contributor

@shayne-snap shayne-snap commented Feb 4, 2026

Info

#35

Key Changes

  • Add boxlite info for system-wide runtime info
  • Add Runtime **VERSION** in boxlite.
  • Add info subcommand with --format yaml|json (default: yaml).
  • Add integration tests for info JSON/YAML output and roundtrip.
  • docs about how to use inspect,info and -p -v in README

Testing

  • make test:cli
  • make test:rust
  • manually test ./target/debug/boxlite info
./target/debug/boxlite info
version: 0.5.8
homeDir: /Users/goranka/.boxlite
virtualization: Hypervisor.framework is available (Apple Silicon)
os: macos
arch: aarch64
boxesTotal: 3
boxesRunning: 0
boxesStopped: 2
boxesConfigured: 1
imagesCount: 4
./target/debug/boxlite info --format json
{
  "version": "0.5.8",
  "homeDir": "/Users/goranka/.boxlite",
  "virtualization": "Hypervisor.framework is available (Apple Silicon)",
  "os": "macos",
  "arch": "aarch64",
  "boxesTotal": 3,
  "boxesRunning": 0,
  "boxesStopped": 2,
  "boxesConfigured": 1,
  "imagesCount": 4
}

@shayne-snap shayne-snap marked this pull request as ready for review February 4, 2026 04:31
}

/// Get system-wide runtime information.
pub async fn system_info(&self) -> BoxliteResult<SystemInfo> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @shayne-snap — nice work on the CLI command! I'm wondering though, do we need system_info on the runtime itself?

It mixes static info (version, os, arch) with runtime state. We already have list_info() for boxes — the CLI could count from that.

For images, maybe we can expose a Image manager struct in some way?

Curious what you think!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point! Thanks for reminding me this again, we should keep Runtime clean. Will move it into the CLI.

shayne-snap and others added 3 commits February 6, 2026 22:06
- Add SystemInfo type (version, home_dir, virtualization, os, arch, box counts, images_count) and BoxliteRuntime::system_info() in boxlite.
- Add `info` subcommand with --format yaml|json (default: yaml).
- Add integration tests for info JSON/YAML output and roundtrip.
… CLI

- boxlite: add VERSION constant; remove SystemInfo and home_dir() from public API
- boxlite-cli: resolve_runtime_options() + create_runtime_with_options() to avoid
  resolving config twice; info uses options.home_dir before creating runtime
- boxlite-cli: define SystemInfo locally in info.rs (CLI output shape only)
- boxlite-cli tests: assert via serde_json::Value and INFO_JSON_KEYS (no boxlite type)
- README: document boxlite info and inspect, run/create -p/-v examples

Co-authored-by: Cursor <[email protected]>
@shayne-snap shayne-snap force-pushed the feat/cli_info_command branch from 656afcc to 90c6d88 Compare February 9, 2026 07:09
Copy link
Copy Markdown
Member

@DorianZheng DorianZheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DorianZheng DorianZheng merged commit 4d37743 into boxlite-ai:main Feb 9, 2026
13 checks passed
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.

2 participants