CLI reference

Every command of the shim command line.

Which app a command acts on

Commands act on the app named in shim.toml in the current folder, or on the app named after the folder when there is no file. To act on another app from anywhere, add --app:

$ shim logs --app budget --follow

--app works with every command that acts on one existing app. shim deploy, shim plan and shim init always use the current folder.

--json prints machine-readable output on the commands that say so below.

Account

CommandWhat it does
shim loginSign in on this machine. Prints a link and a code to approve in the browser.
shim logoutSign out and forget the saved token.
shim whoamiShow the signed-in account, its plan and how many apps it uses. Takes --json.

Deploying

CommandWhat it does
shim initWrite shim.toml for this folder and say what is still missing for a first deploy.
shim deployBuild and ship the app in this folder, then apply shim.toml. It prints each build step and what it wrote; --verbose prints the builder's full output.
shim planShow what shim deploy would change, without changing anything. Takes --json.
shim rollback [deployId]Go back to an earlier deploy: the previous one, or the one you name.

Your apps

CommandWhat it does
shim listList your apps with status, access and address. Takes --json.
shim statusShow the app and its recent deploys. Takes --json.
shim openOpen the app in your browser.
shim delete [--yes]Delete the app for good. Asks you to type its name unless you pass --yes.

Logs, requests and metrics

More on each in Logs, requests and metrics.

CommandWhat it does
shim logsShow what the app wrote to standard output and standard error in the last hour. Takes --json.
shim logs --requestsShow the request log: one line for each request, about a minute behind. Takes --json.
shim logs --request-id <id>Show one request and the lines the app wrote while handling it. Takes --json.
shim metrics [--range 1h|24h|7d|30d]Show requests, status codes, server errors and response times. Takes --json.
shim alerts [on|off]Show whether the app emails you when something goes wrong, or turn that on or off.

shim logs also takes:

OptionWhat it does
--follow, -fKeep printing new lines or requests.
--since <when>, --until <when>Start and end of the range: an age like 2h or 7d, a date like 2026-12-01, or a time like 2026-12-01T10:00 (your time zone) or 2026-12-01T10:00Z (UTC). Up to 30 days back. --until doesn't work with --follow.
--search <text>Only lines that contain this exact text, with the same capitals.
--status <5xx|404>Only requests with this class of status codes, or this one code. With --requests.
--method <method>Only requests with this method, like POST. With --requests.
--path <prefix>Only requests whose path starts with this, like /api. With --requests.

Access

CommandWhat it does
shim share <email>...Let people open the app.
shim share @<domain>Let everyone with an address at that domain open the app, for example shim share @acme.com.
shim unshare <email>...Take access away.
shim unshare @<domain>Remove a domain rule.
shim accessList who can open the app: people, domain rules, public paths and how many requests for access are pending. Takes --json.
shim access logShow who signed in over the last 30 days, when, and how they got in.
shim pathsList the paths of a private app that anyone may reach without signing in.
shim paths add <prefix>...Make paths public, for example shim paths add /health /webhooks/.
shim paths remove <prefix>...Make paths private again.
shim access requestsList pending access requests. The older shim requests spelling still works.
shim access approve <email>Add the address to the list and email the person.
shim access deny <email>Drop the request without telling the person.
shim publicLet anyone with the address open the app.
shim privateOnly you and the people you share with.

Variables

CommandWhat it does
shim env set KEY=value... [--secret]Set variables. A value of - reads standard input.
shim env unset KEY...Remove variables.
shim env listList variables. Secret values are not shown. Takes --json.

Database

CommandWhat it does
shim db create --dedicated small|medium|largeGive the app a dedicated Postgres database.
shim db statusShow the app's database, its usage and its limits. Takes --json.
shim db psql [-- psql options]Open psql on a starter database from your machine.
shim db urlPrint a starter database's direct connection string. Treat it like a password.
shim db dump [-- pg_dump options]Back up a starter database with your local pg_dump.
shim db restore --to <time> [--yes]Put a starter database back to a moment in the last 6 hours.
shim db rotate [--yes]Replace the database password and restart the app on it.
shim db delete [--yes]Destroy the database and all its data.

Domains

CommandWhat it does
shim domain add <hostname>Serve the app on your own domain and print the DNS records to add.
shim domain listList domains and the DNS records still to add. Takes --json.
shim domain remove <hostname> [--yes]Stop serving the app on a domain.

Connected apps

CommandWhat it does
shim connect <caller-app>Let another of your apps call this one.
shim disconnect <caller-app>Stop that app calling this one.
shim callersList the apps that may call this one. Takes --json.
shim rotate-tokenReplace this app's token for calling your other apps. The old one stops working.

The tool itself

CommandWhat it does
shim upgradeUpdate shim to the newest version.
shim helpShow every command. shim --help and shim -h do the same.
shim --versionPrint the version. shim -v does the same.

Short forms

shim env, shim db and shim domain on their own mean shim env list, shim db status and shim domain list.

Environment

VariableEffect
SHIM_TOKENUse this token instead of the one saved by shim login.
XDG_CONFIG_HOMEWhere the saved token lives: $XDG_CONFIG_HOME/shim/credentials.json, or ~/.config/shim/credentials.json when it is not set.

Exit status

A command exits with 0 when it worked and a non-zero status when it did not, with the reason on standard error.