Here is something little and anyone can do it, but a reminder to save on context. I made an agent.md file for my agent to give a quick shortcut to understanding the cli and what to do. it lives in my .anvil-cli/ folder.
Anvil CLI reference
Binary:
~/.anvil-cli/npm-global/bin/anvil(add to PATH, or invoke by full path).Commands
watch | sync [path]
Watch for local file changes and sync them to the Anvil editor. This is the main
command for active development — run it in the background while editing.
-A, --appid <APP_ID>— specify app ID directly (otherwise auto-detected from git remote)-f, --first— auto-select first detected app ID without confirmation-s, --staged-only— only sync staged changes (git addfirst)--no-dependency-watch— don’t watch/refresh.anvil/deps-a, --auto— auto mode: restart on branch changes, sync when behind-O, --open— open watched path in preferred editor/app-u, --url <ANVIL_URL>— Anvil server URL (e.g. anvil.works, localhost)-U, --user <USERNAME>— which account to usecheckout | co [input] [directory]
Check out an Anvil app locally from editor URL, git URL, app ID, or interactive picker.
-O, --open— open destination after checkout-b, --branch <BRANCH>— checkout specific branch--depth <N>— shallow clone--single-branch--origin <NAME>— custom remote name--quiet/--verbose-u, --url/-U, --user-f, --force— override safety checks on destination path-Q, --query <QUERY>— preseed interactive picker searchExamples:
anvil checkout http://localhost:3000/build/apps/APPID/code/assets/theme.css anvil checkout https://anvil.works/git/APPID.git anvil checkout APPID --url anvil.works anvil checkout APPID --branch master --depth 1 --single-branch anvil checkout APPID -O anvil checkout APPID my-local-folder --force anvil checkout # interactive search/select anvil checkout -Q "dashboard"git-auth
Diagnose Anvil Git authentication. Subcommand:
doctor— diagnose why plain
git commands can’t authenticate to Anvil.login | l [anvil-server-url]
OAuth login.
-u, --url <ANVIL_URL>.anvil login anvil login anvil.works anvil login --url localhostlogout | lo [anvil-server-url]
-u, --url,-U, --user. Logs out of all accounts if none specified (or prompts).config | c
Manage CLI configuration. Subcommands:
get <key>,set <key> <value>,
delete|unset <key>,list,reset.convert-template
Convert an Anvil form template YAML file to HTML template format.
-o, --output <path>,-f, --force,--keep-source.deps
Manage app dependencies. Subcommands:
fetch [options](into.anvil/deps/),
status(show cached),clear(clear cache).tables
Manage table mappings. Subcommands:
fetch(into.anvil/table-mappings.json),
status,clear.validate
Validate Anvil app files:
anvil.yaml,client_code/**/*.yaml,
client_code/**/*.html,client_code/**/*.py,server_code/**/*.py.update | u
Update the anvil CLI itself to the latest version.
configure
Guided interactive setup for configuration and login.
version
Show CLI version information.
Global options (all commands)
--json— NDJSON output, useful for scripting/LLM consumption-V, --verbose— detailed output-h, --help— per-command helpNotes for future sessions
anvil watchis long-running; launch it in the background and let file edits
sync automatically rather than re-running it per change.- Confirm with the user before starting
anvil watch/syncsince it pushes
local changes live to the connected Anvil app.
