Skip to content

Command Line Interface

The fullfinity-server CLI is the primary tool for managing your Fullfinity installation. It handles server startup, module management, and code generation.

Terminal window
fullfinity-server -c config.yaml [options] [command]

The -c/--config flag is required for all operations.

Fullfinity runs as a container image, where the CLI is available as fullfinity. Run a command inside the running container with docker compose exec, or in a one-off container with docker compose run --rm when the app is stopped:

Terminal window
docker compose exec fullfinity fullfinity -c /app/config.yaml -db mycompany -i sales --init-only

The examples below write the bare fullfinity-server -c config.yaml … form; prefix them the same way.

Terminal window
fullfinity-server -c config.yaml

This starts the server using settings from config.yaml. The API will be available at http://localhost:8000 by default.

Terminal window
fullfinity-server -c config.yaml -db mycompany

In multi-tenant setups, use -db to specify which database to connect to.

Terminal window
fullfinity-server -c config.yaml --host 127.0.0.1 --port 9000

Override the default binding address and port.

Terminal window
fullfinity-server -c config.yaml --workers 8

Override the number of worker processes (default from config file).

Terminal window
fullfinity-server -c config.yaml --reload

Restarts the workers when Python changes, so module edits are picked up without a manual restart. The development Compose stack starts the server this way; remove it in production.

All module operations require the -db flag to specify the target database.

Terminal window
fullfinity-server -c config.yaml -db mycompany --update-module-list

Scans the module paths for new or updated modules and registers them in the database. Run this after adding new module folders.

Terminal window
# Install single module
fullfinity-server -c config.yaml -db mycompany -i sales
# Install multiple modules
fullfinity-server -c config.yaml -db mycompany -i sales,invoicing,crm
# Long form
fullfinity-server -c config.yaml -db mycompany --install sales,invoicing

Installs the specified modules and their dependencies. The installation process:

  1. Resolves module dependencies
  2. Runs database migrations
  3. Loads security groups and access rules
  4. Loads views, actions, and menus
  5. Loads seed data
Terminal window
# Update specific modules
fullfinity-server -c config.yaml -db mycompany -u sales,invoicing
# Update all installed modules
fullfinity-server -c config.yaml -db mycompany -u all
# Long form
fullfinity-server -c config.yaml -db mycompany --update all

Updates modules to apply changes:

  • New or modified fields (runs schema migration)
  • Updated views and actions
  • New security rules
  • Updated seed data
Terminal window
fullfinity-server -c config.yaml -db mycompany --uninstall sales

Removes a module and cleans up:

  • Deletes records owned by the module
  • Updates dependent modules to restore their original state
  • Reverts any extensions made by the uninstalled module

Warning: Uninstalling a module may delete user data associated with that module.

Terminal window
fullfinity-server -c config.yaml -db mycompany --downgrade-to-free --init-only

Uninstalls every Enterprise app so a database whose licence has lapsed runs as Free. It is the same action as Downgrade to Free on the licence screen in the app. Free apps and their records stay; Enterprise apps’ data is deleted, including the fields they added to free records. It asks you to type confirm; pass --yes to skip the prompt in a script.

A database whose Enterprise licence has lapsed past its grace period cannot be updated: -u stops before changing anything and says so. Renew the licence in the app, or downgrade to Free, then run the update again.

Terminal window
fullfinity-server -c config.yaml -db newcompany --init core,sales,invoicing --init-only

Combines --update-module-list and --install for new database setup. Use this when setting up a fresh tenant database. Add --demo to load each module’s demo data as well.

Terminal window
fullfinity-server -c config.yaml -db mycompany -u all --init-only

The --init-only flag performs the module operations and exits without starting the server. Useful for:

  • CI/CD pipelines
  • Database updates in deployment scripts
  • Batch operations

Running scheduled jobs. A module operation cannot change the schema under a job that is running, so it waits for the jobs already running to finish; no new job starts meanwhile. From the command line it waits as long as that takes, logging every 15 seconds each job still running — its name, how long it has run, and its database process id. Running against a live server is therefore safe without stopping it first. A job that is stuck (a network call that never answers) can be ended with SELECT pg_terminate_backend(<pid>);: its work is rolled back as one transaction and it runs again on its next schedule, and the waiting operation continues. A job you write that calls out to the network should put an overall time limit on each call (asyncio.timeout), not only the client’s per-read timeout — a server that trickles its answer never trips the latter, and the job holds every deploy until it ends. (An install or update started from the Apps screen waits at most MODULE_OP_LOCK_TIMEOUT_MS — 30 seconds by default — and otherwise asks the user to try again shortly.)

