Fimo CLI
What this POC proves
Commands
fimo login # browser-based auth → ~/.config/fimo-cli/credentials.json
fimo signup # email/password signup
fimo whoami # sanity check
fimo create <dir> # scaffold + link to Fimo
fimo rename "Display Name" # set project display name
fimo deploy # push main → sandbox sync (preview URL)
fimo deploy --publish # same + trigger live publish
fimo schema push [TypeName] # push JSON schema (create or update)
fimo schema list | get <T> | delete <T>
fimo entries create <T> --body '<json>'
fimo entries list <T> | get <T> <id> | update <T> <id> --body '<json>' | delete <T> <id>
fimo assets upload <file>
fimo assets generate --prompt "..." [--aspect-ratio 16:9]
fimo assets list | create-folder <n> | move <id> --parent-id <fid> | delete <id>
fimo forms push [name]
fimo forms list | get <id> | delete <id>
fimo translations sync # extract t() → translations/en.json → push diff
fimo translations list [--locale en]
All commands output JSON to stdout. All commands accept --json for script-friendly output and FIMO_API_TOKEN env var to bypass interactive login (CI use).
Template
apps/cli/assets/template/default/ — the new CLI project template. Source-tracked; no .fimo/ folder. Uses fimo/ui and fimo/vite instead of the old internal copies. Separate from apps/api/templates/default/ (sandbox-managed) because the two have different lifecycles — a divergence tracked as N3 in the RFC.
Claude starter
Copied into <project>/.claude/ by fimo create from apps/cli/assets/claude-starter/.
skills/fimo/SKILL.md+references/{content,assets,forms,translations,analytics}.md— reference docs for the in-project AI agentrules/fimo.md— project rules: never auto-deploy, never edit.fimo.settings.json, read before writingsettings.json— pre-approvedfimo:*,pnpm:*,git:*permissions
Backend additions
GET /api/management/projects/:id/git-remote
Returns signed git URL for push/pull. Not in ProjectDTO (URL is time-limited).
POST /api/management/projects/:id/sandbox/pull
Runs git fetch + reset --hard origin/main inside the sandbox.
No changes to auth, /publish, or existing project endpoints.
Architecture decisions & shortcuts
mainSimplest path; branch support is out of POC scope.
apps/api/templates/default/API template is sandbox-managed; CLI template is user-managed. Different lifecycles.
fimo deploy wraps git push + sandbox pull (not a raw remote)Hides signed-URL rotation and sandbox sync complexity from the user.
fimo deploy is user-initiated only — no slash commandPrevents AI from auto-deploying after code changes.
~/.config/fimo-cli/credentials.jsonMirrors apps/api/cmd/utils.ts pattern; no new auth mechanism.
npx fimo create yetRequires publishing to npm; deferred.
Known limitations
fimo deploy always pushes to main. No branch support.fimo/vite plugin for autoload.fimo deploy runs, the pull may overwrite uncommitted sandbox changes. Documented as unsupported.Pending
Designed but not yet implemented. Full designs in the RFC.
A lightweight admin UI for local content management — content, media, translations, form submissions — without requiring the Fimo web app. Auth via one-time token, no second login.
Full design in RFC →Translations currently diverge between git and the tenant DB. The RFC proposes making the DB the single source of truth, with a fimo/vite plugin fetching and watching translations at dev/build time.
Key files
apps/cli/ ├── assets/ │ ├── template/default/ # New CLI project template (fimo/ui + fimo/vite) │ ├── content-templates/ # hooks-template-v3.eta, form-template.eta │ └── claude-starter/ # Copied to <project>/.claude/ on fimo create │ ├── skills/fimo/ # SKILL.md + references/ │ ├── rules/fimo.md │ └── settings.json └── src/cli/ ├── index.ts # Commander entry ├── commands/ │ ├── login.ts, signup.ts, whoami.ts, switch.ts │ ├── create.ts # scaffold + git init + link │ ├── deploy.ts # push + sandbox pull + optional publish │ ├── schema.ts, entries.ts, assets.ts, forms.ts, translations.ts │ └── rename.ts ├── api.ts # FimoApiClient ├── auth.ts # credential load/save ├── config.ts # FIMO_API_URL, FIMO_WEB_URL └── utils/ └── project.ts # resolveProjectCwd, loadProjectSettings apps/api/src/http/routes/management/projects/sandbox.ts # GET /:id/git-remote # POST /:id/sandbox/pull
How to run locally
pnpm -F fimo install-cli # build + symlink ~/.local/bin/fimo
fimo create my-project
cd my-project
pnpm dev
fimo deploy # preview
fimo deploy --publish # go live