Ubex CLI
The Ubex CLI, ubex, keeps a Ubex app in a folder on your computer: the website's files, each backend endpoint as a TypeScript file, and the database tables and file buckets as JSON files. You edit them with your own editor, or with an AI editor such as Claude Code or Cursor, run the site locally, and push your changes back to Ubex.
Install
Linux and macOS
curl -fsSL https://cli.ubex.ai/install.sh | sh
ubex version # ubex 0.4.0
The installer puts ubex in ~/.local/bin (no sudo), picks the build for your system and checks it against the version's SHA256SUMS. If ~/.local/bin is not on your PATH (macOS and some Linux systems), it prints the line to add to your shell's profile.
Windows 10 or 11, in PowerShell:
irm https://cli.ubex.ai/install.ps1 | iex
ubex version # ubex 0.4.0
It puts ubex.exe in %LOCALAPPDATA%\Programs\ubex (no admin rights needed), checks it against SHA256SUMS and adds that folder to your PATH. A terminal that was already open finds ubex once you open it again. In Git Bash, the curl ... | sh line above runs this installer for you.
From the zip. Download https://cli.ubex.ai/0.4.0/ubex-cli-0.4.0.zip, then:
unzip ubex-cli-0.4.0.zip
cd ubex-cli-0.4.0
sh install.sh # Linux, macOS
powershell -ExecutionPolicy Bypass -File install.ps1 # Windows
| Platform | Builds |
|---|---|
| Linux | x86_64 and arm64 |
| macOS | Apple Silicon and Intel |
| Windows 10 and 11 | x64 and ARM64 |
On macOS the installer clears the "downloaded from the internet" flag so macOS lets
ubexrun. If macOS still refuses it, allow it in System Settings → Privacy & Security. The Windows builds are not signed yet, so Windows SmartScreen or an antivirus may warn aboutubex.exethe first time.
Updating
Run the install line again: it installs the newest version in place of yours. To install one particular version, set UBEX_VERSION first:
curl -fsSL https://cli.ubex.ai/install.sh | UBEX_VERSION=0.4.0 sh
$env:UBEX_VERSION = '0.4.0'; irm https://cli.ubex.ai/install.ps1 | iex
Restart a running ubex dev after an update.
Log in
ubex login
Your browser opens a Ubex page: choose the organization and allow access. ubex login --read-only asks for read access only. The login renews itself, and is kept in your user's config folder, readable by you alone:
| System | Login folder |
|---|---|
| Linux | ~/.config/ubex/ |
| macOS | ~/Library/Application Support/ubex/ |
| Windows | %APPDATA%\ubex |
ubex whoami shows who you are logged in as, in which organization, and the workspaces you can reach. ubex logout ends the login (--all ends every organization's).
Start a project
A new app, a project with its website, in a new folder:
ubex workspaces # the workspaces you can use, with their ids
ubex new "My shop" --workspace 12 # or: --new-workspace "Shop"
cd my-shop
An app that exists:
ubex projects # your projects, with their web app ids
ubex pull 1234 # the web app's id
cd <folder>
ubex pull downloads the web app together with every workflow of its project, so you get the frontend and the backend in one folder.
The folder
| Path | What it is |
|---|---|
index.html, app.jsx, components/, lib/, styles/ |
The website: React with JSX in plain JavaScript (no TypeScript, no npm). Tailwind CSS is loaded by index.html |
assets/ |
Images, fonts and videos. ubex push uploads them as files |
app/api/<path>/route.ts |
One backend endpoint each. Ubex compiles the file into a workflow. See Endpoints in Code |
db/tables.json |
The project's tables: columns, types, options, links |
db/buckets.json |
The project's file buckets, such as { "avatars": { "visibility": "public" } } |
workflows/*.json |
Workflows the code form cannot express. Read them here and change them in the Ubex app |
AGENTS.md, CLAUDE.md |
Instructions for AI editors. Claude Code reads them when you start it in the folder |
.ubex/workflow-guide.md |
The full guide to writing endpoints, with this project's tables, buckets, models and secrets |
tsconfig.json, .ubex/types/ |
Types for the route files, so your editor can check them. Written by ubex, never pushed |
.ubexignore |
Paths ubex never pulls or pushes, one pattern per line, as in .gitignore. It starts with node_modules/, .git/, dist/ and .env |
.ubex/ |
ubex's own state and the logins ubex call keeps. Do not edit it. It is never pushed, and git skips it |
Rules for the site's code
- React with JSX, in plain JavaScript.
.tsand.tsxfiles are refused, except the route files underapp/api/. - No
package.json, nonpm install, no bundler config. Ubex bundles the site with esbuild. Packages are bare imports resolved by the import map inindex.html:react,react-dom,react-router-dom,lucide-react,radix-ui,class-variance-authority,clsxandtailwind-mergeare already in it. Add another one to the import map as"<name>": "https://cdn.ubex.ai/v1/<name>@<exact version>?external=react,react-dom". - Tailwind CSS v4 is loaded by
index.html. Link other stylesheets fromindex.htmltoo: never import a.cssfile from JavaScript. @/points at the project root, as inimport { Button } from "@/components/ui/button".- Routing uses
BrowserRouter. A deploy turnsMemoryRouterandHashRouterinto it. - Binary files go under
assets/, and text files never do. .mdfiles and dot-folders are kept with the project but never published..qira/holds the notes of Qira and of your team: read them, but don't edit them (push skips them).- Call your endpoints by path:
fetch("/api/orders/create"), with no host in front. The site and its endpoints share one address, on the Ubex domain and on your own domain alike.
The everyday loop
ubex dev # the site at http://127.0.0.1:5173, reloading on every save
ubex status # what changed here and on Ubex since the last sync
ubex push # send your changes: buckets and tables first, then endpoints, then the site
ubex call GET /api/orders/list
ubex pull # bring in changes made on Ubex (by Qira, the editor or a teammate)
ubex deploy # put the site live, with the endpoints' changes
The site
ubex dev serves the site from your files as you save them, at http://127.0.0.1:5173 (--port picks another port, --open opens your browser). It serves real paths: a link or a reload on /projects/123 opens that page, as on the deployed site. The site's calls to /api/... go to the real endpoints on Ubex, to their drafts, which is what your last ubex push saved. Add --live to call the published endpoints instead.
Endpoints
ubex push compiles every route file that changed. Compile errors come back as file:line. A new or changed endpoint is saved as a draft: the live app keeps what it had until ubex deploy. ubex call and ubex dev run the drafts, so you can build and test a whole feature without touching the live app. A file you push stays as you wrote it, comments and names included.
Push also checks your table code against your tables. A typo such as select: { titel: true } is refused at push with the table has no field "titel" (did you mean title?), instead of failing on every request.
When a live endpoint fails, its caller gets a plain 500 with a run id ("code": "RUN_FAILED"), and the reason is in that run's entry in Activity. ubex call and ubex dev still show you the full error.
Tables
Add a table or a column to db/tables.json and push. Table changes take effect at once, not at deploy. That is safe, because the live app ignores what it does not use.
{
"orders": {
"description": "Orders placed in the shop",
"columns": {
"customerId": { "type": "text", "required": true, "indexed": true, "links_to": "customers" },
"status": { "type": "select", "options": { "new": "New", "paid": "Paid", "sent": "Sent" } },
"total": { "type": "currency" },
"items": { "type": "json" }
}
}
}
| Setting | What it does |
|---|---|
type |
text, longtext, number, currency, date, datetime, select, multiselect, checkbox, url, email or json |
required |
The column must have a value |
unique |
No two rows share a value |
indexed |
Adds an index, for columns you filter or sort on |
options |
A select's choices, as value: label |
links_to |
The column holds the _id of a row in that table, so endpoints can include the linked row |
unique_together |
On the table: columns unique as a combination, such as [["email", "projectId"]] |
scope |
On the table: { "column": "organization_id", "claim": "organization_id" } keeps each caller to the rows of their own organization, taken from their login token |
Every row also has _id, created_at and updated_at: never add them yourself. Push never removes a table, a column or an option (it says what it kept), and a column's type is changed in My Data.
Buckets
Add a bucket to db/buckets.json and push:
{
"avatars": { "visibility": "public", "description": "Users' profile photos" },
"invoices": { "visibility": "private", "description": "PDF invoices" }
}
Choose "public" when each file must open by its link, such as images on a page (anyone with the link can read it). Choose "private" otherwise. An endpoint saves into a bucket by name, storage.bucket("avatars"). Push never deletes a bucket, and changes one's visibility only while it is empty.
Conflicts
If a file changed both here and on Ubex since your last sync, ubex push stops and names it. Run ubex pull: it keeps your version and saves Ubex's beside it as <file>.ubex-remote. Merge the two, delete the copy and push again. --force overwrites instead, so use it only when you mean to discard the other change.
Line endings are not counted as changes: a folder checked out by Git for Windows (CRLF) shows nothing changed, and a file saved with CRLF is pushed with LF. Files in assets/ are always sent byte for byte.
On Windows and macOS, some names that Ubex allows cannot exist on your disk: two files whose names differ only in case (Logo.png and logo.png), and on Windows names like aux.js, con.css or what?.md. They stay on Ubex: they are not pulled, a push leaves them alone, and pull, status and push list them. Rename them in the Ubex editor to work on them locally.
Test endpoints from the terminal
ubex endpoints # method, path and auth of each endpoint
ubex call POST /api/auth/login '{"email":"ana@example.com","password":"..."}' --keep-token
ubex call GET /api/orders/list # sends the kept token
ubex call GET /api/hello --live # the published version, not the draft
ubex call sends a real request: it writes real rows, as the app would. --keep-token keeps the token a login answers, and the calls after it send it. To test what each person may do, keep one login per name with --as:
ubex call POST /api/auth/login '{"email":"ben@example.com","password":"..."}' --keep-token --as ben
ubex call GET /api/orders/list --as ben # as Ben
ubex call GET /api/orders/list # as the login without a name
ubex call --forget-token --as ben # drop Ben's login
A name with no kept login, or an expired one, is refused before anything is sent. CLI Commands lists every option of ubex call.
Working with AI editors
The folder is ready for an AI editor. AGENTS.md and CLAUDE.md tell it the platform's rules, and .ubex/workflow-guide.md tells it how to write endpoints for this project, listing the project's tables, buckets, AI models and secrets.
With Claude Code, run claude in the folder: it reads AGENTS.md. Keep ubex dev running in another terminal so it can check the page as it works. If you also connect the Ubex MCP server, it can read every endpoint's request and response contract with get_project_context.
AGENTS.md starts with a line saying ubex pull keeps it up to date. Delete that line to keep your own version.
Output for scripts
Every command takes --json for machine-readable output on stdout, and the exit code tells you what happened:
| Exit code | Meaning |
|---|---|
0 |
Done |
1 |
Refused, a conflict, a failed build or a failed deploy. ubex call also exits with 1 on a 4xx or 5xx answer |
2 |
Wrong usage |
3 |
Not logged in: run ubex login |
4 |
Network or server error |
Colours, badges and spinners show in a terminal only. Pipes, files and --json get plain text, and --no-color or NO_COLOR=1 turns colours off in a terminal too. Nothing an endpoint answers can control your terminal: control characters show as text, like \u001b.
Known limits
ubex callsends JSON only. To try a file upload, use the site inubex dev.- Rows your test calls write stay. Delete them in My Data.
- Push never deletes anything. Delete tables, columns, buckets and endpoints in the Ubex app. Deleting a route file does not delete its workflow, and
ubex pullbrings the file back. - One mistake in an endpoint can be followed by a few extra
x is not defined herelines. Fix the first error first.
Uninstall
- Linux and macOS:
rm ~/.local/bin/ubex, then remove the login folder (rm -r ~/.config/ubexon Linux,rm -r ~/Library/Application\ Support/ubexon macOS). - Windows: delete
%LOCALAPPDATA%\Programs\ubexand%APPDATA%\ubex, and take the first folder off yourPATH(search the Start menu for "Edit environment variables for your account").
Next steps
- CLI Commands: every command and flag
- Endpoints in Code: write the backend as route files
- Ubex MCP Server: connect your AI assistant