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.
Basic Usage
Section titled “Basic Usage”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:
docker compose exec fullfinity fullfinity -c /app/config.yaml -db mycompany -i sales --init-onlyThe examples below write the bare fullfinity-server -c config.yaml … form; prefix them the same
way.
Starting the Server
Section titled “Starting the Server”Basic Server Start
Section titled “Basic Server Start”fullfinity-server -c config.yamlThis starts the server using settings from config.yaml. The API will be available at http://localhost:8000 by default.
Start with Specific Database
Section titled “Start with Specific Database”fullfinity-server -c config.yaml -db mycompanyIn multi-tenant setups, use -db to specify which database to connect to.
Custom Host and Port
Section titled “Custom Host and Port”fullfinity-server -c config.yaml --host 127.0.0.1 --port 9000Override the default binding address and port.
Custom Worker Count
Section titled “Custom Worker Count”fullfinity-server -c config.yaml --workers 8Override the number of worker processes (default from config file).
Reload on Code Changes
Section titled “Reload on Code Changes”fullfinity-server -c config.yaml --reloadRestarts 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.
Module Management
Section titled “Module Management”All module operations require the -db flag to specify the target database.
Discover New Modules
Section titled “Discover New Modules”fullfinity-server -c config.yaml -db mycompany --update-module-listScans the module paths for new or updated modules and registers them in the database. Run this after adding new module folders.
Install Modules
Section titled “Install Modules”# Install single modulefullfinity-server -c config.yaml -db mycompany -i sales
# Install multiple modulesfullfinity-server -c config.yaml -db mycompany -i sales,invoicing,crm
# Long formfullfinity-server -c config.yaml -db mycompany --install sales,invoicingInstalls the specified modules and their dependencies. The installation process:
- Resolves module dependencies
- Runs database migrations
- Loads security groups and access rules
- Loads views, actions, and menus
- Loads seed data
Update Modules
Section titled “Update Modules”# Update specific modulesfullfinity-server -c config.yaml -db mycompany -u sales,invoicing
# Update all installed modulesfullfinity-server -c config.yaml -db mycompany -u all
# Long formfullfinity-server -c config.yaml -db mycompany --update allUpdates modules to apply changes:
- New or modified fields (runs schema migration)
- Updated views and actions
- New security rules
- Updated seed data
Uninstall Modules
Section titled “Uninstall Modules”fullfinity-server -c config.yaml -db mycompany --uninstall salesRemoves 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.
Downgrade to Free
Section titled “Downgrade to Free”fullfinity-server -c config.yaml -db mycompany --downgrade-to-free --init-onlyUninstalls 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.
Initialize Modules (New Database)
Section titled “Initialize Modules (New Database)”fullfinity-server -c config.yaml -db newcompany --init core,sales,invoicing --init-onlyCombines --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.
Module Operations Without Starting Server
Section titled “Module Operations Without Starting Server”fullfinity-server -c config.yaml -db mycompany -u all --init-onlyThe --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.)
Upgrades
Section titled “Upgrades”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:
fullfinity-server -c config.yaml -db mycompany -u all # or: ... upgradefullfinity-server -c config.yaml --all-databases upgrade # every database this deployment ownsNothing 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.
Consistency & Schema Commands
Section titled “Consistency & Schema Commands”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.
check — run the consistency gates
Section titled “check — run the consistency gates”Runs every build-time gate and exits 1 on any failure, so it can gate CI and pre-commit:
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 modulefullfinity-server -c config.yaml check --strict # views/templates gates: enforce the full anchor ruleset--only | Gate |
|---|---|
schema | the append-only field-surface contract (no renamed/removed/retyped field or Selection choice) |
views | view inheritance stability (hooks target stable anchors, never titles/positions) |
templates | report/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 |
refs | every stored reference — Q-domains, filter-groups, visible_setting, field-paths, model-names, report/email Jinja — resolves against the schema |
valkey | no module reaches past env.valstore into an engine-internal Valkey DB |
manifests | every module manifest has the required keys and a valid category |
number-guards | no record.<number> or 0 on a number that cannot be blank — only a nullable=True number can be (see Field types) |
money-tolerance | no 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) |
autoescape | every Jinja environment a module builds for its own templates escapes what it prints (autoescape=True) |
currency | money never crosses from one record to another unconverted, and every Monetary has a currency that cannot be left blank (see Monetary) |
outbound | every module file that opens a network connection says what it does in a copy of the database (see Live and Copy Databases) |
view-refs | every field a view names (bindings, widget props, Q-expressions) exists on its model |
filter-paths | every keyword path in a Python .filter() resolves against the schema |
follow-fields | every _follow_fields path names a field the module owns or depends on |
form-effects | no stored field is set only by a @Model.ui_effect (which runs on forms alone) |
calculated | no calculated field queries once per record |
workflow-locks | every model with a workflow status declares _controlled_edits |
setting-resolvers | a setting that promises to resolve automatically declares a resolver default |
security | every model has an access grant, every grant targets a real model, and portal/public grants are row-scoped |
menus | every menu leads somewhere the people who see it may go |
company-scope | nothing reads the company selection as “the current company” |
controllers | every controller extension names a real base and re-declares the routes it overrides |
datetime | no datetime.now() used as a timestamp (stored timestamps are UTC) |
i18n | user-facing text is translatable, and counted messages use plural forms |
integrations | every module in the Integrations catalogue carries a valid verification record |
help | help articles a module ships still match the screens they describe |
license | every Python file carries the license notice for its directory |
license-api, keys, secrets, lint | Fullfinity’s own release hygiene: no license checks in modules, signing keys in sync, no secrets in tracked config, correctness lint |
i18n-catalogs | every translation catalogue is complete (release time only) |
version-bump | the 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):
fullfinity-server -c config.yaml resolve # interactive promptsfullfinity-server -c config.yaml resolve --assume-renames # auto-record obvious renamesfullfinity-server -c config.yaml resolve --rename Task.due=deadline --delete Task.legacy_notefullfinity-server -c config.yaml resolve --snapshot --module acme # just (re)write the baselinepreview — upgrade transparency
Section titled “preview — upgrade transparency”Before upgrading a customer install, preview what a release breaks in their custom modules, or render the release changelog (details in Upgrade Transparency):
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 fileFilestore
Section titled “Filestore”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.
fullfinity-server -c config.yaml filestore copy --db mycompany --dry-runfullfinity-server -c config.yaml filestore copy --db mycompanyfullfinity-server -c config.yaml filestore verify --db mycompanycopy 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:
fullfinity-server -c config.yaml adopt --db restored # this REPLACES the originalfullfinity-server -c config.yaml adopt --db restored --status # live or a copy, and whyadopt 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:
pg_dump prod | psql staging # staging now points at prod's filesTwo 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:
fullfinity-server -c config.yaml filestore status --db staging # which prefix, and who owns itfullfinity-server -c config.yaml filestore fork --db staging # files of its ownfork 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.
Migrating from the old flags
Section titled “Migrating from the old flags”These verbs replaced the earlier artifact-named flags — there are no aliases, so update any scripts or pipelines:
| Old flag | New |
|---|---|
--check-schema | check --only schema |
--check-views (--strict-views) | check --only views (--strict) |
--check-references | check --only refs |
--check-valkey-access | check --only valkey |
--check-manifests | check --only manifests |
| (all gates at once) | check |
--resolve-schema (--rename/--delete/--complex/…) | resolve (same options) |
--snapshot-schema | resolve --snapshot |
--report / --report-out | preview --db / preview --out |
--changelog / --changelog-out | preview / preview --out |
Setting a Password
Section titled “Setting a Password”password — when nobody can sign in
Section titled “password — when nobody can sign in”./fullfinity-server -c config.yaml password --db mydb --email admin@example.comAsks 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.
Custom Module Paths
Section titled “Custom Module Paths”fullfinity-server -c config.yaml --module-path ./fullfinity/modules,./modules,/opt/modulesOverride the module search paths (the MODULE_PATHS config key). Fullfinity will scan all specified directories for modules.
Scaffolding a New Module
Section titled “Scaffolding a New Module”The new command scaffolds a module with the standard directory structure and sample files.
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 ./modulesThe 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 assetsThe 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:
fullfinity-server -c config.yaml -db mycompany -i my_module --init-onlyNote: new does not require the -db flag since no database access is needed.
Command Reference
Section titled “Command Reference”Global Options
Section titled “Global Options”| Option | Short | Description |
|---|---|---|
--config | -c | Path to configuration file (required) |
--database | -db | Target database name |
--help | -h | Show help message |
Server Options
Section titled “Server Options”| Option | Description |
|---|---|
--host | Host to bind to (default: 0.0.0.0) |
--port | Port to run on (default: 8000) |
--workers | Number of worker processes |
--reload | Restart workers when Python changes (development) |
--module-path | Comma-separated module directories |
Module Options
Section titled “Module Options”| Option | Short | Description |
|---|---|---|
--install | -i | Install modules (comma-separated) |
--update | -u | Update modules (comma-separated or “all”) |
--uninstall | Uninstall modules (comma-separated) | |
--downgrade-to-free | Uninstall every Enterprise app and its data (asks to confirm) | |
--yes | Confirm --downgrade-to-free without the prompt | |
--init | Initialize modules (update list + install) | |
--demo | Load demo data during --init or --install | |
--update-module-list | Scan for new modules | |
--all-databases | Run the module operation on every database this deployment owns (instead of -db) | |
--init-only | Exit after module operations |
Upgrade Subcommand
Section titled “Upgrade Subcommand”fullfinity-server -c config.yaml -db mycompany upgradeAlias for -u all: additive schema sync + atomic ledger replay. Requires -db.
New Subcommand
Section titled “New Subcommand”# Scaffold a new module (no -db required)fullfinity-server -c config.yaml new my_module [--path DIR]new options:
| Option | Description |
|---|---|
name | Module identifier (snake_case), e.g. my_module (positional) |
--path | Directory to create the module in (default: current directory) |
Test Subcommand
Section titled “Test Subcommand”# Run the whole suite — creates a self-cleaning ephemeral database automaticallyfullfinity-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:
| Option | Short | Description |
|---|---|---|
--module | -m | Only run tests for this module (omit to run all) |
--verbose | -v | Verbose output |
-k | Only run tests whose file, class or method name contains this pattern (case-insensitive); commas mean “either” | |
--shard | Run 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-summary | Write JSON test results to a file | |
--install-only | Install --module and its declared dependencies, then stop — no tests are collected or run. Succeeds if the install and view/security composition did. |
Check Subcommand
Section titled “Check Subcommand”# Run the consistency gates (no -db required)fullfinity-server -c config.yaml check [--only AREA] [--module ID] [--strict]| Option | Description |
|---|---|
--only | Run one gate (default: all except i18n-catalogs and version-bump); the gates are listed under check |
--module | Scope the check to a single module |
--strict | Views gate: enforce the full anchor ruleset |
Resolve Subcommand
Section titled “Resolve Subcommand”# Record a sanctioned schema change / re-snapshot baselines (no -db required)fullfinity-server -c config.yaml resolve [--snapshot] [--module ID] [decisions…]| Option | Description |
|---|---|
--snapshot | Just (re)generate the committed baselines from code (record no change) |
--module | Scope to a single module |
--assume-renames | Auto-record obvious single-candidate field renames |
--rename, --delete, --complex, --rename-choice, --clear-choice, --complex-choice, --rename-model, --delete-model | Declarative, repeatable decisions (non-interactive) |
--remove-anchor, --rename-anchor | Record a removed or renamed view anchor (Builder customizations targeting it are pruned, re-homed or rewritten on replay) |
Preview Subcommand
Section titled “Preview Subcommand”# Upgrade transparency: install audit (--db) or release changelog (no -db)fullfinity-server -c config.yaml preview [--db DB] [--out FILE]| Option | Description |
|---|---|
--db | Audit an installed database’s custom modules against the current base (read-only) |
--out | Write the Markdown to a file instead of stdout |
Common Workflows
Section titled “Common Workflows”Setting Up a New Tenant
Section titled “Setting Up a New Tenant”Create the database from the database selector at http://localhost:8000 (a database created
through Fullfinity gets its own filestore), then install its apps:
docker compose exec fullfinity fullfinity -c /app/config.yaml -db newclient --init sales,crm --init-onlyDeploying a Version Update
Section titled “Deploying a Version Update”docker compose pull # the new imagedocker compose stop fullfinity # keep new code from serving an unmigrated schemadocker compose run --rm fullfinity fullfinity -c /app/config.yaml -db production upgradedocker compose up -dupgrade 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.
Deploying Your Own Module Changes
Section titled “Deploying Your Own Module Changes”# 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 Pythondocker compose restart fullfinityAdding a Custom Module
Section titled “Adding a Custom Module”# 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 modulefullfinity-server -c config.yaml -db mycompany --update-module-list --init-only
# Install itfullfinity-server -c config.yaml -db mycompany -i custom_module --init-onlyDevelopment Workflow
Section titled “Development Workflow”# 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-onlyExit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Configuration error |
Environment Variables
Section titled “Environment Variables”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.
Filestore Subcommand
Section titled “Filestore Subcommand”| Option | Description |
|---|---|
copy | verify | Copy local files into the configured backend, or check every attachment row resolves |
status | Which filestore prefix this database uses, and whether it owns it |
fork | Give 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 DB | Database to act on (required) |
--dry-run | Report what would be copied, upload nothing |
Next Steps
Section titled “Next Steps”- Configuration - Configure your installation
- Quick Start - Create your first module
- Creating Modules - Module development guide