Skip to main content
The cowboy CLI keeps its settings in ~/.cowboy/config.json, outside every project. You rarely edit the file: cowboy env use and cowboy env add write it.

How the CLI picks a network

The first of these that is set wins:
  1. The --env flag.
  2. The COWBOY_ENV environment variable.
  3. The environment saved for this project.
  4. active.
  5. local.
--rpc-url and then COWBOY_RPC_URL override the endpoint of whichever environment that selects. cowboy env current shows the result for the folder you’re in.

How the CLI picks a key

The first of these that is set wins:
  1. The --private-key flag, which takes a file path.
  2. The COWBOY_PRIVATE_KEY_FILE environment variable.
  3. The COWBOY_PRIVATE_KEY environment variable.
  4. The key recorded when this project’s actor was deployed.
  5. The selected environment’s key.
cowboy wallet create writes ~/.cowboy/keys/default. Key discovery has the details.

Next