Skip to content

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:

Terminal window
basemodo --version

Every 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

Terminal window
basemodo login

Opens 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 --json it is {"error": {"code", "message", "fix", "docs"}} on stdout; without, the message on stderr with its fix: (the exact command or basemodo.toml line to change) and docs: (the page explaining it). Every code is explained on the errors page.
  • basemodo run exits 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 from BASEMODO_API_URL. Default: https://api.basemodo.com.

Commands

CommandWhat it doesFrom an agent
basemodo backupTake a Backup of an App's data now: its database and every file on its volumetool backup
basemodo backupsList an App's Backups, newest first, to choose one to restoretool backups
basemodo dbRun SQL against an App's SQLite database (/data/app.db) and print the rowstool db
basemodo deployDeploy a folder and print its URL once it is livetool deploy
basemodo docsRead the documentation of basemodo.com/docs: every page, or one topictool docs
basemodo domains addClaim a hostname of yours for the App, and print the DNS records to addtool domains_add
basemodo domains verifyLook for a custom domain's DNS records now; once found, the App answers theretool domains_verify
basemodo domains listList the App's custom domains, each with its status and DNS recordstool domains_list
basemodo domains removeStop the App answering at a custom domain, and forget its certificatetool domains_remove
basemodo egressGive an App an outgoing address of its own (dedicated), give it back (shared), or say where its traffic leaves fromtool egress
basemodo env setSet Secrets: NAME=value ..., or one NAME alone to read its value from stdin. The App gets them the next time it starts: basemodo restarttool env_set
basemodo env listList the App's Secrets by name, with who set each and when. Never valuestool env_list
basemodo env unsetRemove Secrets by name (all or none). The App loses them the next time it starts: basemodo restarttool env_unset
basemodo indexingLet search engines index a Public App (on), keep them out (off), or say whichtool indexing
basemodo logsFollow an App's Logs live, or print its last lines with --linestool logs
basemodo loginSign this CLI in from your browserterminal only
basemodo renameRename an App; its old address redirects to the new one for 30 daystool rename
basemodo mcpServe the local MCP over stdio, for an agent on this machineterminal only
basemodo restorePut an App's data back as a Backup holds ittool restore
basemodo openOpen an App's URL in your browsertool open
basemodo restartRestart an App: its Machine starts again on its live Deploytool restart
basemodo rollbackMake an earlier Deploy live again, as a new Deploytool rollback
basemodo runRun a one-off command inside an App's Machine (a migration, a script)tool run
basemodo shareShare an App: invite Members and Editors by email, remove them, answer Access Requests, or change its Visibilitytool share
basemodo statusSay whether an App is awake, asleep, starting or paused, and its latest Deploytool status
basemodo toolbarTurn off the Toolbar on an App's pages (off), turn it back on (on), or say whichtool toolbar
basemodo versionPrint the version of this CLIterminal only
basemodo whoamiPrint who this CLI is signed in astool whoami