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

Build and deploy from your terminal

The appbricxcommand lets you, a script, or any coding agent with a shell do everything the web app and MCP server do: create a project, check and apply your app's contract, test it as each user, look at the data, deploy, and operate the running app (SQL, rows, schema, snapshots, rollbacks, workflow runs, logs, secrets). It needs Node.js 20 or newer and has no dependencies.

When you would use it

  • In CI. Check and verify on every pull request, and deploy only when verify passes. Exit codes tell your pipeline what happened.
  • With your app in git. Keep the contract as appbricx.json next to your code, review changes like any other file, and apply them from the terminal.
  • With an agent that has a shell but no MCP support.

Each command is one call to the developer HTTP API, so the CLI gives the same answers as MCP and HTTP.

Not on npm yet. The package (@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-examples
node appbricx-examples/cli/bin/appbricx.mjs help

To get an appbricx command on your PATH:

cd appbricx-examples/cli
npm link
appbricx version

The examples below assume appbricx is on your PATH.

Sign in

With your browser (the default):

appbricx login
# self-hosted: appbricx login --api https://your-host/api
  • The CLI opens Appbricx in your browser. Sign in, pick the workspace, click Authorize, and come back to the terminal.
  • It stores a one-hour access token and a 90-day refresh token in ~/.config/appbricx/config.json (file mode 0600) and refreshes them by itself. The refresh token changes on every use.
  • The CLI shows up under Authorized agents in Workspace settings, Coding agents. Revoke it there, or run appbricx logout.
  • No browser on this machine? appbricx login --no-browser prints the URL instead. The sign-in finishes on a http://127.0.0.1 port on the machine running the CLI.

With a token (CI, headless machines)

Create a token in Workspace settings, Coding agents, then:

appbricx login --token apx_pat_...
# or skip login: export APPBRICX_API=https://appbricx.com/api APPBRICX_TOKEN=apx_pat_...

Or with your email and password, which mints a token for you:

appbricx login --email you@example.com --password '...'
# optional: --workspace <workspace-id>  (default: your first workspace)
  • A password login mints a token named cli YYYY-MM-DD with read, apply and deploy scopes. Revoke it like any other token.
  • Accounts with multi-factor sign-in can't use the password login. Use the browser sign-in or --token.

Commands

CommandWhat it does
loginSign in with the browser, or save a token (--token) or a password login (--email and --password). --api for self-hosted
logoutRevoke the browser sign-in and forget the saved tokens
whoamiThe signed-in user, scopes and workspaces
projectsList 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)
verifyThe 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 [--subdomain <name>] [--skip-verify] [--preview]Publish to production (or the preview environment). Runs verify first
schema [--env dev|prod]The real database schema: tables, columns, keys, indexes, triggers, views, functions, and which tables the contract manages (read)
sql "<sql>" | sql --file <f.sql> [--env]Run SQL like the builder's SQL editor. Reads need read; writes need apply (dev) or deploy (prod)
rows <insert|update|delete> <table> [--data json|@file] [--id id] [--ids a,b] [--patch json|@file] [--as admin|role] [--env]Edit rows through the app's rules, RLS and change events (apply on dev, deploy on prod)
snapshots [list | create | restore <id>] [--env]Database snapshots (create needs apply, restore needs deploy)
deploys [list | rollback <deployment-id>]Deploy history; roll back what's live (deploy)
run workflow <id> [--input json|@file] [--as role] [--env] | run get <run-id> | run dead-letters | run replay [job-id ...]Run a workflow now (waits up to 30s for the result), read a run, list and replay dead letters
tail <events|requests|errors> [--since 15m] [--limit n] [--env]Recent change events and topic messages, requests or errors
secrets [list | set <name> <value|-> | delete <name>] [--env dev|prod|all]The app's secrets; list shows names only. - reads the value from stdin (set and delete need apply and a workspace owner or admin)
mcp-configPrint an .mcp.json entry for this project
docsPrint the contract guide (markdown)
help, versionUsage and version

The CLI has no screenshot or component-check command. Use the MCP tools or the HTTP API for those.

The operate commands (schema through secrets) take --env dev (the default) or --env prod. Every prod write takes a database snapshot first and prints its id, so appbricx snapshots restore <id> undoes it. Indexes, views, functions, triggers and extra tables or columns you add with sql are kept by apply and deploy; schema marks them as hand-made.

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 deploy
appbricx tail errors --env prod --since 1h
appbricx sql "CREATE INDEX job_due ON job (due)" --env prod   # snapshot first
appbricx schema --env prod

Files

PathHolds
~/.config/appbricx/config.json{ api, token, refreshToken?, expiresAt?, oauth? }
./.appbricx/project.jsonThe linked project
./appbricx.jsonThe contract you edit

Environment variables

These override the files. Use them in CI and agent sessions.

VariableMeaning
APPBRICX_APIAPI base URL: https://appbricx.com/api
APPBRICX_TOKENAn access token (apx_pat_…)
APPBRICX_PROJECTProject id, instead of the directory link
APPBRICX_CONFIGPath of the config file
export APPBRICX_API=https://appbricx.com/api
export APPBRICX_TOKEN=apx_pat_...
export APPBRICX_PROJECT=3f2c9a10-...
appbricx verify

Global 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 or APPBRICX_PROJECT.
  • --help: usage.

Exit codes

CodeMeaning
0Success
1The server said no (invalid contract, red verify, missing scope, API error), or check found errors, or verify did not pass
2Usage 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). It has no token: the agent signs in with the browser the first time it connects. Add --token-header for CI, which adds "headers": { "Authorization": "Bearer ${APPBRICX_TOKEN}" } (the token itself stays out of the file):

$ appbricx mcp-config
{
  "mcpServers": {
    "appbricx": {
      "type": "http",
      "url": "https://appbricx.com/api/mcp?project=3f2c9a10-..."
    }
  }
}

With --token-header, export APPBRICX_TOKEN in the shell that starts your agent. Cursor uses ${env:APPBRICX_TOKEN} instead; see the coding agents quickstart.

Next

  • Developer HTTP API
  • App contract
  • Access tokens
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