CLI Reference
Installing Ciaren (pip install ciaren, or pip install -e . from a source
checkout) adds the ciaren command, which runs and configures the server. It
uses only the standard library, so it needs nothing extra.
ciaren --help
ciaren --versionciaren serve
Run the API server, the editor, and the background scheduler in one process, with no broker or extra services. This is the recommended way to start Ciaren.
ciaren serve
ciaren serve --port 8001 --reload
ciaren serve --engine pandas --execution-mode process
ciaren serve --no-scheduler| Flag | Default | Description |
|---|---|---|
--host | 127.0.0.1 | Bind host |
--port | 8055 | Bind port |
--reload | off | Auto-reload on code changes (development only) |
--db-url | None | Async database URL; overrides CIAREN_DATABASE_URL |
--data-dir | None | Uploads/outputs directory; overrides CIAREN_DATA_DIR |
--engine | None | Default engine polars | pandas; overrides CIAREN_DEFAULT_ENGINE |
--execution-mode | None | thread | process; overrides CIAREN_EXECUTION_MODE |
--log-level | None | uvicorn log level (critical…trace) |
--no-scheduler | off | Start the API without the background scheduler |
--no-demo | off | Skip seeding the built-in Demo project on first boot |
--run-seed-flows | off | Run every newly seeded demo flow once after first-boot seeding |
--env-file | None | Load environment variables from this file before resolving settings |
Flags become the matching environment variables before the app loads, so they
win over your .env file and the shell.
Pointing at a specific env file
By default Ciaren reads ./.env. Use --env-file to load a different file
(for example a per-environment config) before settings are resolved:
ciaren serve --env-file /etc/ciaren/production.envPrecedence is flags > environment variables already set in your shell >
--env-file > defaults, so the file never overrides what you exported. The same
flag works on ciaren info, ciaren check, and ciaren db, which lets you inspect
or validate a specific config:
ciaren info --env-file /etc/ciaren/production.env
ciaren check --env-file /etc/ciaren/production.envciaren init
Write a commented starter .env to get going quickly.
ciaren init # writes ./.env
ciaren init --path .env.local
ciaren init --force # overwrite an existing file
ciaren init --no-ml # skip provisioning the default local MLflow directoryciaren info
Print the resolved configuration the server would use, with the database password redacted. It shows the environment-level result only: values overridden on the Settings page live in the database and win once the server is running.
ciaren infoCiaren resolved configuration:
environment development
database_url sqlite+aiosqlite:///./ciaren.db
data_dir /path/to/.data
default_engine polars
execution_mode thread
scheduler_enabled True
...ciaren check
Validate the environment and exit non-zero on failure, which suits setup scripts and CI. It checks that:
- the data directory is writable,
- the database URL uses an async driver,
- the database is reachable,
- the dataframe engines are importable,
- the ML libraries import when ML is enabled, and
- (Windows) the MLflow tracking path is short enough to log models under the
260-character path limit; see the
ml_pathline below.
ciaren check[ok] data_dir: /path/to/.data
[ok] async_driver: sqlite+aiosqlite:///./ciaren.db
[ok] database: reachable
[ok] engines: pandas, polars
[ok] ml: enabled, tracking=./mlruns
All checks passed.Windows MLflow path check
On Windows without long-path support, a deeply nested mlruns directory can push
MLflow's model-artifact paths past the 260-character limit, and a training node
then fails because the model cannot be saved. When the tracking store is a local
folder, ciaren check adds an ml_path line: [ok] when the path has room, or
a non-fatal [warn] telling you to enable long paths or set a shorter
CIAREN_MLFLOW_TRACKING_URI. See
Troubleshooting.
Both info and check accept --output json for scripting and CI:
ciaren info --output json
ciaren check --output json # {"ok": true, "checks": [...]}; exit 1 on failureciaren db
Manage the database schema through Alembic migrations, which version the schema and apply changes in order on SQLite, PostgreSQL, and MySQL.
ciaren db upgrade # apply all migrations up to the latest revision
ciaren db upgrade --revision <id>
ciaren db current # show the revision the database is stamped at
ciaren db reset --yes # DROP every table and rebuild from migrations| Subcommand | Description |
|---|---|
upgrade | Apply migrations up to --revision (default head). Safe to re-run. |
current | Print the revision the database is currently at. |
reset | Destructive. Drop all tables and rebuild. Requires --yes; refuses when CIAREN_ENVIRONMENT=production unless --force. |
All three accept --env-file so you can target a specific environment's config.
Upgrading an existing database is safe
ciaren serve creates any missing tables on startup, so an existing
Ciaren database has the full schema but no migration history. The first
ciaren db upgrade detects this and adopts the schema (records the
current revision) instead of trying to re-create existing tables, so adopting
Alembic never destroys or rewrites your data. From then on, upgrades apply only
the new migrations.
`db reset` deletes all data
reset drops every table. It exists for local development and test
environments. It refuses to run in production unless you pass --force.
Deploy flow
- Set
CIAREN_DATABASE_URLto your async PostgreSQL or MySQL URL. - Run
ciaren db upgradeon each deploy, before you start the app. - Start the server with
ciaren serve.
ciaren transformations
List the transformation node types the engine supports, the same set the editor offers.
ciaren transformations list
ciaren transformations list --output json66 transformation node types:
assertExpression inputs=1
assertNotNull inputs=1
assertRowCount inputs=1
...ciaren flow
Validate and migrate .flow document files, the portable,
versioned description of a flow. In CI, this catches a malformed or outdated file
before you import it.
ciaren flow validate project.flow # schema + graph structure
ciaren flow validate project.flow --output json
ciaren flow migrate project.flow # print the document migrated to the current schema version
ciaren flow migrate project.flow --to 1.0.0 # target a specific schema version instead of the latest
ciaren flow migrate project.flow --write # write back (keeps a .bak)| Subcommand | Description |
|---|---|
validate | Validate document shape and graph structure. Exits non-zero (and prints INVALID) on failure. |
migrate | Migrate to a newer schema version (default: the latest this build supports; --to VERSION targets a specific one). Prints to stdout unless --write. |
migrate --write saves a .bak copy of the original next to the file before it
writes the migrated version.
ciaren secret
Manage connection secrets in the OS keychain (Windows Credential Manager, macOS Keychain, or Secret Service on Linux desktops), the recommended secret source on a desktop install. Keychain support is part of the base install.
ciaren secret set pg-main # prompts for the value (hidden, confirmed)
ciaren secret unset pg-main # removes it from the keychainHeadless servers and containers have no keychain daemon; use env: or
file: references there.
A connection's secret field refers to the stored secret as keyring:pg-main.
The value never touches Ciaren's database, the API, or your shell history. See
Connection secrets for the three reference types
(env:, keyring:, file:).
Plugin tooling: ciaren-plugin
Installing, inspecting, and signing plugins is a separate command,
ciaren-plugin, installed with the same package. See the
Plugin CLI Reference for every subcommand and
Packaging & Distribution for the publishing
workflow.
ciaren-plugin list # discovered plugins + status
ciaren-plugin install my-plugin.ciarenplugin # verify + install
ciaren-plugin enable acme.mypluginRunning the old ciaren plugin ... form prints a pointer to the new command.
Environment variables
Every setting is a CIAREN_* environment variable, read from the shell or a
.env file in the directory you run the command from. Each variable, with its
default, is in the Configuration Reference.
Advanced Setup explains which source wins.
Async driver required
CIAREN_DATABASE_URL must use an async driver: sqlite+aiosqlite://,
postgresql+asyncpg://, or mysql+aiomysql://. ciaren check flags a
non-async URL.
See also
- Installation: first-time setup
- Engines:
--engine,--execution-mode, run timeouts - Scheduling: the background scheduler
- Run the assistant on a server: server-side assistant configuration