Appbricx
Docs
FeaturesPricingStart free

Get started

OverviewWhat Appbricx isQuickstart with a coding agentQuickstart with the builderCore concepts

Guides

Data and tablesAccess and rolesBusiness rulesSign-inCustom screensRealtime and topicsWorkflows, schedules and webhooksServer functionsAI in your appPaymentsFilesMessagesIntegrationsVerifyPublishing, domains and rollbackOperating your appExport and self-hostSelf-host install

Tutorials

Build a booking app with Claude CodeMulti-user todo listClient portalSlack on new sign-upTemplates

Reference

Reference homeFrontend SDKHTTP APIMCP toolsCLIIntegrations catalogContract formatAI key resolutionRun Appbricx locally

CLI

appbricx 0.1.0: one command per developer-API verb, for your terminal, scripts, CI and coding agents with a shell. Exit code 0 is success, 1 means the server said no (an invalid contract, a red verify), 2 is a usage error.

24 commandsReference homeGuide: Build and deploy from your terminal

On this page
  1. Install and sign in
  2. Global flags and env
  3. Setup
  4. login
  5. logout
  6. whoami
  7. projects
  8. create
  9. link
  10. Contract
  11. pull
  12. check
  13. apply
  14. patch
  15. Runtime
  16. verify
  17. query
  18. logs
  19. deploy
  20. Operate the running app
  21. sql
  22. rows
  23. schema
  24. snapshots
  25. deploys
  26. run
  27. tail
  28. secrets
  29. Agents
  30. mcp-config
  31. docs

Install and sign in

