-
Notifications
You must be signed in to change notification settings - Fork 3
Sandbox CLI commands #780
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestsandboxSandbox mode: isolated chain with yes_cryptoSandbox mode: isolated chain with yes_crypto
Milestone
Description
Summary
CLI interface for sandbox management: create, list, status, start, stop, destroy, add-account.
Blocked by: #779 (sandbox orchestration library)
Changes
CLI command group
- File:
src/cli/cmd_sandbox.ml - Follows Cmdliner pattern from
src/cli/cmd_rpc.ml(Cmd.group with subcommands)
Subcommands
octez-manager sandbox create --network NET [--snapshot URI] [--name NAME]
[--rpc-addr ADDR] [--max-delegates N]
octez-manager sandbox list
octez-manager sandbox status NAME
octez-manager sandbox start NAME
octez-manager sandbox stop NAME
octez-manager sandbox destroy NAME
octez-manager sandbox add-account NAME ADDRESS
- create: calls
Sandbox.createwith step-by-step progress output to stdout - list: calls
Group_registry.list_sandboxes, formats as table (name, network, node/baker status, head level) - status: calls
Sandbox.status, prints detailed info including delegates and wallet path - start/stop: delegates to
Lifecycle.start_group/stop_group - destroy: confirmation prompt (
Continue? [y/N]), thenSandbox.destroy - add-account: calls
Yes_wallet.add_account, prints result
Example output (create)
$ octez-manager sandbox create --network mainnet --snapshot ./mainnet.rolling
Creating sandbox "sandbox-mainnet"...
[1/6] Creating group "sandbox-mainnet" ✓
[2/6] Installing node (importing snapshot)... ✓ sandbox-mainnet-node
[3/6] Enabling yes_crypto environment ✓
[4/6] Starting node and waiting for RPC... ✓ head: 7,234,567
[5/6] Generating yes-wallet (20 delegates)... ✓
[6/6] Installing and starting baker ✓ sandbox-mainnet-baker
Sandbox "sandbox-mainnet" is ready!
Node RPC: http://127.0.0.1:8732
Network: mainnet (isolated, no peers)
Delegates: 20 (top by staking power)
Yes-crypto: enabled
Registration
- Register
Cmd_sandbox.sandbox_cmdinsrc/main.mlcommand group (~line 85-108) - File:
src/cli/dune— addoctez_manager_sandboxdependency
Shell completions
- Run
make completionsafter adding the new subcommands
Verification
dune build && dune fmt- All subcommands show help text (
--help) - Shell completions are up to date
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestsandboxSandbox mode: isolated chain with yes_cryptoSandbox mode: isolated chain with yes_crypto