upgrade is an alias for -u all — there is no separate version-based upgrade path. After swapping in the new image (see Installation → Upgrading), run either:

Terminal window
fullfinity-server -c config.yaml -db mycompany -u all # or: ... upgrade
fullfinity-server -c config.yaml --all-databases upgrade # every database this deployment owns

Nothing migrates when the server starts: until this runs, new code serves the old schema.

This runs the additive schema sync and replays the schema-change ledger (renames, deletes, complex/data migrations) in one atomic transaction — per installed module, in change-id order. It’s safe to re-run (idempotent) and rolls back wholesale on failure. There are no pre_upgrade/post_upgrade hooks and no framework-version gating.

See Migrations & Upgrades for how schema changes are recorded (check --only schema / resolve) and replayed.

Four verbs manage the schema contract and the build-time consistency gates. All are no-database (they compose the model surface from code) except preview --db.

Runs every build-time gate and exits 1 on any failure, so it can gate CI and pre-commit:

Terminal window
fullfinity-server -c config.yaml check # all gates (report every failure)
fullfinity-server -c config.yaml check --only schema # one gate (see the table)
fullfinity-server -c config.yaml check --module sales # scope to a single module
fullfinity-server -c config.yaml check --strict # views/templates gates: enforce the full anchor ruleset
--onlyGate
schemathe append-only field-surface contract (no renamed/removed/retyped field or Selection choice)
viewsview inheritance stability (hooks target stable anchors, never titles/positions)
templatesreport/portal/email template inheritance: extensions target a stable #id/[data-anchor]/field:<chain> in their base (never CSS/content/position), and every base body’s structural nodes are anchor-covered so third parties can extend it
refsevery stored reference — Q-domains, filter-groups, visible_setting, field-paths, model-names, report/email Jinja — resolves against the schema
valkeyno module reaches past env.valstore into an engine-internal Valkey DB
manifestsevery module manifest has the required keys and a valid category
number-guardsno record.<number> or 0 on a number that cannot be blank — only a nullable=True number can be (see Field types)
money-toleranceno money judged against a fixed 0.005 / 0.01 or a bare is_zero(x) — an amount is nothing when money_is_zero(amount, currency) says so — and no new round(x, 2) without an allowlist entry (money takes round_money(amount, currency); see Core primitives)
autoescapeevery Jinja environment a module builds for its own templates escapes what it prints (autoescape=True)
currencymoney never crosses from one record to another unconverted, and every Monetary has a currency that cannot be left blank (see Monetary)
outboundevery module file that opens a network connection says what it does in a copy of the database (see Live and Copy Databases)
view-refsevery field a view names (bindings, widget props, Q-expressions) exists on its model
filter-pathsevery keyword path in a Python .filter() resolves against the schema
follow-fieldsevery _follow_fields path names a field the module owns or depends on
form-effectsno stored field is set only by a @Model.ui_effect (which runs on forms alone)
calculatedno calculated field queries once per record
workflow-locksevery model with a workflow status declares _controlled_edits
setting-resolversa setting that promises to resolve automatically declares a resolver default
securityevery model has an access grant, every grant targets a real model, and portal/public grants are row-scoped
menusevery menu leads somewhere the people who see it may go
company-scopenothing reads the company selection as “the current company”
controllersevery controller extension names a real base and re-declares the routes it overrides
datetimeno datetime.now() used as a timestamp (stored timestamps are UTC)
i18nuser-facing text is translatable, and counted messages use plural forms
integrationsevery module in the Integrations catalogue carries a valid verification record
helphelp articles a module ships still match the screens they describe
licenseevery Python file carries the license notice for its directory
license-api, keys, secrets, lintFullfinity’s own release hygiene: no license checks in modules, signing keys in sync, no secrets in tracked config, correctness lint
i18n-catalogsevery translation catalogue is complete (release time only)
version-bumpthe version number moved as the release requires (release time only)

