Skip to content

Command line ​

There are two executables: the project generator and the app you build. Run app commands through Cargo during development or directly through the compiled binary in production.

Create an app ​

sh
cargo install rxferrix-cli
rxferrix new my-app
rxferrix new my-svelte-app --web svelte
rxferrix new my-backend --web none
OptionMeaning
--name NAMESet the Cargo package and binary name instead of using the directory name.
--web react|svelte|noneSelect a frontend; defaults to React.
--publishedUse crates.io and npm even if the generator was built from a local checkout.
--rxferrix-path DIRUse another framework checkout; requires its client packages to be built and Bun available for packing.

The target directory must be absent or empty. Names start with an ASCII letter and contain letters, digits, -, or _. --published and --rxferrix-path are mutually exclusive.

Develop with rebuilds ​

From the directory containing your app's Cargo.toml:

sh
rxferrix dev
rxferrix dev -- --http 127.0.0.1:9000 --dir dev_data

rxferrix dev builds the app and runs cargo run -- serve --dev. It watches the app's Rust sources and Cargo.toml, plus those of local crates the app builds with (workspace members and path dependencies). On a change it rebuilds; when the build succeeds, it stops the server (as Ctrl+C would) and starts the new version. The old server keeps serving while the new version compiles and after a failed build. Clients reconnect on their own, and every start regenerates the client API when a codegen directory is configured.

Only .rs files and Cargo.toml changes trigger rebuilds. Tests, benches, and examples are not watched.

OptionMeaning
-p, --package NAMERun this package of a workspace (cargo run --package).
--bin NAMERun this binary of a package with several (cargo run --bin).
--releaseBuild with optimizations.
-- SERVE_ARGSPass further options to serve --dev.

Run your app ​

From the directory containing your app's Cargo.toml:

sh
cargo run -- serve --dev
cargo run -- functions
cargo run -- codegen --out web/src/rxferrix
cargo run -- --help
cargo run -- serve --help

For a compiled app, replace cargo run -- with its path, such as ./target/release/my-app.

CommandPurposeCan run beside a running server?
serveOpen the data directory and serve the app.Use --takeover to replace the active server.
functionsList registered functions and signatures.Yes.
codegen --out DIRGenerate TypeScript references and types.Yes.
check --dir DIROpen a temporary copy with the new code and validate it.Yes.
backup --dir DIRCreate a consistent archive.Yes.
export --dir DIRExport a consistent snapshot.Yes.
restore --dir DIR ARCHIVEValidate and restore an archive.No.
import --dir DIR PATHImport JSONL or CSV.No.
migrate --dir DIRRun pending migrations.No; use the dashboard or serve --migrate while serving.
migrate status --dir DIRShow migration progress offline.No; use the dashboard while serving.
env list, env set NAME [VALUE], env unset NAMEManage app variables offline.No; use the dashboard while serving.
admin create EMAILCreate a dashboard administrator.No; a running server prints a setup link for the first one.
admin reset-password EMAILReset an administrator's password.No; stop the server first.
admin disable-2fa EMAILRemove a lost administrator second factor.No; stop the server first.
health [URL]Exit successfully when the health endpoint responds. The URL defaults to RXFERRIX_HEALTH_URL, then http://127.0.0.1:8090/api/health.Yes.

Run a command's --help for its full options. Always pass the same --dir used by serve; otherwise commands use fx_data relative to their working directory.

Common server options ​

OptionDefault or behavior
--dir DIRfx_data
--http ADDRESS127.0.0.1:8090
--devDetailed client errors and development-only functions.
--codegen-out DIRWith --dev, generate the API at startup; otherwise use RXFERRIX_CODEGEN_OUT if set.
--public-url URLPublic backend URL for links and OAuth callbacks.
--auth-redirect-url URLAllowed frontend auth return URL; repeatable.
--migrateRun pending migrations in the background after startup.
--takeover[=require|auto]Replace the server using the same data directory.
--fsync-commits[=false]Wait for disk durability before acknowledging commits (default on; =false turns it off).
--metricsExpose Prometheus metrics at /metrics.
--backup-every 6hEnable scheduled backups.
--replicate-to LOCATIONEnable continuous replication.
--olapEnable the analytics copy; also requires the olap Cargo feature.

codegen defaults to RXFERRIX_CODEGEN_OUT, then rxferrix-generated. serve --dev generates only when --codegen-out or RXFERRIX_CODEGEN_OUT supplies a directory. Generated web projects set that variable in .cargo/config.toml.

Storage, TLS, proxy, timeout, cache, and retention options are documented in the relevant guides and operations pages. serve --help is the complete flag list for the version you built.