caramel
Skip to content
Browse documentation
Reference / Commands

Every command, in one place.

Frappé, your application’s binary, and Latte, listed from the source of Caramel 0.7.1.

Frappé

Run Frappé inside an application folder; a command marked so also works anywhere. An application’s shard.lock pins its Caramel release, and Frappé runs that release’s commands for it. frappe COMMAND --help prints one command’s syntax, and frappe agent-manifest prints the whole list with the diagnostic grammar for agents.

frappe helpPrint every command with its description. Works outside an application.
frappe versionPrint the Frappé version. Works outside an application.
frappe agent-manifestPrint this strict command list and the MRDP diagnostic grammar for coding agents. Works outside an application.
frappe new NAMECreate the application ./NAME, install its locked dependencies and register it with Latte. Works outside an application.
frappe setupInstall locked dependencies and register this project with Latte, preserving existing files.
frappe dev [--no-open] [--branch NAME]Build, serve and reload the app at its HTTPS origin; --branch runs it against database branch NAME.
frappe check [--agent|--human]Run the Tier-1 type check (crystal build --no-codegen) and report diagnostics; MRDP unless stdout is a TTY.
frappe lint [--agent|--human]Check the application against Caramel's RFC-0008 rule set in .ameba.yml; MRDP unless stdout is a TTY.
frappe formatFormat the application's Crystal files with the pinned compiler's formatter.
frappe routes [FILTER]List routes with their contracts; FILTER keeps routes whose method, path or action contains it (any case).
frappe expand FILE:LINE:COLPrint the plain Crystal that the macro call at FILE:LINE:COL expands to.
frappe make resource NAME FIELD:TYPE... [--plural=NAME] [--only=ACTIONS]Generate a SugarORM schema, migration, actions, views, routes and specs; FIELD:TYPE:server marks a field the server sets, kept out of forms and contracts, :unique adds a unique index and changeset constraint, and :url validates an http or https URL entered in a URL input. --only=create,show,index,new keeps the listed actions of index, show, new, create, edit, update and destroy; create and show are required, and edit needs new and update.
frappe make locale CODEAdd the locale CODE, such as fr or pt-BR: create app/locales/CODE.cr; on first use also app/locales/en.cr and the i18n lines in config/application.cr, after which frappe make resource writes translated views.
frappe translationsList the keys each locale still takes from the default locale; exits 1 while any is missing.
frappe migrate [--dev-override] [--agent|--human]Lint and apply pending migrations, then report schema drift read-only.
frappe seedLoad db/seeds.cr into the development database.
frappe corretto [SPEC_PATHS...] [--concurrency=1..8]Run specs in isolated Latte test databases with synchronous queue drains.
frappe db dumpSave a backup of the development database.
frappe db restore FILERestore the development database from FILE after a safety backup.
frappe db diff --name NAME [--dev-override] [--agent|--human]Derive migrations from the declared schema and prove them on a scratch branch.
frappe db branch create NAMEClone the development database into branch NAME and print its connection URL.
frappe db branch listList this project's database branches.
frappe db branch delete NAMEDrop database branch NAME.
frappe logs [app|compiler] [--follow]Show the development app or compiler log.
frappe services [status|start|stop]Show, start or stop Latte's PostgreSQL, DNS and HTTPS services. Works outside an application.
frappe sitesList the sites registered with Latte. Works outside an application.
frappe sites remove NAMEUnregister site NAME, keeping its files, databases and credentials. Works outside an application.
frappe installations [list]List the Caramel releases installed on this Mac. Works outside an application.
frappe installations install VERSIONClone, build and register the tagged release VERSION, reusing this toolchain when the release pins the same one; if VERSION is installed, build what it lacks, such as its linter. Works outside an application.
frappe installations registerRegister this checkout for projects pinned to its version; ~/.local/bin/frappe and latte run the newest installed release. Works outside an application.
frappe installations remove VERSIONForget the installation registered for VERSION; the launchers move to the newest remaining release. Works outside an application.
frappe doctorCheck the toolchain, this Caramel installation, dependencies, local configuration and Latte services.
frappe openOpen the application's HTTPS origin in the browser.
frappe lsp crystalline|ameba-ls [SERVER_ARGS...]Run a pinned language server for this project on stdio.
frappe lsp installBuild the pinned language servers. Works outside an application.

Output for people and agents

check, lint, migrate and db diff print MRDP diagnostics for agents unless stdout is a terminal; --agent or --human chooses explicitly. A mistyped command or option exits 1 with the intended command’s exact syntax and a suggestion.

Read diagnostics as an agent →

Your application binary

Each application compiles to one binary whose main is Caramel.run(App); below, APP stands for it. Frappé runs these commands for you: frappe dev serves, and frappe routes, frappe seed, frappe migrate and frappe translations run the commands of the same name. serve and work are the two process roles.

APP serveServe HTTP on the private socket frappe dev names, with Cold Brew’s workers, maintenance and schedules. Refuses to start with pending migrations.
APP work [--queues=NAMES] [--concurrency=N] [--no-scheduler]Run Cold Brew’s workers, maintenance and schedules without HTTP. --queues and --concurrency replace CARAMEL_WORKER_QUEUES and CARAMEL_WORKER_CONCURRENCY; --no-scheduler leaves schedules to other processes.
APP seedLoad db/seeds.cr into the database.
APP routesPrint every route with its action, contract and ingress.
APP schemaPrint the declared schema as JSON.
APP driftCompare the database with the declared schema; exits 1 when they differ.
APP translationsList the keys each locale still takes from the default locale; exits 1 while any is missing.
APP migrate [--dev-override]Lint and apply pending migrations; --dev-override relaxes the linter in development.
APP lint [--dev-override]Lint pending migrations without applying them; --dev-override relaxes the linter in development.

Latte

Frappé starts Latte when a command needs it, so you rarely call Latte yourself. frappe services starts and stops the services Latte runs.

latte daemonRun Latte in this terminal.
latte daemon --detachRun Latte in its own session, logging to logs/latte.log. Frappé starts Latte this way when it is not running.
latte stopStop the running Latte. Services keep running.
latte service installStart Latte whenever you log in (a per-user login item), and now.
latte service uninstallRemove that login item; the Latte it started stops.
latte versionPrint this Latte's release and the control API versions it serves.