The CLI lives in cli/ of the public appbricx-examples repository (it isn't published to npm yet). It signs in through your browser by default and keeps its state in ~/.config/appbricx/config.json; a directory is linked to a project through .appbricx/project.json and the contract you edit is ./appbricx.json.

Shell
git clone https://github.com/Naveenbhargav-m/appbricx-examples
alias appbricx="node $PWD/appbricx-examples/cli/bin/appbricx.mjs"
appbricx login
appbricx create "Tablefor"
appbricx pull && $EDITOR appbricx.json
appbricx check && appbricx apply && appbricx verify
appbricx deploy --subdomain tablefor

Global flags and env

Flag or variableWhat it does
--jsonPrint the server's raw JSON instead of the human summary (errors too).
--projectUse this project id instead of the directory's link (.appbricx/project.json).
--helpPrint the usage text.
APPBRICX_APIThe API base URL (default https://appbricx.com/api; self-hosted: your own). Overrides the saved config.
APPBRICX_TOKENA token to use instead of the saved sign-in: what CI and coding agents set.
APPBRICX_PROJECTThe project id, instead of the directory's link.
APPBRICX_CONFIGWhere the config lives (default ~/.config/appbricx/config.json, mode 0600).

Setup

appbricx login

Sign in. By default it opens Appbricx in your browser, you click Authorize, and the CLI stores an OAuth token pair that refreshes itself. --token stores a personal access token instead (CI, headless machines); --email and --password sign in with a password and mint a token with all three scopes.

appbricx login [--api <url>] [--no-browser] | login --token <pat> | login --email <e> --password <p> [--workspace <id>]

Flags

FlagTypeDescription
--apioptionalstringThe API base URL (default https://appbricx.com/api).
--tokenoptionalstringA personal access token (apx_pat_…).
--emailoptionalstringPassword sign-in: the account email (needs --password).
--passwordoptionalstringPassword sign-in: the password.
--workspaceoptionalstringPassword sign-in: which workspace the minted token reaches (default the first).
--no-browseroptionalbooleanPrint the sign-in URL instead of opening a browser.
Scope
None needed. Password sign-in mints read, apply and deploy.
Exit code
0 signed in; 1 the server refused; 2 usage error (for example --email without --password).
Example
appbricx login
# CI
appbricx login --token "$APPBRICX_TOKEN"
Output
✓ signed in as dev@example.com (scopes: read, apply, deploy). Saved to ~/.config/appbricx/config.json

Source: packages/cli/src/main.mjs:187

appbricx logout

Revoke the browser sign-in and forget the saved tokens. A personal access token stays valid until you revoke it in Workspace settings, Coding agents.

appbricx logout
Scope
None.
Example
appbricx logout
Output
✓ signed out; this CLI's authorization is revoked

Source: packages/cli/src/main.mjs:223

appbricx whoami

The signed-in user, credential kind, scopes and workspaces.

appbricx whoami
Scope
any
Calls
GET /api/dev/v1/me
Example
appbricx whoami
Output
dev@example.com (pat; scopes: read, apply)
  workspace Acme — 6a1f… (owner)

Source: packages/cli/src/main.mjs:272

appbricx projects

List the projects you can reach.

appbricx projects
Scope
any
Calls
GET /api/dev/v1/projects
Example
appbricx projects
Output
3b7e…  Tablefor

Source: packages/cli/src/main.mjs:281

appbricx create

Create a project and link this directory to it (.appbricx/project.json).

appbricx create <name>
Scope
apply
Calls
POST /api/dev/v1/projects
Example
appbricx create Tablefor
Output
✓ created Tablefor (3b7e…) and linked this directory

Source: packages/cli/src/main.mjs:286

appbricx link

Link this directory to an existing project.

appbricx link <project-id>
Scope
any
Calls
GET /api/dev/v1/projects/:id
Example
appbricx link 3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b

Source: packages/cli/src/main.mjs:294

Contract

appbricx pull

Write the project's contract to ./appbricx.json (or the file you name).

appbricx pull [file]
Scope
any
Calls
GET /api/dev/v1/projects/:id/contract
Example
appbricx pull
Output
✓ wrote appbricx.json

Source: packages/cli/src/main.mjs:302

appbricx check

Normalize the contract file and print errors, fixes and warnings. No changes.

appbricx check [file]
Scope
any
Calls
POST /api/dev/v1/projects/:id/check
Exit code
0 when the report has no errors, else 1.
Example
appbricx check

Source: packages/cli/src/main.mjs:314

appbricx apply

Build the dev environment from the contract file and print the report, the build summary (demo sign-ins per role) and warnings.

appbricx apply [file] [--force]

Flags

FlagTypeDescription
--forceoptionalbooleanOverwrite compiled files you edited by hand (they are backed up first).
Scope
apply
Calls
POST /api/dev/v1/projects/:id/apply
Exit code
0 built; 1 the contract is invalid (422) or the project is busy.
Example
appbricx apply

Source: packages/cli/src/main.mjs:320

appbricx patch

Apply typed edit ops from a JSON file (an array, or one op) to the current contract, then rebuild. Ops include add_entity, add_field and adopt_table (make a table you created with sql part of the contract).

appbricx patch <ops.json> [--dry-run]

Flags

FlagTypeDescription
--dry-runoptionalbooleanReport what would change without building.
Scope
apply
Calls
POST /api/dev/v1/projects/:id/patch
Example
echo '[{"op":"add_field","entity":"bookings","field":{"name":"party_size","type":"number"}}]' > ops.json
appbricx patch ops.json --dry-run

Source: packages/cli/src/main.mjs:326

Runtime

appbricx verify

Run verify on dev and print the report.

appbricx verify
Scope
any
Calls
POST /api/dev/v1/projects/:id/verify
Exit code
0 when the report is pass, else 1.
Example
appbricx verify || echo "fix the failing checks"

Source: packages/cli/src/main.mjs:334

appbricx query

Rows from a dev table (equality filters, 200 max).

appbricx query <table> [--where col=value ...] [--limit n]

Flags

FlagTypeDescription
--whereoptionalstringcol=value; repeat for more (ANDed).
--limitoptionalstring1 to 200 (default 50).
Scope
any
Calls
POST /api/dev/v1/projects/:id/data/query
Example
appbricx query bookings --where status=confirmed --where date=2026-10-12 --limit 10

Source: packages/cli/src/main.mjs:340

appbricx logs

Recent workflow runs (status and error) and notifications.

appbricx logs [--workflow id] [--limit n]

Flags

FlagTypeDescription
--workflowoptionalstringOnly this workflow's runs.
--limitoptionalstring1 to 200 (default 30).
Scope
any
Calls
GET /api/dev/v1/projects/:id/logs${qs.size > 0 ? `?${qs}` : ""}
Example
appbricx logs --workflow send-invoice --limit 5

Source: packages/cli/src/main.mjs:350

appbricx deploy

Publish (runs verify first and refuses on red).

appbricx deploy [--subdomain <name>] [--skip-verify] [--preview]

Flags

FlagTypeDescription
--skip-verifyoptionalbooleanPublish even when verify is red.
--previewoptionalbooleanDeploy to the preview environment instead of production.
--subdomainoptionalstringThe published host name (one DNS label).
Scope
deploy
Calls
POST /api/dev/v1/projects/:id/deploy
Exit code
0 deployed; 1 verify red, subdomain taken or the pipeline failed.
Example
appbricx deploy --subdomain tablefor
Output
✓ deployed: https://tablefor.apps.appbricx.com (live)

Source: packages/cli/src/main.mjs:360

Operate the running app

appbricx sql

Run SQL like the builder's SQL editor: several statements in one transaction, past row-level security. Prod writes take a snapshot first.

appbricx sql "<sql>" | appbricx sql --file <f.sql> [--env dev|prod]

Flags

FlagTypeDescription
--fileoptionalstringRead the SQL from a file.
--envoptionalstringdev (default) or prod.
Scope
read for reads; apply on dev, deploy on prod for writes
Calls
POST /api/dev/v1/projects/:id/sql
Example
appbricx sql "select status, count(*) from bookings group by 1"
appbricx sql --file migrations/add_index.sql --env prod

Source: packages/cli/src/main.mjs:366

appbricx rows

Insert, update or delete rows through the app's rules, row-level security and change events.

appbricx rows <insert|update|delete> <table> [--data <json|@file>] [--id <id>] [--ids a,b] [--patch <json|@file>] [--as admin|<role>] [--env dev|prod]

Flags

FlagTypeDescription
--dataoptionalstringinsert: a row or an array of rows (inline JSON or @file.json).
--patchoptionalstringupdate: the columns to set (JSON or @file).
--idsoptionalstringupdate / delete: comma-separated row ids.
--asoptionalstringadmin (default, past row-level security) or a persona role id.
--idoptionalstringupdate / delete: one row id.
--envoptionalstringdev (default) or prod.
Scope
apply on dev, deploy on prod
Calls
POST /api/dev/v1/projects/:id/rows
Exit code
0 when every row succeeded, else 1.
Example
appbricx rows insert bookings --data '{"date":"2026-10-13","party_size":4}' --as customer
appbricx rows update bookings --ids b_1,b_2 --patch '{"status":"cancelled"}'

Source: packages/cli/src/main.mjs:375

appbricx schema

The real database schema: tables, keys, indexes, views, functions and triggers, and which tables the contract manages.

appbricx schema [--env dev|prod]

Flags

FlagTypeDescription
--envoptionalstringdev (default) or prod.
Scope
read
Calls
GET /api/dev/v1/projects/:id/schema${qs({ env })}
Example
appbricx schema --env prod

Source: packages/cli/src/main.mjs:392

appbricx snapshots

List, take or restore database snapshots.

appbricx snapshots [list | create | restore <id>] [--env dev|prod]

Flags

FlagTypeDescription
--envoptionalstringlist: only this environment; create: which database (default prod).
Scope
list: read; create: apply; restore: deploy
Calls
GET /api/dev/v1/projects/:id/snapshots${qs({ env })}POST /api/dev/v1/projects/:id/snapshotsPOST /api/dev/v1/projects/:id/snapshots/:snapshotId/restore
Example
appbricx snapshots --env prod
appbricx snapshots restore prod-2026-10-12T09-00-00Z-a1b2
Output
✓ restored prod from prod-2026-10-12T09-00-00Z-a1b2 (undo: appbricx snapshots restore prod-…)

Source: packages/cli/src/main.mjs:398

appbricx deploys

Deploy history, or roll what's live back to an earlier deployment (files only).

appbricx deploys [list | rollback <deployment-id>] [--limit n] [--preview]

Flags

FlagTypeDescription
--limitoptionalstringHow many to list.
--previewoptionalbooleanList preview deployments.
Scope
list: read; rollback: deploy
Calls
GET /api/dev/v1/projects/:id/deploysPOST /api/dev/v1/projects/:id/deploys/:deploymentId/rollback
Example
appbricx deploys --limit 5
appbricx deploys rollback 5c1d…

Source: packages/cli/src/main.mjs:419

appbricx run

Run a workflow now, read a run, list dead letters or replay them.

appbricx run workflow <id> [--input <json|@file>] [--as <role>] [--env dev|prod] | run get <run-id> | run dead-letters [--limit n] | run replay [job-id ...]

Flags

FlagTypeDescription
--inputoptionalstringThe workflow's input (JSON or @file).
--asoptionalstringAct as an app user holding this role.
--limitoptionalstringdead-letters: how many.
--envoptionalstringdev (default) or prod.
Scope
workflow: apply on dev, deploy on prod; get and dead-letters: read; replay: apply
Calls
POST /api/dev/v1/projects/:id/workflows/:workflowId/runGET /api/dev/v1/projects/:id/runs/:runIdGET /api/dev/v1/projects/:id/dead-letters${qs({ limit })}POST /api/dev/v1/projects/:id/dead-letters/replay
Example
appbricx run workflow send-invoice --input '{"order":"b_1"}'
appbricx run get 4f0a1c2d-…

Source: packages/cli/src/main.mjs:435

appbricx tail

Recent change events and topic messages, runtime requests, or only errors.

appbricx tail <events|requests|errors> [--since 15m] [--limit n] [--env dev|prod]

Flags

FlagTypeDescription
--sinceoptionalstring15m, 2h, 1d or an ISO time.
--limitoptionalstring1 to 500.
--envoptionalstringdev (default) or prod.
Scope
read
Calls
GET /api/dev/v1/projects/:id/tail
Example
appbricx tail errors --env prod --since 2h

Source: packages/cli/src/main.mjs:467

appbricx secrets

The app's secrets: names only, never values. set reads the value from stdin when you pass - (keeps it out of shell history).

appbricx secrets [list | set <name> <value|-> | delete <name>] [--env dev|prod|all]

Flags

FlagTypeDescription
--envoptionalstringset: dev, prod or all (default all); delete: limit to one environment.
Scope
list: read; set and delete: apply plus a workspace owner or admin token
Calls
GET /api/dev/v1/projects/:id/secretsPUT /api/dev/v1/projects/:id/secrets/:nameDELETE /api/dev/v1/projects/:id/secrets/:name${qs({ env })}
Example
printf %s "$SHIPPO_KEY" | appbricx secrets set SHIPPO_KEY -
appbricx secrets

Source: packages/cli/src/main.mjs:475

Agents

appbricx mcp-config

Print the .mcp.json entry for Claude Code, Cursor or any MCP client, pinned to the linked project. On first connect the agent opens a browser window to authorize.

appbricx mcp-config [--token-header] [--project <id>]

Flags

FlagTypeDescription
--projectoptionalstringPin this project instead of the directory's link.
--token-headeroptionalbooleanAdd Authorization: Bearer ${APPBRICX_TOKEN} for CI (the file stays secret-free).
Scope
None (no request is made).
Example
appbricx mcp-config > .mcp.json
Output
{ "mcpServers": { "appbricx": { "type": "http", "url": "https://appbricx.com/api/mcp?project=3b7e…" } } }

Source: packages/cli/src/main.mjs:231

appbricx docs

Print the contract guide (markdown). Pipe it to your agent.

appbricx docs
Scope
any
Example
appbricx docs > CONTRACT_GUIDE.md

Source: packages/cli/src/main.mjs:277

On this page

  1. Install and sign in
  2. Global flags and env
  3. Setup
  4. login
  5. logout
  6. whoami
  7. projects
  8. create
  9. link
  10. Contract
  11. pull
  12. check
  13. apply
  14. patch
  15. Runtime
  16. verify
  17. query
  18. logs
  19. deploy
  20. Operate the running app
  21. sql
  22. rows
  23. schema
  24. snapshots
  25. deploys
  26. run
  27. tail
  28. secrets
  29. Agents
  30. mcp-config
  31. docs
Appbricx

The backend, runtime and hosting for apps your coding agent builds. On our cloud, in yours, or on your own servers.

Features

Coding agents and MCPVerify testingBuilder consolePostgres databaseData APIRealtimeRow-level securitySign-in and authPaymentsWorkflows and jobsAI in your appIntegrationsBackups and rollbackHosting and domainsSelf-host and exportAll features

Product

ShowcasePricingFor coding agentsTemplatesPrivate cloudBring your own AI keyFAQ

Compare

Appbricx vs SupabaseLovable alternativeBolt alternativeFor freelancersFor agencies

Resources

DocumentationReferenceBlogSupportContact

© 2026 Appbricx. All rights reserved.

TermsPrivacyCookiesAcceptable Use