Command-line client for the Diode Console JSON-RPC API.
Use dcon to manage fleets and members from scripts, CI, or your terminal without writing raw curl calls. API keys (dck_…) are created in Console Settings; see the API documentation for full method reference.
Requires Go 1.22+.
git clone https://github.com/diodechain/dcon.git
cd dcon
go build -o dcon .Or install into your PATH:
go install github.com/diodechain/dcon@latestStore an API key locally (written to ~/.config/dcon/config.json, mode 0600):
dcon auth
dcon auth --key dck_your_key_hereAlternatively, set the environment variable (takes precedence over the config file):
export DCON_API_KEY=dck_your_key_heredcon methodsTyped subcommands with kebab-case flags:
# Create and inspect a fleet
dcon fleet create --name Production
dcon fleet info --fleet-id 550e8400-e29b-41d4-a716-446655440000
# Members
dcon fleet member list --fleet-id 550e8400-e29b-41d4-a716-446655440000 --limit 10 --offset 0
dcon fleet member add --fleet-id 550e8400-e29b-41d4-a716-446655440000 \
--address 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb --label "Device A"
dcon fleet member get --fleet-id 550e8400-e29b-41d4-a716-446655440000 --address 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb
# Batch add (comma-separated addresses or JSON members)
dcon fleet member add-batch --fleet-id 550e8400-e29b-41d4-a716-446655440000 \
--addresses 0xabc...,0xdef...
dcon fleet member add-batch --fleet-id 550e8400-e29b-41d4-a716-446655440000 \
--members-json '[{"address":"0x...","label":"A"}]'
# Rename or destroy
dcon fleet rename --fleet-id 550e8400-e29b-41d4-a716-446655440000 --name Staging
dcon fleet destroy --fleet-id 550e8400-e29b-41d4-a716-446655440000Run dcon fleet --help and dcon fleet member --help for the full command tree.
Call any JSON-RPC method with snake_case flags:
dcon api fleet.member.list \
--fleet_id 550e8400-e29b-41d4-a716-446655440000 \
--limit 10 --offset 0For nested or array parameters, pass JSON:
dcon api fleet.member.add_batch \
--fleet_id 550e8400-e29b-41d4-a716-446655440000 \
--params-json '{"members":[{"address":"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb","label":"Device A"}]}'Successful calls print pretty-printed JSON of the RPC result to stdout. Errors print the JSON-RPC error object to stderr and exit with code 1.
dcon fleet info --fleet-id <uuid> --url https://console.diode.io/api/v1/rpc| Method | dcon fleet shortcut |
|---|---|
fleet.create |
fleet create |
fleet.rename |
fleet rename |
fleet.info |
fleet info |
fleet.destroy |
fleet destroy |
fleet.member.add |
fleet member add |
fleet.member.add_batch |
fleet member add-batch |
fleet.member.list |
fleet member list |
fleet.member.get |
fleet member get |
fleet.member.remove |
fleet member remove |
fleet.member.remove_batch |
fleet member remove-batch |
New upstream methods can be used immediately via dcon api <method> … before a typed subcommand is added.
go test ./...
go build -o dcon .| Document | Description |
|---|---|
| AGENTS.md | Guide for AI coding agents |
| docs/ | Architecture, development, API sync checklist |
| docs/api-sync.md | How to update dcon when the Console API changes |