With no --only, every gate runs except i18n-catalogs and version-bump, which run only when named, and every failure is reported together.

resolve — record a sanctioned schema change

Section titled “resolve — record a sanctioned schema change”

When check --only schema fails on an intentional rename/removal/retype, record it (details in Migrations & Upgrades):

Terminal window
fullfinity-server -c config.yaml resolve # interactive prompts
fullfinity-server -c config.yaml resolve --assume-renames # auto-record obvious renames
fullfinity-server -c config.yaml resolve --rename Task.due=deadline --delete Task.legacy_note
fullfinity-server -c config.yaml resolve --snapshot --module acme # just (re)write the baseline

Before upgrading a customer install, preview what a release breaks in their custom modules, or render the release changelog (details in Upgrade Transparency):

Terminal window
fullfinity-server -c config.yaml preview --db mycompany # audit an install's custom modules (read-only)
fullfinity-server -c config.yaml preview # release reference changelog (no database)
fullfinity-server -c config.yaml preview --out FILE # write the Markdown to a file

filestore — move a filestore into object storage, and check it landed

Section titled “filestore — move a filestore into object storage, and check it landed”

Attachments live outside the database, so switching FILESTORE_BACKEND from local to s3 means the files have to be copied. The database does not change: an attachment row stores a storage key, and the same string addresses the file on disk and in a bucket.

Terminal window
fullfinity-server -c config.yaml filestore copy --db mycompany --dry-run
fullfinity-server -c config.yaml filestore copy --db mycompany
fullfinity-server -c config.yaml filestore verify --db mycompany

copy uploads every local file the configured backend does not already hold. It is idempotent and safe to run while the instance is serving: anything already there is skipped, so it can be interrupted, re-run, and run a second time after the cutover to carry whatever was uploaded in between. Node-local scratch (import_tmp/) and part-written files are deliberately left behind.

verify answers a different question — whether every attachment row has bytes the backend can actually produce. A copy can be complete and the answer still be no, because a row can outlive its file. It refuses to report success while FILESTORE_LOCAL_FALLBACK is on, since those reads may have been answered from the local disk you are trying to stop depending on.

The full cutover procedure, including where the fallback fits, is in Configuration.

adopt — declare a copy the live database

Section titled “adopt — declare a copy the live database”

A copy of a database is not live until someone says it is the real one: it sends no email or messages, runs no scheduled jobs, charges no payments and calls no outside service (see Live and Copy Databases). A copy is recognised on its own — a restored dump, a CREATE DATABASE ... TEMPLATE, a clone — so nothing has to be configured to make a copy safe. Going live is the deliberate step:

Terminal window
fullfinity-server -c config.yaml adopt --db restored # this REPLACES the original
fullfinity-server -c config.yaml adopt --db restored --status # live or a copy, and why

adopt also takes ownership of the database’s files (below), because a database that replaced the original takes over both. An administrator can do the same from the app: the notice a copy shows carries a This Is My Live Database button. --status exits non-zero while the database is not live, so it can gate a deploy. On a server started with FULLFINITY_ENV=staging (or test) no database is live, and adopt does not change that.

If the database the copy came from is still running, stop it before adopting — two live databases email the same customers and delete each other’s files.

filestore status / fork — a copy that stands beside the original

Section titled “filestore status / fork — a copy that stands beside the original”

A database’s files live under an id stored inside it, not under its name (see Multi-tenancy). That is what lets a pg_restore onto new hardware keep its attachments — and it means a copy made outside this application carries the original’s id:

Terminal window
pg_dump prod | psql staging # staging now points at prod's files

Two databases, one prefix. Deleting files is blocked in the copy while that is true, because the database it was copied from is probably still serving them:

Terminal window
fullfinity-server -c config.yaml filestore status --db staging # which prefix, and who owns it
fullfinity-server -c config.yaml filestore fork --db staging # files of its own

fork gives the copy a prefix of its own and copies the files into it — the staging case, where both are running. It stays a copy. The disaster-restore case, where the original is gone, is adopt above. status exits non-zero when a decision is outstanding.

Databases created, cloned or restored through Fullfinity mint their own id and never need fork.

These verbs replaced the earlier artifact-named flags — there are no aliases, so update any scripts or pipelines:

Old flagNew
--check-schemacheck --only schema
--check-views (--strict-views)check --only views (--strict)
--check-referencescheck --only refs
--check-valkey-accesscheck --only valkey
--check-manifestscheck --only manifests
(all gates at once)check
--resolve-schema (--rename/--delete/--complex/…)resolve (same options)
--snapshot-schemaresolve --snapshot
--report / --report-outpreview --db / preview --out
--changelog / --changelog-outpreview / preview --out
Terminal window
./fullfinity-server -c config.yaml password --db mydb --email admin@example.com

Asks for the new password twice, without showing it, and sets it. This is the way back in when nobody who could change a password can sign in, and the server cannot send the reset email. Without a terminal (a script or a pipe) it reads the password from one line of standard input.

Inside the app, a password is changed with Change Password: from Preferences for your own account, after entering your current password, or from a user’s form by someone allowed to edit users. Every route applies the same rule (at least 8 characters), and setting a password signs that user out on every device.

Terminal window
fullfinity-server -c config.yaml --module-path ./fullfinity/modules,./modules,/opt/modules

Override the module search paths (the MODULE_PATHS config key). Fullfinity will scan all specified directories for modules.

The new command scaffolds a module with the standard directory structure and sample files.

Terminal window
fullfinity-server -c config.yaml new my_module
# Create it in a specific directory (default: current directory)
fullfinity-server -c config.yaml new my_module --path ./modules

The module identifier must be a snake_case identifier (letters, digits, underscores; not starting with a digit). The scaffolder writes a ready-to-install module that passes check as generated (set publisher in its manifest to your own name):

my_module/
├── __init__.py
├── manifest.yaml # Module metadata
├── models/ # Model definitions (.py) — includes models/__init__.py
├── views/ # UI views, actions, menus (.yaml)
├── security/ # Groups, permissions (.yaml)
├── data/ # Seed data
├── demo/ # Demo data
├── i18n/ # Translations
├── tests/ # Tests (.py)
├── templates/ # Templates
├── routes/ # Custom routes
└── static/src/{css,js}/ # Frontend assets

The generated models/, views/, security/, and tests/ folders contain working sample files (a model, list/form views, an action, a menu, a security group, and a test). After scaffolding, install it:

Terminal window
fullfinity-server -c config.yaml -db mycompany -i my_module --init-only

Note: new does not require the -db flag since no database access is needed.

OptionShortDescription
--config-cPath to configuration file (required)
--database-dbTarget database name
--help-hShow help message
OptionDescription
--hostHost to bind to (default: 0.0.0.0)
--portPort to run on (default: 8000)
--workersNumber of worker processes
--reloadRestart workers when Python changes (development)
--module-pathComma-separated module directories
OptionShortDescription
--install-iInstall modules (comma-separated)
--update-uUpdate modules (comma-separated or “all”)
--uninstallUninstall modules (comma-separated)
--downgrade-to-freeUninstall every Enterprise app and its data (asks to confirm)
--yesConfirm --downgrade-to-free without the prompt
--initInitialize modules (update list + install)
--demoLoad demo data during --init or --install
--update-module-listScan for new modules
--all-databasesRun the module operation on every database this deployment owns (instead of -db)
--init-onlyExit after module operations
Terminal window
fullfinity-server -c config.yaml -db mycompany upgrade

Alias for -u all: additive schema sync + atomic ledger replay. Requires -db.

Terminal window
# Scaffold a new module (no -db required)
fullfinity-server -c config.yaml new my_module [--path DIR]

new options:

OptionDescription
nameModule identifier (snake_case), e.g. my_module (positional)
--pathDirectory to create the module in (default: current directory)
Terminal window
# Run the whole suite — creates a self-cleaning ephemeral database automatically
fullfinity-server -c config.yaml test [options]

No -db is needed: the test command creates a fresh, self-cleaning database for the run and drops it afterwards. Omit --module to run every module’s tests against one install (fastest for the full suite); pass --module to filter to one.

test options:

