Skip to main content

Vision

The Cowboy CLI (cowboy) is the primary tool for developers building on the Cowboy blockchain. It handles project scaffolding, wallet management, actor development, token operations, data feeds, and deployment — all from a single binary. Design principles:
  • Zero-config startcowboy init local creates a ready-to-code project with a funded wallet in one command.
  • Convention over configuration — Keys live in .cowboy/, actors live in actors/, and the CLI finds them automatically.
  • Explicit over magic — Every command shows what it does. No hidden state, no surprise network calls.
  • Network-aware — Commands target local or dev. The network choice affects defaults (RPC URL, faucet, chain ID).

Command Overview

CommandPurpose
cowboy versionPrint CLI version
cowboy init <network>Scaffold a project, generate wallet, fund via faucet
cowboy statusShow network status (height, mempool, sync, basefee)
cowboy walletCreate and manage secp256k1 wallets (create, address, balance, upgrade, mnemonic)
cowboy accountQuery account info (balance, nonce, info)
cowboy actor new <name>Scaffold a new actor from a template
cowboy actor deployDeploy an actor and atomically invoke its init handler
cowboy actor executeCall an actor handler
cowboy actor getQuery actor state
cowboy actor addressCompute actor address without deploying
cowboy actor logsFetch actor event log
cowboy upgrade-actorUpgrade an actor’s code (system deployers only)
cowboy fund-actorFund an actor’s balance so it can pay gas
cowboy entitlementGrant scoped permissions between actors / accounts
cowboy volumeCIP-9 volume operations (mount, cat, info)
cowboy transferTransfer CBY between accounts
cowboy transactionSubmit and query transactions (submit, get, status)
cowboy blockQuery blocks (by-height, by-hash, latest)
cowboy queryBulk queries (blocks, transactions)
cowboy runnerRunner operations (get, list, register)
cowboy jobOff-chain compute jobs (get, status, runners, results, verified, submit)
cowboy tokenCIP-20 token operations (create, transfer, approve, mint, burn, freeze, unfreeze, info, balance, list)
cowboy watchtowerData feed operations (init, new feed, publish, subscribers, list, feeds)
All commands that need a private key or RPC URL use auto-discovery.

Project Structure

After cowboy init local (and optionally cowboy init dev), the project looks like this:
my-project/
├── .cowboy/
│   ├── keys/
│   │   ├── local              # secp256k1 private key (PEM format, 0600)
│   │   └── dev                # only present after `cowboy init dev`
│   └── config.json            # Environments, active network, watchtower registry
└── actors/                    # Created by `cowboy actor new <name>`
    └── hello/
        └── main.py

Key conventions

  • .cowboy/keys/<network> — Per-environment secp256k1 private key (PEM). Never overwritten by re-running cowboy init.
  • .cowboy/config.json{ "active": "<network>", "environments": { ... } }. Each environment stores rpc_url, key_file, optional watchtower_registry and optional identity.
  • actors/ — Each subdirectory is one actor. Created on demand by cowboy actor new <name>; not part of cowboy init.

Networks

NetworkDefault RPC URLFaucet
localhttp://localhost:4000Built-in (POST /faucet)
devhttps://rpc.mesa.cowboylabs.netBuilt-in (POST /faucet)
summitNot yet available (mainnet, TBD)

Zero-Config Workflow

After running cowboy init local, all commands work without any flags:
# Deploy an actor and call its init() handler atomically in one transaction.
cowboy actor deploy --code actors/hello/main.py    # key + rpc auto-discovered

cowboy actor execute --actor 0x... --handler inc --payload 0x  # same
cowboy transfer --to 0x... --amount 100            # same
cowboy wallet balance                              # same
Explicit --private-key and --rpc-url flags still work and take priority. See individual spec files for detailed behavior: