> ## Documentation Index
> Fetch the complete documentation index at: https://docs.camposcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Campos Cloud CLI

> Install the campos command and manage your applications, databases, and teams from a terminal.

## Install and sign in

Use Node.js 22.12 or later with npm. Run the same install command when you want to update.

```sh theme={null}
npm install -g @camposcloud/cli@latest
campos --version
campos login
campos whoami
```

The login command opens the browser to authorize your terminal. On a remote machine, run `campos login --no-browser` and open the address it prints on a device with a browser. Run `campos` on its own to open the terminal dashboard.

## Deploy from a project folder

Open a terminal in your project folder and run `campos create`. The CLI asks for the application settings, uploads the project, and links the folder to your new application. If the application already exists, run `campos link` in the folder to select it.

```sh theme={null}
campos create
campos logs -f
```

After changing your code, run `campos deploy` from the linked folder to upload the updated project and restart the application. See the [application deployment guide](https://docs.camposcloud.com/guides/deploying-an-application.md) for runtime and configuration details.

## Manage an application

The examples below use the application linked to the current folder. Run `campos apps` to see the applications available to the active team.

| Task | Command |
| - | - |
| Check metrics for the last seven days | `campos metrics --hours 7d` |
| List GitHub deployments | `campos deploys` |
| Read the log for deployment number 3 | `campos deploys log 3` |
| Deploy the latest GitHub commit again | `campos redeploy` |
| Restore the previous deployment when available | `campos rollback` |
| List supported runtimes | `campos runtime` |
| Check custom domain status | `campos domain` |
| Create a folder in the application | `campos files new assets --dir` |
| Rename a file in the application | `campos files mv old.txt new.txt` |

GitHub deployment commands apply to applications connected to a GitHub repository.

## Work with databases and teams

* Run `campos db create` to choose the database engine and settings. Save the generated password when it appears.
* Run `campos db stats my-db` to see usage and `campos db logs my-db -f` to follow the console. Replace `my-db` with your database name.
* Run `campos db delete my-db` to permanently remove a database and its data. In an interactive terminal, the CLI asks you to type the name before deleting it.
* Run `campos teams` to list your teams and `campos team use` to select one. Use `campos --team my-team apps` to select a team for a single command.
* Run `campos plan` to check plan usage and renewal, or `campos plan --open` to open the account page.

Run `campos --help` for the full command list, or `campos db create --help` for the options of an individual command.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.