Cheatsheet
On this page
All commands run in the project folder (the one with globetrotter.config.json), with npx globetrotter …. Never npx globetrotter outside a project.
Commands
| Command | Does |
|---|---|
node globetrotter-0.3.0/install.mjs new <name> --as both [--app-port N --backend-port N] |
new project from the unpacked zip (about 1 min) |
node globetrotter-0.3.0/install.mjs upgrade <project> |
put a newer bundle into a project |
dev [--port N --app-port N] |
studio (3100), app (3000, under /g), backend (8000); Ctrl-C stops all |
sync |
write generated files from the designs; write migrations (never applies them) |
sync --check |
compare, write nothing, exit 1 when stale or invalid |
doctor |
every rule of "in sync", one line each, with the fix |
status |
per page: ready or what is left; --since <ref>, --check, --json |
words [design] --out f.tsv / --apply f.tsv [--dry] / --check |
all words as a sheet; back; placeholder copy |
a11y, presses, monkey, shots, m3 |
checks that open the running app (need dev running) |
deploy --dry-run [--name N --backend-url https://…] |
rehearse putting the pages on Cloudflare Pages |
--version, --cwd <dir> |
the build; run against another project |
Backend, from backend/:
| Command | Does |
|---|---|
GLOBETROTTER_ENV=local uv run python -m <app>_core.migrate |
apply waiting migrations |
uv run pytest -q |
contract tests (from the design) and yours |
uv run ruff format . |
the format doctor insists on |
uv sync |
after sync says uv.lock changed |
cd frontend && npx tsc --noEmit |
do the bindings fit the generated types |
Folders
| Path | Owner | Edit it? |
|---|---|---|
designs/<app>.design.json |
pages | yes: studio, agent tools, or by hand then sync |
designs/<app>.service.json |
backend | yes: same |
frontend/src/generated/* |
generated | no (kept in .hand-edited/, then overwritten) |
frontend/src/bindings/<page>.ts |
yours after the first edit | yes: data, calls, handlers |
backend/packages/<app>_{contract,core,fastapi} |
generated | no |
backend/packages/<app>_impl/ |
yours after the first edit | yes: the rules |
backend/tests/ |
stubs then yours | yes: add your own files |
backend/migrations/ |
written once per change | read; do not edit an applied one |
vendor/globetrotter/, package.json, globetrotter.config.json |
yours | commit vendor/ |
.globetrotter/, designs/.memory/versions/, shots/ |
local, ignored | no |
A first line @stub-hash … means untouched stub (follows the design); @generated-hash means generated.
The five checks before you say done
npx globetrotter syncthennpx globetrotter sync --check: no✗, no stale files.npx globetrotter doctor:everything that can be checked is in sync.cd backend && uv run pytest -q: all pass.cd frontend && npx tsc --noEmit: nothing (doctor says it too).- Use it: open the page on a phone-sized window, press what you changed; then
npx globetrotter statusfor what is left. For a release alsocd frontend && npm run build(stopdevfirst).
Tools by job (the globetrotter-design MCP server)
| Job | Tools |
|---|---|
| start, finish | design_session, design_status, design_handoff, recall, remember |
| read | list_designs, get_page (outline, json, markdown), get_node, find_nodes, get_catalog, find_icons, get_words, get_code, get_contract |
| pages | add_page, rename_page, move_page, remove_page, duplicate_page, set_page_reads, set_page_transition |
| widgets | add_node, set_props, move_node, remove_node, duplicate_node, wrap_node, convert_node, add_words, place_beside, set_grid_layout |
| words, theme | replace_text, set_words, set_theme |
| actions and data | describe_action, list_actions, show_count, insert_block, save_block |
| backend | service_session, add_entity, add_operation, add_service_node, set_service_props, remove_service_node, use_service_block, set_auth, propose_operations |
| try the backend | press_operation, check_auth, get_runs, look_at_traces, get_audit, service_status |
| check a page | lint_design, apply_fix, review_page, look_at_page, check_presses, check_accessibility, check_monkey, audit_contrast |
| who did what | blame, session_changes, who_is_here, list_asks, ask_other_side |
| write files | regenerate (migrate: true also writes the migrations) |
Messages: what to run
✗ … tsc → edit the binding. out of date → sync. behind its migrations → the migrate line it prints. no Globetrotter project here → wrong folder. ST202 Schema-valid request rejected → declare a Refusal. not installed: run uv sync → uv sync. More in 05.