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
| Command | What it does |
|---|---|
shim login | Sign in on this machine. Prints a link and a code to approve in the browser. |
shim logout | Sign out and forget the saved token. |
shim whoami | Show the signed-in account, its plan and how many apps it uses. Takes --json. |
Deploying
| Command | What it does |
|---|---|
shim init | Write shim.toml for this folder and say what is still missing for a first deploy. |
shim deploy | Build 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 plan | Show 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
| Command | What it does |
|---|---|
shim list | List your apps with status, access and address. Takes --json. |
shim status | Show the app and its recent deploys. Takes --json. |
shim open | Open 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.
| Command | What it does |
|---|---|
shim logs | Show what the app wrote to standard output and standard error in the last hour. Takes --json. |
shim logs --requests | Show 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:
| Option | What it does |
|---|---|
--follow, -f | Keep 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
| Command | What 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 access | List who can open the app: people, domain rules, public paths and how many requests for access are pending. Takes --json. |
shim access log | Show who signed in over the last 30 days, when, and how they got in. |
shim paths | List 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 requests | List 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 public | Let anyone with the address open the app. |
shim private | Only you and the people you share with. |
Variables
| Command | What it does |
|---|---|
shim env set KEY=value... [--secret] | Set variables. A value of - reads standard input. |
shim env unset KEY... | Remove variables. |
shim env list | List variables. Secret values are not shown. Takes --json. |
Database
| Command | What it does |
|---|---|
shim db create --dedicated small|medium|large | Give the app a dedicated Postgres database. |
shim db status | Show 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 url | Print 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
| Command | What it does |
|---|---|
shim domain add <hostname> | Serve the app on your own domain and print the DNS records to add. |
shim domain list | List domains and the DNS records still to add. Takes --json. |
shim domain remove <hostname> [--yes] | Stop serving the app on a domain. |
Connected apps
| Command | What 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 callers | List the apps that may call this one. Takes --json. |
shim rotate-token | Replace this app's token for calling your other apps. The old one stops working. |
The tool itself
| Command | What it does |
|---|---|
shim upgrade | Update shim to the newest version. |
shim help | Show every command. shim --help and shim -h do the same. |
shim --version | Print 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
| Variable | Effect |
|---|---|
SHIM_TOKEN | Use this token instead of the one saved by shim login. |
XDG_CONFIG_HOME | Where 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.