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, installed with one line and nothing installed before it. On macOS and Linux:

Terminal window
curl -fsSL https://basemodo.com/install | sh

On Windows, in PowerShell:

Terminal window
irm https://basemodo.com/install.ps1 | iex

It installs basemodo for you alone, never with administrator rights: in ~/.basemodo/bin on macOS and Linux, in your local programs folder on Windows. It adds that folder to your PATH when it is not there, and says when you must open a new terminal for basemodo to be found. Running the line again upgrades to the latest version. Then it runs basemodo setup, which asks where your agents should know Basemodo, sets them up and signs you in. With no terminal to ask in (CI, a server), it leaves setup out and says to run it. An agent that runs the line for you leaves setup out itself (BASEMODO_NO_SETUP=1, below), runs basemodo setup --user, and asks you to run basemodo login: the questions and the sign-in are yours.

To install a given version or into another folder, pass them to the script: curl -fsSL https://basemodo.com/install | sh -s -- 0.2.0 --dir ~/bin, or set BASEMODO_VERSION and BASEMODO_INSTALL_DIR. To install it without running setup, as on a server, add --no-setup (-NoSetup on Windows) or set BASEMODO_NO_SETUP=1.

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 type at basemodo.com/device from any device instead, where you see where and when the sign-in started before you approve it. 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 account deleteErase your account for good: type its email to confirmtool account_delete
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 callers listList the App's Callers, with who named each and when, and the paths it exposes to themtool callers_list
basemodo callers addLet another App of the same Owner call this one: name it a Callertool callers_add
basemodo callers removeTake a Caller off: its next call is refusedtool callers_remove
basemodo changeChange an App's code: write, edit or delete files, deployed as one Deploytool change
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 deploysList an App's Deploys, newest first, each with who made it and what it changedtool deploys
basemodo diffShow what a Deploy changed in its App's code, file by filetool diff
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 downloadDownload an App's data as it is now: one .tar.gz file of everything on its disktool download
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 feedbackTell Basemodo what is wrong or missing, as the signed-in Persontool feedback
basemodo filesList or read an App's code, one of its Deploys', or a Template'stool files
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 logoutSign this CLI out: end its Session on Basemodo and forget its token hereterminal only
basemodo pullBring an App's latest code into a folder: a new one, or one that came from ittool pull
basemodo recognizeHave a Public App ask visitors already signed in to Basemodo to continue as themselves (on), let them in as Guests again (off), or say whichtool recognize
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 planShow your Plan and your next Invoicetool plan
basemodo plan changeSwitch your Plan to another, on the payment provider's pageterminal only
basemodo plan reserveSee or change a Workspace's Seats, Additional Apps and Always On Apps reserved ahead, for its Adminstool plan_reserve
basemodo restorePut an App's data back as a Backup holds ittool restore
basemodo openOpen an App's URL in your browsertool open
basemodo previewMake a Preview Link: an App opened in a browser of your own (an agent's Playwright), signed in as you, for minutestool preview
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 runsFollow a command an agent's run left running: what it printed and how it endedtool runs
basemodo screenshotSee a page of an App as you see it: rendered in a browser, on this computer or on the App's own server, and answered as a PNGtool screenshot
basemodo shareShare an App: invite Members and Editors by email, remove them, answer Access Requests, or change its Visibilitytool share
basemodo setupTeach the agents on this computer to use Basemodo, by writing its Skills where they read themterminal only
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 transfers listList the pending Transfers you asked for or may answer, with each App's Editorstool transfers_list
basemodo transfers acceptAccept a Transfer: the App becomes yours, or your Workspace's, at the same URLtool transfers_accept
basemodo transfers declineDecline a Transfer: the App stays where it istool transfers_decline
basemodo updateUpdate this CLI: replace this basemodo with the latest release, or the version namedterminal only
basemodo uploadGet a one-time link to send an App's folder to from your own shell, for deploy to deploytool upload
basemodo versionPrint the version of this CLIterminal only
basemodo whoamiPrint who this CLI is signed in astool whoami