OptionShortDescription
--module-mOnly run tests for this module (omit to run all)
--verbose-vVerbose output
-kOnly run tests whose file, class or method name contains this pattern (case-insensitive); commas mean “either”
--shardRun one slice of the test files, e.g. --shard 2/4. Every shard installs what a full run does; running 1/N to N/N in parallel runs the whole suite
--json-summaryWrite JSON test results to a file
--install-onlyInstall --module and its declared dependencies, then stop — no tests are collected or run. Succeeds if the install and view/security composition did.
Terminal window
# Run the consistency gates (no -db required)
fullfinity-server -c config.yaml check [--only AREA] [--module ID] [--strict]
OptionDescription
--onlyRun one gate (default: all except i18n-catalogs and version-bump); the gates are listed under check
--moduleScope the check to a single module
--strictViews gate: enforce the full anchor ruleset
Terminal window
# Record a sanctioned schema change / re-snapshot baselines (no -db required)
fullfinity-server -c config.yaml resolve [--snapshot] [--module ID] [decisions…]
OptionDescription
--snapshotJust (re)generate the committed baselines from code (record no change)
--moduleScope to a single module
--assume-renamesAuto-record obvious single-candidate field renames
--rename, --delete, --complex, --rename-choice, --clear-choice, --complex-choice, --rename-model, --delete-modelDeclarative, repeatable decisions (non-interactive)
--remove-anchor, --rename-anchorRecord a removed or renamed view anchor (Builder customizations targeting it are pruned, re-homed or rewritten on replay)
Terminal window
# Upgrade transparency: install audit (--db) or release changelog (no -db)
fullfinity-server -c config.yaml preview [--db DB] [--out FILE]
OptionDescription
--dbAudit an installed database’s custom modules against the current base (read-only)
--outWrite the Markdown to a file instead of stdout

Create the database from the database selector at http://localhost:8000 (a database created through Fullfinity gets its own filestore), then install its apps:

Terminal window
docker compose exec fullfinity fullfinity -c /app/config.yaml -db newclient --init sales,crm --init-only
Terminal window
docker compose pull # the new image
docker compose stop fullfinity # keep new code from serving an unmigrated schema
docker compose run --rm fullfinity fullfinity -c /app/config.yaml -db production upgrade
docker compose up -d

upgrade is the whole migration: additive schema sync plus ledger replay (renames, deletes, complex/data migrations) in one atomic transaction. There is no separate step, and no version-keyed pre_upgrade/post_upgrade hooks — that mechanism has been retired. Back up first and pin the version you run — see Installation → Upgrading.

Terminal window
# Bring your updated module folders onto the server (e.g. git pull in your modules repository),
# then apply them to the database:
docker compose exec fullfinity fullfinity -c /app/config.yaml -db production -u my_module --init-only
# Restart so the workers load the new Python
docker compose restart fullfinity
Terminal window
# Scaffold module structure (run from a folder listed in MODULE_PATHS)
fullfinity-server -c config.yaml new custom_module
# Or create manually:
# mkdir -p modules/custom_module/{models,views,data,security,templates}
# Create manifest.yaml, models, views...
# Register the module
fullfinity-server -c config.yaml -db mycompany --update-module-list --init-only
# Install it
fullfinity-server -c config.yaml -db mycompany -i custom_module --init-only
Terminal window
# Make changes to module code
# Update the module to apply changes (view and data YAML; Python reloads with --reload)
fullfinity-server -c config.yaml -db dev -u mymodule --init-only
CodeMeaning
0Success
1General error
2Configuration error

FULLFINITY_CONFIG_PATH records the path to the config file so worker processes (Gunicorn/Uvicorn workers, the job runner) can load it. It is set automatically from the -c/--config flag — you normally don’t set it by hand. FULLFINITY_ENV (production, staging or test) marks the process as non-production, and wins over the config key of that name.

In the container image, any UPPERCASE environment variable (DB_HOST, MODULE_PATHS, …) overrides the config key of the same name: the image writes them into config.local.yaml on every start. Outside the image, configuration comes from config.yaml and its config.local.yaml overlay only. See Configuration.

OptionDescription
copy | verifyCopy local files into the configured backend, or check every attachment row resolves
statusWhich filestore prefix this database uses, and whether it owns it
forkGive a database copied in by Postgres a prefix of its own (it stays a copy). To take over the original’s files instead, use adopt --db
--db DBDatabase to act on (required)
--dry-runReport what would be copied, upload nothing