Contributions are welcome! Here's how to get started.
git clone https://github.com/GrapeInTheTree/chiliz-cli.git
cd chiliz-cli
make build
make testcmd/chiliz/cmd/ CLI commands (one file per command)
internal/domain/ Data models and output types
internal/infra/ Infrastructure (RPC, config, explorer API)
internal/output/ Human/JSON output formatter
internal/tui/ Bubble Tea interactive UI
- Create
cmd/chiliz/cmd/<name>.go - Define a
var <name>Cmd = &cobra.Command{...}withRunE - Register in
root.goinit()viarootCmd.AddCommand(<name>Cmd) - If needed, add output type in
internal/domain/output.go - Add formatter case in
internal/output/formatter.go
- Follow existing patterns (Dial/Close for RPC, type switch for output)
- Use
fmt.Errorf("context: %w", err)for error wrapping - Keep CLI commands thin — business logic in
internal/ - Support
--jsonoutput on all commands
make test # Run all tests
make vet # Static analysis
go test -v ./internal/infra/ethereum/ # Verbose single package- Fork the repository
- Create a feature branch (
git checkout -b feat/my-feature) - Make your changes with clear commit messages
- Run
make test && make vetbefore submitting - Open a pull request against
main
feat: Add new feature
fix: Fix a bug
docs: Documentation changes
test: Add or update tests
ci: CI/CD changes
chore: Maintenance tasks