Developer CLI
appbricx is one command per developer API call. Use it from a terminal, a script, CI, or any coding agent with a shell. It needs Node.js 20 or newer and has no dependencies.
@appbricx/cli) will be published to npm soon. Until then, run it from a clone of the repository.Install from the repo
git clone https://github.com/Naveenbhargav-m/appbricx
node appbricx/packages/cli/bin/appbricx.mjs helpTo get an appbricx command on your PATH:
cd appbricx/packages/cli
npm link
appbricx versionThe examples below assume appbricx is on your PATH.
Sign in
With a token from Workspace settings → Coding agents:
appbricx login --api https://appbricx.com/api --token apx_pat_...Or with your email and password, which mints a token for you:
appbricx login --api https://appbricx.com/api --email you@example.com --password '...'
# optional: --workspace <workspace-id> (default: your first workspace)- A password login mints a token named
cli YYYY-MM-DDwithread,applyanddeployscopes. Revoke it like any other token. - Accounts with multi-factor sign-in can't use the password login. Create a token in the web app and use
--token. - Credentials are saved to
~/.config/appbricx/config.jsonwith file mode 0600.
Commands
| Command | What it does |
|---|---|
login | Save credentials (--api plus --token, or --email and --password) |
whoami | The signed-in user, scopes and workspaces |
projects | List projects |
create <name> | Create a project and link this directory to it |
link <project-id> | Link this directory to an existing project |
pull [file] | Write the project's contract to ./appbricx.json (or file) |
check [file] | Normalize and report; no changes |
apply [file] [--force] | Build the dev environment from the contract |
patch <ops.json> [--dry-run] | Apply typed edit ops from a JSON file (an array or one op) |
verify | The verify report |
query <table> [--where col=value ...] [--limit n] | Rows from the dev database (--where repeats) |
logs [--workflow id] [--limit n] | Workflow runs and notifications |
deploy [--skip-verify] [--preview] | Publish to production (or the preview environment). Runs verify first |
mcp-config | Print an .mcp.json entry for this project |
docs | Print the contract guide (markdown) |
help, version | Usage and version |
The CLI has no screenshot or component-check command. Use the MCP tools or the HTTP API for those.
A typical session
mkdir field-desk && cd field-desk
appbricx create "Field Desk" # links ./.appbricx/project.json
appbricx docs > GUIDE.md # the contract reference
# write ./appbricx.json
appbricx check
appbricx apply # prints the demo sign-ins
appbricx verify
appbricx query job --where status=open --limit 10
appbricx deployFiles
| Path | Holds |
|---|---|
~/.config/appbricx/config.json | { api, token } |
./.appbricx/project.json | The linked project |
./appbricx.json | The contract you edit |
Environment variables
These override the files. Use them in CI and agent sessions.
| Variable | Meaning |
|---|---|
APPBRICX_API | API base URL: https://appbricx.com/api |
APPBRICX_TOKEN | An access token (apx_pat_…) |
APPBRICX_PROJECT | Project id, instead of the directory link |
APPBRICX_CONFIG | Path of the config file |
export APPBRICX_API=https://appbricx.com/api
export APPBRICX_TOKEN=apx_pat_...
export APPBRICX_PROJECT=3f2c9a10-...
appbricx verifyGlobal flags
--json— print the server's raw JSON instead of the human summary. On an error, the error body is printed to stdout.--project <id>— use this project instead of the link orAPPBRICX_PROJECT.--help— usage.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | The server said no (invalid contract, red verify, missing scope, API error), or check found errors, or verify did not pass |
| 2 | Usage error (missing argument, not signed in, no linked project), or no command given |
mcp-config
Prints an MCP server entry for Claude Code's .mcp.json, pinned to the linked project (or --project). The token stays out of the file:
$ appbricx mcp-config
{
"mcpServers": {
"appbricx": {
"type": "http",
"url": "https://appbricx.com/api/mcp?project=3f2c9a10-...",
"headers": {
"Authorization": "Bearer ${APPBRICX_TOKEN}"
}
}
}
}Export APPBRICX_TOKEN in the shell that starts your agent. Cursor uses ${env:APPBRICX_TOKEN} instead; see Build with your coding agent.