The basemodo CLI
Every command of basemodo, the program that deploys and shares your Apps from a terminal, a script or an agent, with how it signs in and how it prints.
Install and check
basemodo is a single program with nothing else to install. Check it works:
basemodo --versionEvery command explains itself with --help (basemodo deploy --help), with examples; this page and the page of each command say the same, because they are written from the same source.
Signing in
basemodo loginOpens your browser to approve this computer, and keeps the sign-in for 30 days. Over SSH, or with --device, it shows a short code to enter at basemodo.com/device from any device instead. The sign-in is kept in credentials.json, readable only by you, in $BASEMODO_CONFIG_DIR, else $XDG_CONFIG_HOME/basemodo, else ~/.config/basemodo (%APPDATA%\basemodo on Windows). The local MCP uses the same sign-in. You can see and revoke it on the Devices page of basemodo.com.
Which App
Commands that act on an App take --app NAME. Without it they use the App named after the folder you are in, the way basemodo deploy names it (the folder's name, or name in basemodo.toml). So inside the App's folder you rarely type its name.
Output, for people and for programs
- Without
--json, a command prints text for people on stdout, and messages along the way (progress, a build log) on stderr. - With
--json, stdout holds exactly one JSON document, the result; each command's page says its shape. A command that takes a while also writes its progress to stderr as one JSON object per line:{"event": "progress", "stage": "build", "message": "..."}. - An error exits with a non-zero code. With
--jsonit is{"error": {"code", "message", "fix", "docs"}}on stdout; without, the message on stderr with itsfix:(the exact command orbasemodo.tomlline to change) anddocs:(the page explaining it). Every code is explained on the errors page. basemodo runexits with the exit code of the command it ran.
Scripts and agents should always pass --json, and act on error.code and error.fix.
Global options
Every command takes these, before or after its own arguments.
--json: Print the result as JSON on stdout, for agents and scripts.--api-url <API_URL>: The Basemodo API to talk to. Also read fromBASEMODO_API_URL. Default:https://api.basemodo.com.
Commands
| Command | What it does | From an agent |
|---|---|---|
basemodo backup | Take a Backup of an App's data now: its database and every file on its volume | tool backup |
basemodo backups | List an App's Backups, newest first, to choose one to restore | tool backups |
basemodo db | Run SQL against an App's SQLite database (/data/app.db) and print the rows | tool db |
basemodo deploy | Deploy a folder and print its URL once it is live | tool deploy |
basemodo docs | Read the documentation of basemodo.com/docs: every page, or one topic | tool docs |
basemodo domains add | Claim a hostname of yours for the App, and print the DNS records to add | tool domains_add |
basemodo domains verify | Look for a custom domain's DNS records now; once found, the App answers there | tool domains_verify |
basemodo domains list | List the App's custom domains, each with its status and DNS records | tool domains_list |
basemodo domains remove | Stop the App answering at a custom domain, and forget its certificate | tool domains_remove |
basemodo egress | Give an App an outgoing address of its own (dedicated), give it back (shared), or say where its traffic leaves from | tool egress |
basemodo env set | Set Secrets: NAME=value ..., or one NAME alone to read its value from stdin. The App gets them the next time it starts: basemodo restart | tool env_set |
basemodo env list | List the App's Secrets by name, with who set each and when. Never values | tool env_list |
basemodo env unset | Remove Secrets by name (all or none). The App loses them the next time it starts: basemodo restart | tool env_unset |
basemodo indexing | Let search engines index a Public App (on), keep them out (off), or say which | tool indexing |
basemodo logs | Follow an App's Logs live, or print its last lines with --lines | tool logs |
basemodo login | Sign this CLI in from your browser | terminal only |
basemodo rename | Rename an App; its old address redirects to the new one for 30 days | tool rename |
basemodo mcp | Serve the local MCP over stdio, for an agent on this machine | terminal only |
basemodo restore | Put an App's data back as a Backup holds it | tool restore |
basemodo open | Open an App's URL in your browser | tool open |
basemodo restart | Restart an App: its Machine starts again on its live Deploy | tool restart |
basemodo rollback | Make an earlier Deploy live again, as a new Deploy | tool rollback |
basemodo run | Run a one-off command inside an App's Machine (a migration, a script) | tool run |
basemodo share | Share an App: invite Members and Editors by email, remove them, answer Access Requests, or change its Visibility | tool share |
basemodo status | Say whether an App is awake, asleep, starting or paused, and its latest Deploy | tool status |
basemodo toolbar | Turn off the Toolbar on an App's pages (off), turn it back on (on), or say which | tool toolbar |
basemodo version | Print the version of this CLI | terminal only |
basemodo whoami | Print who this CLI is signed in as | tool whoami |