> For the complete documentation index, see [llms.txt](https://docs.baas.sh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.baas.sh/baas-cli/reference.md).

# Command reference

Every BaaS command and its options.

New here? Start with the [Quickstart](/baas-cli/quickstart.md).

| Command                         | Description                                                                |
| ------------------------------- | -------------------------------------------------------------------------- |
| `baas login`                    | Sign in through your browser.                                              |
| `baas logout`                   | Sign out and delete the saved credentials.                                 |
| `baas projects:list`            | List the projects you can access.                                          |
| `baas use [project-id]`         | Select the active project, or show the current one.                        |
| `baas keys:list`                | List the keys of the active project, with the networks they are set up on. |
| `baas deploy [contract]`        | Deploy with a key from your Vault and register with BaaS.                  |
| `baas deploy create <contract>` | Deploy with `forge create` and register with BaaS.                         |
| `baas deploy script <script>`   | Run a Foundry script and register what it deployed.                        |
| `baas --version`                | Print the CLI and Forge versions.                                          |
| `baas <anything else>`          | Run it with `forge`, unchanged.                                            |

## `baas deploy`

```bash
baas deploy [contract] [--key <id>] [--chain <chainId>] [--mapping <file>] [--unit <file>] [--constructor-args <values...>]
```

| Argument or option               | Description                                                                                                                                   |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `[contract]`                     | `src/Token.sol`, `src/Token.sol:Name`, or `Name`. Omit it to pick from a list.                                                                |
| `--key <id>`                     | The key to deploy with: its id, the name you gave it. Omit it to pick from a list.                                                            |
| `--chain <chainId>`              | The chain id of the network to deploy to, among the ones the key is set up on (`--chain-id` is the same option). Omit it to pick from a list. |
| `--mapping <file>`               | Mapping configuration to use instead of `<Name>.mapping` beside the source.                                                                   |
| `--unit <file>`                  | Unit configuration to use instead of `<Name>.unit` beside the source.                                                                         |
| `--constructor-args <values...>` | Constructor values, in order. Must come last.                                                                                                 |

In a terminal, the CLI always shows a summary and asks for confirmation. Without one, in CI for example, give it the contract, the key, the network, and any constructor arguments, and it deploys without asking.

## `baas deploy create`

```bash
baas deploy create <contract> [forge-create-options] [--mapping <file>] [--unit <file>] [--constructor-args <values...>]
```

The contract comes first, Forge's options follow, and `--constructor-args` comes last. Set the RPC URL with `--rpc-url` or `eth_rpc_url` in `foundry.toml`: it's the network BaaS registers on. `--mapping` and `--unit` work as with `baas deploy`.

## `baas deploy script`

```bash
baas deploy script <script> [forge-script-options]
```

The script comes first, Forge's options follow. Every contract the script creates is registered by name, with the mapping and unit files beside its source. `--mapping` and `--unit` aren't accepted.

Both commands respect your `foundry.toml`.

## Next

* [Configuration](/baas-cli/reference/configuration.md): update or remove the CLI, credentials, private keys.
* [Troubleshooting](/baas-cli/troubleshooting.md) when a command doesn't go through.
