frogbot package installs a frogbot command. Run it from your app’s root directory through your package manager, for example pnpm frogbot dev or npx frogbot dev.
- Environment files: Before any command runs,
frogbotloads.env*files from the current directory using Next.js rules (development files unlessNODE_ENVisproduction). - Config discovery: Commands that load your app look for
frogbot.config.{ts,js,mjs}in the current directory,src/, a parent directory, or the path inFROGBOT_CONFIG_PATH. - Exit codes: Command names are case-insensitive. A missing or unknown command prints available commands (and points to Plugin commands) and exits with code
2. A command that fails prints the error and exits with code1.
Commands
Check your config
frogbot check loads your config in runtime mode, the way start and the running app do, and waits for it to finish sanitizing. It starts no server, runs no onInit, opens no database and writes no file, so it’s safe to run after every edit. It exits 0 when everything passes and 1 when it finds a problem.
[frogbot] <code> <path>: <message>, followed by a count:
INVALID_CRON and UNKNOWN_TASK are config errors, so dev and start fail on them too.
check also warns about things that don’t stop your app. A warning is one line on stderr, [frogbot] warning <code> <path>: <message>, and doesn’t change the exit code; a passing run says check passed with N warnings:
check doesn’t run TypeScript or look at the database. When it passes, it says so: run your app’s typecheck script for type errors, and frogbot migrate:status for pending migrations.
JSON output
With--json, check writes exactly one JSON object to stdout and sends everything else, including your config’s own logs, to stderr:
warnings array of { code, path, message } entries sits beside success, whether it’s true or false.
path when it isn’t tied to one place in the config, as with CONFIG_INVALID.
Deploy
frogbot deploy <target> runs every check first, prints all the problems at once and exits 1 before changing anything; then it builds and deploys with your own login for the host. Core ships docker, fly, gcp, aws and azure, and dojo() adds dojo, which runs when you name no target. See Deployment for each target’s flags, checks, what it creates and how to remove it.
Plugin deploy targets
A plugin adds a target undercli.deployTargets, the way dojo() adds dojo; app developers don’t write one. Names are lowercase letters, digits and dashes, and can’t be a core target’s name.
frogbot deploy parses the shared flags, runs its checks and the target’s preflight, and calls run only when none fails. Both get one context:
preflight returns PreflightIssue[] ({ code, message, fix }) and must not change anything. Whatever run returns becomes result in --json output.
Plugin commands
Plugins and your config can register custom CLI commands undercli.commands. Each key is a lowercase command name, and each value is an async or sync handler that runs when you call frogbot <name>.
frogbot loads it before running any command and passes the handler one context object:
Execution lifecycle, overrides, and error handling
Execution lifecycle, overrides, and error handling
- Completion & exit codes:
frogbotexits when your handler’s promise resolves (usingprocess.exitCodeif set, otherwise0), soawaitall async work. Throwing an error prints the message and exits with code1. - Overriding & merging: A
cli.commandsentry with the same name as a built-in command replaces it. Plugins should spread existing commands (cli: { ...config.cli, commands: { ...config.cli?.commands, 'my:command': handler } }) so user commands are preserved. - Validation: Command names containing uppercase letters or non-function handlers fail config validation. If the config file fails to load, built-in commands still run while plugin commands print the load error and exit with code
1. - Unknown commands: Running an unknown command prints
[frogbot] "<name>" isn't a command in this app.(or[frogbot] "<name>" isn't a built-in command, and there's no app here to add it.when no config file is found) and exits with code2.
Commands from capturePlugin()
Added when capturePlugin() is in your config’s plugins:
Commands from dojo()
Apps created with create-frogbot-app list dojo(), which adds frogbot dojo: every Dojo action from the terminal, for people and coding agents. Without an app (such as when pulling an app into an empty directory), run the same commands as npx @frogbotai/plugin-dojo <command>.
Every command takes
--json, which prints one JSON value on stdout, and reads FROGBOT_DOJO_TOKEN as its API key. Destructive commands need --yes without a terminal. frogbot dojo --help lists everything; the Dojo plugin has the full list with examples.
dojo apps share
[build] logs, and prints a share link followed by the live https://<name>.frogbot.app URL. npx frogbot share is the same command, with the same flags. Run it from the folder containing frogbot.config.ts (or its parent when the config is inside src/). In an app without dojo(), run npx @frogbotai/plugin-dojo apps share.
share and frogbot deploy dojo run the same code, so share also takes --dry-run (lists the files, size, keys and data it would send, and makes no request), --json, --no-interactive and --env-file.
Pre-flight checks & signing in
Pre-flight checks & signing in
- Lockfile check:
sharestops before uploading withNO_PACKAGE_JSONorNO_LOCKFILEifpackage.jsonis missing, if the app uses Bun, or if nopnpm-lock.yaml,package-lock.json, oryarn.lockis present. - Browser login: On first use,
shareprints a Dojo verification URL that carries the code, then the code itself (and opens your browser in interactive terminals). When the code expires,sharestarts a new one: on its own in a non-interactive shell (up to three codes), or when you press Enter. Your token is saved in~/.config/frogbotai/auth.json(or$XDG_CONFIG_HOME) with owner-only permissions. - API key instead: Set
FROGBOT_DOJO_TOKENto a Dojo API key (fromfrogbot dojo keys create) for CI and agents. It’s used ahead of the stored token, and a refused one fails instead of starting a browser login. In CI (CIset, no terminal) with no token and no stored sign-in,shareexits1at once namingFROGBOT_DOJO_TOKENinstead of printing a code nobody can open. - Custom Dojo endpoint: Set
FROGBOT_DOJO_URLto target a different Dojo instance.
Bringing local database & upload files (--data)
Bringing local database & upload files (--data)
- First share only: On the first share of a local
file:SQLite app,shareasksBring your data? 42 deals, 3 users, 12 files(or requires--data/--no-datawhen non-interactive). Once a version of the app has started on Dojo, later shares deploy code only and never overwrite live data. - Safe live copy:
sharecopies your SQLite database so it works whilefrogbot devis running, stripping local-only state (queued jobs, locks, sessions, trigger subscriptions) while preserving users, password hashes, andFROGBOT_SECRETso existing connections keep working. - Upload collections: Files inside upload directories within your project root are uploaded with progress output and automatic 3x retries.
.env*,.git,node_modules, and database files inside upload folders are excluded.
Environment keys (--no-keys, --skip-key, --update-keys)
Environment keys (--no-keys, --skip-key, --update-keys)
- Encryption & masking: Keys from
.env*files are masked in terminal output (STRIPE_KEY ••••4242) and sealed to Dojo’s public key before leaving your machine. Platform variables (DATABASE_URL,FROGBOT_SECRET,NODE_ENV,PORT,HOSTNAME) are managed by Dojo automatically, and the Dojo sign-in (FROGBOT_DOJO_TOKEN,FROGBOT_DOJO_URL) never leaves your machine. - First vs. later shares: The first share lets you untick any keys interactively (or uploads all keys when non-interactive). Later shares add newly introduced keys automatically and keep existing live values unless you pass
--update-keys. - Editors: Collaborators with editor access (such as from
dojo apps pull) deploy code only; key changes are restricted to workspace owners.
Uploaded files, 100 MB limit, and exit codes
Uploaded files, 100 MB limit, and exit codes
- Included files: Uploads all tracked and untracked working files that are not ignored by
.gitignore(up to 100 MB). - Always excluded:
.git,.frogbot/,.env*,frogbot.db*,*.sqlite*,node_modules,.next,files/, upload collection folders, and symlinks. - Exit codes: Build or upload failures print the last build lines and exit with code
1. Invalid flag combinations (such as--datawith--no-data) exit with code2.
dojo apps pull
./<app> directory, links .frogbot/app.json so running npx frogbot dojo apps share from that folder updates the same app, and writes a fresh local .env (DATABASE_URL=file:./frogbot.db and FROGBOT_SECRET). Live data and production secrets remain on Dojo.
- Refuses to overwrite an existing folder.
- Exits with code
1if you lack editor/owner permissions or the app has no live version yet, and code2if no app slug is passed.
dojo apps logs
••••. Pass --follow to stream new lines every 2 seconds until Ctrl+C.
dojo logout
auth.json. Keys the CLI made with frogbot dojo keys create keep working; revoke them with frogbot dojo keys revoke <id>, which also revokes the keys that key made unless you pass --no-cascade (--cascade, the default, says so explicitly). If Dojo cannot be reached, the local file is kept so you can retry logout.
dev and start
frogbot dev regenerates the admin import map, then runs next dev. frogbot start checks the import map, warns if frogbot generate:importmap is needed, and runs next start. Set admin.importMap.autoGenerate to false in frogbot.config.ts to skip the import map step.
Requires
next.config.{ts,mjs,js,cjs} and next in the current directory (typescript is also required at startup when using next.config.ts). Forwards SIGINT/SIGTERM and exits with Next.js’s exit code.
With SQLite, frogbot dev and frogbot run keep the database’s schema in step with your config the same way frogbot up does: outside production, FrogBot adds tables, columns and indexes and never drops data or asks; removed fields stay hidden; a change that would lose data is skipped with an error line. See Prototyping in development mode. withFrogBot also turns off the rules Next.js writes into AGENTS.md during next dev, unless you set agentRules in next.config.
frogbot help, frogbot --help and frogbot -h print the list of commands.
Run in the background
frogbot up builds the app for production and keeps it running after the terminal closes, so it stays up while you or a coding agent edit it. It waits until the app answers, prints its URL and log, and exits 0. If the first build or start fails, it prints the error, leaves nothing running, and exits 1. Run it again in a folder that is already up and it prints the same URL.
The app listens on
127.0.0.1 and ::1, so localhost reaches it whichever address it resolves to; it isn’t reachable from other computers. Each app gets its own port, so several apps run side by side:
frogbot status works from any folder. The states are starting, running, building (an update is on its way; the current version still serves), update failed (the last edit didn’t build or start; the previous version still serves), crashed (restarting) and stopped. LAST ERROR is the line of the failed step’s output that says why: a TypeScript error, else the thrown error, else its last meaningful line; the log has the full output. frogbot down stops the app in the current folder, or in the folder you name, and removes its builds; on an app that isn’t up it prints not running and exits 0.
Port
The firstup picks the first free port from 9696, and later ones keep it while it stays free. frogbot up --port 4000 picks the port yourself: FrogBot remembers it in .frogbot/port and every later up uses it. If something else holds it, up exits 1 and names the process, for example port 4000 is taken by node (pid 123); pick another with --port, instead of moving the app. frogbot up --port auto goes back to picking.
On an app that is already up, frogbot up --port 4000 moves it to the new port without a rebuild and prints moved … to http://127.0.0.1:4000. A port below 1024 needs admin rights, and up says so.
Processes
up starts one background supervisor per app, which holds the port and starts each build, schema sync and server. Every one of them stops when the supervisor stops, even when it is killed with SIGKILL or crashes, so an app never leaves a server running beside the next up. If an older FrogBot left one, the next up or down stops it, and status shows stopped (server left running, pid N) until then.
Updates
While it runs,up watches src/, public/, frogbot.config.*, next.config.*, tsconfig.json, package.json, the lockfile and .env*. 1.5 seconds after the last change it builds the new version beside the one serving, starts it, and switches traffic over once it answers; requests already open, such as a streaming chat reply, finish on the old version (up to 30 seconds). Changes made during a build start one more build when it ends. A new version goes live only once / and /admin answer below 500, /api/health answers 200 (skipped when the app has no health route) and a request through the API, /api/access, answers below 500. A build or start that fails any of these keeps the old version serving.
Builds go in .frogbot/builds/a and .frogbot/builds/b, which take turns. Each build type-checks with its own generated .frogbot/builds/<a|b>.tsconfig.json, which extends your tsconfig.json and includes only that build’s route types, so deleting a route never breaks the next update. Apps made with FrogBot 0.39 list both build folders in tsconfig.json’s include; remove those four .frogbot/builds/… lines, or tsc still reads the old routes, and the log reminds you once per start.
A server that crashes restarts on the same build after 1 second, waiting twice as long after each crash up to 30 seconds, and back to 1 second once it has stayed up for a minute.
Database schema
With SQLite and noprodMigrations, each update brings the database’s schema up to the new code before the new version starts, with the same rule as frogbot dev (see Prototyping in development mode): it adds tables, columns and indexes, adds a new required field as a nullable column so existing rows keep working, and keeps removed fields and collections (their data stays, hidden, until you add them back). It never deletes data and never asks: when a change would drop a table, a column or rows, or change a field’s type while it holds values the new type can’t read (text that isn’t a number, for a number field), the update stops as update failed and the old version keeps serving. Nothing is written to payload_migrations, so you can still adopt migrations later. With prodMigrations set, the update runs your migrations on connect instead, as frogbot start does.
Log
.frogbot/service.log holds timestamped lines from the supervisor, each build, the schema sync and the server, without colour codes. The schema sync logs how many statements it applied, and one line naming the removed fields and collections it keeps hidden, again only when that list changes. The supervisor logs server back up (pid N) after a crashed server answers again. Once the file reaches 10 MB it moves to service.log.1 and a new one starts.
Start at login
--autostart installs ~/Library/LaunchAgents/ai.frogbot.<id>.plist, which starts the app at login and restarts it if it fails; frogbot down removes it. The LaunchAgent runs your app’s node_modules/frogbot/bin.js with the absolute path of node, so reinstalling or upgrading FrogBot keeps it working; after upgrading Node, run frogbot down and frogbot up --autostart again.
Generate piece types
Port a piece
packages/pieces/piece-<slug> and test/unit/piece-<slug> to .legacy folders, then scaffolds a native piece package and test skeleton.