# The command line tool (oneend)

Like the Supabase CLI or the Vercel CLI, this tool works with the platform from a terminal and from CI. It calls /api/v1 with the same token.

```
npm install -g oneend        or npx oneend <command>
oneend login                 paste a token made under Account, then API · MCP tokens, in the console
oneend link                  links this folder to a project (.oneend/project.json)
```

```
oneend projects list|create        oneend status
oneend env ls|pull|push|set|rm     oneend deploy [--branch --commit | --dir --prod --prebuilt]
oneend deployments ls|inspect      oneend logs [--follow]     oneend rollback <id>
oneend functions ls|deploy|rm|invoke|download
oneend migration new|list|repair   oneend db push|pull
oneend gen types typescript
oneend branches list|create|merge|reset|delete
```

- The token is saved in `~/.config/oneend/config.json`, readable only by you (0600). In CI, use the `ONEEND_TOKEN` environment variable.
- Migration files are `oneend/migrations/<version>_<name>.sql`, and `db push` calls `apply_migrations` from blackwall://migrations.
- Add `--json` and every command answers with one block of JSON. On failure it returns a non-zero exit code.
- `deploy` shows the log until the build finishes, and exits with code 1 if it fails.
- With no repository, or with `--dir` or `--upload`, `deploy` packs the folder, uploads it and runs the same build (it follows `.gitignore` and `.oneendignore` and leaves out `node_modules` and `.git`). `--prebuilt` serves it as it is without building, and `--prod` deploys to production.

---

https://end.blackall.ai/docs/cli?lang=en
