Standardize the command line architecture for better help text formatting and nested subcommands by organizing commands into logical groups.
- Project already uses spf13/cobra v1.7.0
- 38 command files in
internal/cmd/ - Commands are flat (no grouping)
debug- Debug a failed Soroban transactionexplain- Summarize why a transaction failed in plain Englishtrace- Display execution trace with interactive navigationauth-debug- Debug multi-signature and threshold-based authorization failures
dry-run- Pre-submission dry run to estimate transaction costfuzz- Fuzz test XDR inputs against Soroban contractsregression-test- Run protocol regression tests against historic transactionsgenerate-test- Generate regression tests from a transactioncompare- Compare replay: local WASM vs on-chain WASM side-by-side
session- Manage debugging sessions (list, save, load, delete)cache- Manage transaction and simulation cache (status, clear, prune)search- Search saved sessions by criteria
init- Scaffold a local Erst debugging workspacedoctor- Diagnose development environment setupshell- Interactive REPL for contract testingdaemon- Start JSON-RPC server for remote debuggingwizard- Interactive setup wizard
xdr- Decode and inspect XDR data structuresabi- Decompile and display a Soroban contract ABIversion- Display version informationcompletion- Generate completion script for your shellupgrade- Upgrade contract codeexport- Export data from the current sessionreport- Generate detailed analysis reportsprofile- Export trace as pprof profile for gas-to-function mappingstats- Display statistics about sessions and cacherpc- RPC client utilities
- [OK] Add command groups to root.go
- [OK] Update debug.go to use GroupID
- Update remaining commands to assign GroupID
- Test help output formatting
- Update documentation
- Better discoverability of commands
- Logical organization in help text
- Easier for new users to find relevant commands
- Maintains backward compatibility (all commands still work the same)
# Test help output
erst --help
# Test individual command groups
erst debug --help
erst session --help
erst cache --help