# References

> Every command, every MCP tool and every endpoint in one place. Everything the console does is here too, so an agent never needs the browser.

## CLI commands

Every command can answer in JSON, returns plain data and uses stable exit codes: 0 done, 1 failed, 2 not allowed.

### account

| name | what it does |  |
| --- | --- | --- |
| `00b5e2 login` | Login through the browser, or with a token | --token |
| `00b5e2 logout` | End the session on this machine |  |
| `00b5e2 whoami` | Who, or which token, is logged in |  |
| `00b5e2 update` | Update the CLI to the latest version |  |
| `00b5e2 help` | List every command, or explain one |  |

### projects

| name | what it does |  |
| --- | --- | --- |
| `00b5e2 init` | Create a project from the current folder | --name |
| `00b5e2 link` | Connect this folder to an existing project | --project |
| `00b5e2 ls` | List projects and services |  |
| `00b5e2 git connect` | Deploy a GitHub repo on every push | <owner/repo> |

### services

| name | what it does |  |
| --- | --- | --- |
| `00b5e2 services add` | Add a site, API, worker, database, cron job or container; its address is reserved | --name --dir --engine --address |
| `00b5e2 services ls` | List the services of a project |  |
| `00b5e2 services rm` | Remove a service and its development data | --prod |
| `00b5e2 services open` | Open a service at its address; a database gets its own port | <service> --allow --prod |
| `00b5e2 services close` | Close a service; only its project reaches it | <service> --prod |
| `00b5e2 services link` | Give a service the variables of a database or another service | <service> <to> |

### deploys

| name | what it does |  |
| --- | --- | --- |
| `00b5e2 deploy` | Deploy to development, production or a preview | --prod --preview |
| `00b5e2 promote` | Move a development deploy to production | <deploy id> |
| `00b5e2 rollback` | Go back to a previous deploy | --prod --to |
| `00b5e2 previews ls` | List the previews of a project |  |
| `00b5e2 previews rm` | Remove a preview | <branch> |

### variables

| name | what it does |  |
| --- | --- | --- |
| `00b5e2 env set` | Set or rotate a variable, value asked for | --prod --redeploy |
| `00b5e2 env ls` | List variables, never secret values | --prod |
| `00b5e2 env rm` | Remove a variable | --prod |
| `00b5e2 env import` | Import variables from a .env file | --prod |

### databases

| name | what it does |  |
| --- | --- | --- |
| `00b5e2 db create` | Create a Postgres database. MySQL and Valkey coming next | --engine --name --prod |
| `00b5e2 db connect` | Open a tunnel from your machine | --port --prod |
| `00b5e2 db shell` | Open a database shell | --prod |
| `00b5e2 db backups ls` | List the nightly backups by date | --prod |
| `00b5e2 db backups create` | Take a backup now | --prod |
| `00b5e2 db restore` | Restore a database to a date | --date --into --prod |

### cron jobs

| name | what it does |  |
| --- | --- | --- |
| `00b5e2 cron add` | Add or change a cron job | --schedule --command --prod |
| `00b5e2 cron ls` | List cron jobs and their last run | --prod |
| `00b5e2 cron run` | Start a run now | <name> |
| `00b5e2 cron rm` | Remove a cron job | --prod |

### domains

| name | what it does |  |
| --- | --- | --- |
| `00b5e2 domains add` | Add a domain to an open service (main site by default) and get its records | <domain> --service |
| `00b5e2 domains verify` | Check the records and issue HTTPS | <domain> |
| `00b5e2 domains ls` | List domains and their state |  |
| `00b5e2 domains rm` | Remove a domain | <domain> |

### network

| name | what it does |  |
| --- | --- | --- |
| `00b5e2 network allow` | Let one project reach another of the organisation | --to |
| `00b5e2 network ls` | List the allowed paths |  |

### logs and metrics

| name | what it does |  |
| --- | --- | --- |
| `00b5e2 logs` | Read or follow logs | --prod --since --follow --level --grep --run |
| `00b5e2 metrics` | Requests, latency, cpu, memory and disk | --prod --since |
| `00b5e2 alerts add` | Alert when a metric crosses a value | --metric --above --for |
| `00b5e2 alerts ls` | List alerts |  |
| `00b5e2 alerts rm` | Remove an alert | <id> |

### agents

| name | what it does |  |
| --- | --- | --- |
| `00b5e2 tokens create` | Create a scoped token, shown once | --scope --project --expires |
| `00b5e2 tokens ls` | List tokens and their scopes |  |
| `00b5e2 tokens revoke` | Revoke a token at once | <name> |
| `00b5e2 audit` | What each token and person did | --token --since |
| `00b5e2 mcp` | Run the MCP server locally |  |

### organisation

| name | what it does |  |
| --- | --- | --- |
| `00b5e2 members ls` | List members and their roles |  |
| `00b5e2 members invite` | Invite someone to the organisation or a project | --role --project |
| `00b5e2 members rm` | Remove a member and free the seat | <name> |
| `00b5e2 usage` | Seats and cubes of the organisation |  |

## MCP tools

The MCP server at https://mcp.00b5e2.com (or 00b5e2 mcp) exposes the same actions as tools. Each one checks the scopes of the token, and anything in production also needs deploy:prod.

### projects

| name | what it does |  |
| --- | --- | --- |
| `list_projects` | Projects and their services | read |
| `create_project` | Create a project from a repo | deploy |

### services

| name | what it does |  |
| --- | --- | --- |
| `list_services` | Services of a project, with kind, status, address and open or closed | read |
| `add_service` | Add a site, API, worker, database, cron job or container (optional address name) | deploy |
| `remove_service` | Remove a service and its development data | deploy |
| `open_service` | Open a service at its address (a database on its own port, with TLS and defences) | deploy |
| `close_service` | Close a service again | deploy |
| `link_service` | Give a service the variables of another | deploy |

### deploys

| name | what it does |  |
| --- | --- | --- |
| `deploy` | Deploy to development, production or a preview | deploy |
| `get_deployment` | Status, build log and address of a deploy | read |
| `promote` | Move a development deploy to production | deploy:prod |
| `rollback` | Go back to a previous deploy | deploy |

### previews

| name | what it does |  |
| --- | --- | --- |
| `list_previews` | Previews with branch, commit and address | read |
| `delete_preview` | Remove a preview | deploy |

### variables

| name | what it does |  |
| --- | --- | --- |
| `list_variables` | Names, environment and date, no secret values | read |
| `get_variable` | Value of a variable that isn't secret | env |
| `set_variable` | Set or rotate a variable, never read a secret | env |
| `delete_variable` | Remove a variable from one environment | env |

### databases

| name | what it does |  |
| --- | --- | --- |
| `create_database` | Create a Postgres database. MySQL and Valkey coming next | db |
| `list_backups` | Nightly backups of a database, by date | read |
| `restore_database` | Restore a database to a date | db |

### cron jobs

| name | what it does |  |
| --- | --- | --- |
| `add_cron` | Add or change a cron job | deploy |
| `run_cron` | Start a run now | deploy |
| `list_cron_runs` | Recent runs with result, duration and log | read |

### domains

| name | what it does |  |
| --- | --- | --- |
| `list_domains` | Domains and their state | read |
| `add_domain` | Add a domain and get its records | domains |
| `verify_domain` | Check the records and issue HTTPS | domains |

### logs and metrics

| name | what it does |  |
| --- | --- | --- |
| `get_logs` | Recent or live logs | logs:read |
| `get_metrics` | Metrics for a window of time | logs:read |

### organisation

| name | what it does |  |
| --- | --- | --- |
| `get_usage` | Seats and cubes | read |
| `list_members` | Members and their roles | read |
| `list_tokens` | Tokens and their scopes | read |
| `get_audit` | What each token and person did | read |

## API

The CLI and the MCP server both use the same HTTP API. Send the token as a bearer token; every response is JSON.

api.00b5e2.com:

```
$ curl -H "Authorization: Bearer $TOKEN" https://api.00b5e2.com/v1/projects
[{"name":"my-site","services":9,"env":"production"}]
```

> Base URL https://api.00b5e2.com/v1. Errors come back with an HTTP status and a code, never as HTML.

## Markdown versions

Every page exists as Markdown for agents and LLMs. Add .md to the address, or ask for text/markdown.

| address | returns |
| --- | --- |
| `docs.00b5e2.com/page.md` | this page, in Markdown |
| `00b5e2.com/.md` | the home page, in Markdown |
| `/llms.txt` | an index of every page |
| `/llms-full.txt` | every page in one file |
| `Accept: text/markdown` | Markdown from any address |

Previous: [Isolation](https://docs.00b5e2.com/isolation.md)
Next: [FAQ](https://docs.00b5e2.com/faq.md)
