-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Summary
Provide a CLI tool for using BoxLite without writing code, offering a familiar Docker/Podman-like experience.
Motivation
- Quick testing without writing code
- Shell scripting and automation
- Familiar UX for Docker/Podman users
- Debugging and development
- Demo and evaluation
Proposed Commands
Run (create + start + exec + rm)
# Run command and exit
boxlite run alpine:latest -- echo "Hello from BoxLite"
# Interactive shell
boxlite run -it python:slim
# With options
boxlite run --cpus 2 --memory 1024 -e FOO=bar alpine:latest -- shBox Lifecycle
# Create without starting
boxlite create --name mybox alpine:latest
# Start/stop/restart
boxlite start mybox
boxlite stop mybox
boxlite restart mybox
# Remove
boxlite rm mybox
boxlite rm -f mybox # force remove running boxInspect and Monitor
# List boxes
boxlite ls
boxlite ls -a # include stopped
# Inspect details
boxlite inspect mybox
boxlite inspect --format '{{.State}}' mybox
# Logs
boxlite logs mybox
boxlite logs -f mybox # follow
# Metrics
boxlite stats myboxExecute in Running Box
boxlite exec mybox -- python script.py
boxlite exec -it mybox -- /bin/shImages
boxlite pull python:slim
boxlite images
boxlite rmi python:slimSystem
boxlite info # Runtime info
boxlite system prune # Cleanup unused resourcesOutput Formats
boxlite ls --format json
boxlite ls --format table # default
boxlite inspect mybox --format yamlImplementation Notes
- Use
clapfor argument parsing - Reuse existing BoxliteRuntime
- Consider
boxlitebinary name (orbxfor short?) - Support both sync and async operations
Tasks
- Design CLI structure with clap
- Implement
runcommand - Implement
create/start/stop/rmcommands - Implement
execcommand with TTY support - Implement
ls/inspect/logscommands - Implement
pull/imagescommands - Add output format options (json, table, yaml)
- Write documentation
- Add shell completions (bash, zsh, fish)
Metadata
Metadata
Assignees
Labels
No labels