CLI Reference
The rescile-ce binary provides several subcommands for managing and serving your graph.
Synopsis:
rescile-ce [GLOBAL OPTIONS] <COMMAND>
Global Options
-d, --data-dir <DIR>: The root directory for your data files. Defaults to./data.--module <PATH_OR_URL>: Load a module. Can be used multiple times.--module-override <PATH>: Load a local module and replace the remote dependency it corresponds to — the local checkout is used instead of the git source. Matched by the module’s declared[module].url(before any fetch), or by the declared module name when no url is set (after the remote has been resolved). Can be used multiple times. Without this flag, a local module and a remote dependency declaring the same module name remain a hard error.--module-params <PARAMS>: Semicolon-separatedkey=valueparams available in all templates. Overridesdata/module_params.json(the file fills only keys not set here). For anything still unset, defaults resolve by precedence: local data-dirmodule.tomldefaults first, then module defaults by dependency topology (a dependency’s default overwrites its dependents’ — root/base modules win); unrelated modules with conflicting defaults require an explicit value.--debug-build[=<SELECTORS>]: Enable module/graph-build debug logging. Filter by passing a comma-separated selector list (e.g.network,bafin). No value enables full build tracing.--debug-runtime[=<LEVEL>]: Enable core runtime server/action logs (default level:debug).--debug-proxy[=<LEVEL>],--debug-vault[=<LEVEL>],--debug-graphql[=<LEVEL>],--debug-mcp[=<LEVEL>],--debug-runner[=<LEVEL>],--debug-auth[=<LEVEL>]: Enable debug logs for the named runtime component (default level:debug).--remove-orphaned-assets: Remove unconnected assets from the final graph.--writeonce-keys <KEYS>: Comma-separated property keys that avoid overwrites (default:created).--max-loop <N>: Max stabilization loop iterations (default:8).--git-client <CLIENT>: Git client (auto,gh,git,internal).--no-progress: Disable the interactive spinner and print plain log lines. Useful for CI pipelines or when copying output from the terminal.
Subcommands
init [PATH]
Initializes a new Rescile project workspace in the specified target path (defaults to the current directory or ./data). Scaffolds the standard directory hierarchy, writes data/module.toml and data/module.lock, and bootstraps starter assets and inputs in a single step.
--name <NAME>: Project name (defaults to target directory name).--from <URL_OR_PATH>: Upstream module to bootstrap from (Git URL, release archive URL, or local path). Its derived slug becomes the dependency key inmodule.toml.-m, --add-module <URL_OR_PATH>: Additional module dependencies to add and bootstrap. Can be specified multiple times.--branch <BRANCH>: Git branch to pin for the upstream module.--tag <TAG>: Git tag to pin for the upstream module.--bootstrap-policy <POLICY>: Default bootstrap policy (merge,append,once,replace,skip) for starter assets (default:merge).--no-gitignore: Skip generating the default.gitignorefile.--offline: Forbid network requests during module resolution and scaffolding.--no-progress: Disable interactive spinners/progress indicators (useful for CI).
See Bootstrapping a Project — Workspace Initialization for detailed examples.
serve
Builds the graph and starts the Web UI and GraphQL server.
--port <PORT>: Listening port (default: 7600).--listen <IP>: Listener IP address (default: 127.0.0.1).--agent-port <PORT>: Optional gRPC port for agent runners.--keep-action-logs <DAYS>: Number of days to persist action execution logs (default: 7). Use0to keep logs forever. Old log files are pruned on startup.--ctx-url-controller <URL>: Override the controller URL exposed in therescile_endpointstemplate parameter (env:RESCILE_CTX_URL_CONTROLLER).--ctx-url-mcp <URL>: Override the MCP URL exposed in therescile_endpointstemplate parameter (env:RESCILE_CTX_URL_MCP).--ctx-url-vault <URL>: Override the Vault URL exposed in therescile_endpointstemplate parameter (env:RESCILE_CTX_URL_VAULT).--init: Run the bootstrap step before serving (copy/merge starter files from loaded modules).--bootstrap-policy <POLICY>: Default bootstrap policy (once,append,merge,replace,skip) for assets that do not declare their own. Only used together with--init.--stable-schema: Preserve declared schema resource types in the GraphQL query root even when zero instances exist in the graph (default:true). Returns empty lists[]to keep client schemas stable. Use--no-stable-schemato dynamically omit empty resource collections.--write-outputs[=<DIR>]: Write rendered output artifacts that have afilenameproperty to<DIR>(defaults to the current working directory) after the initial build and, in--watchmode, after every reactive rebuild. Combine with--write-outputs-filter <PATTERN>to restrict which artifacts are synced (may be repeated). See Output filter patterns.
Output filter patterns
--output-filter and --write-outputs-filter accept patterns matched against the rendered filename property:
- Literal patterns (no
*,?,[) match as substrings, grep-style:--output-filter tfvarsselects every filename containingtfvars. - Glob patterns (containing
*,?, or[) match the full filename:*and?stay within a path component,**as a whole path segment crosses/, like shell pathname expansion.--output-filter 'terraform/**/*.tf'selects all Terraform files underterraform/;--output-filter '*.md'selects only top-level Markdown files. - Repeated flags combine with OR.
Invalid glob patterns (for example an unclosed [) are rejected with an error before the build runs.
save [FILE]
Builds the graph and optionally dumps the raw in-memory representation to a JSON file and/or exports rendered output artifacts to disk. Either FILE, --outputs, or both must be supplied.
FILE: Optional path for the JSON graph dump. When omitted, no graph JSON is written.--outputs[=<DIR>]: Export all rendered output resources that have afilenameproperty to<DIR>(defaults to the current working directory when the value is omitted).--output-filter <PATTERN>: Restrict the export to output artifacts whose renderedfilenamematches<PATTERN>(see Output filter patterns). May be repeated.--init: Run the bootstrap step before saving (copy/merge starter files from loaded modules).--bootstrap-policy <POLICY>: Default bootstrap policy (once,append,merge,replace,skip) for assets that do not declare their own. Only used together with--init.
# Backward-compatible graph-only save
rescile-ce save ./graph.json
# Export rendered outputs only
rescile-ce save --outputs ./dist
# Both graph dump and output export
rescile-ce save ./graph.json --outputs ./dist --output-filter .agents/skills
# Glob filter: all Terraform artifacts under terraform/
rescile-ce save --outputs ./dist --output-filter 'terraform/**/*.tf'
The same export capability is available in the other binaries:
rescile-ee saveaccepts the identical--outputsand--output-filterflags.rescile-ee serveaccepts--write-outputs[=<DIR>]and--write-outputs-filter <PATTERN>, exporting after the initial build and after every rebuild in--watchmode.rescile-importeraccepts--outputs[=<DIR>]and--output-filter <PATTERN>, exporting after the build (and after every rebuild in--watchmode) alongside--output-file.rescile-controlleraccepts--write-outputs[=<DIR>]and--write-outputs-filter <PATTERN>, exporting rendered artifacts whenever it loads a new artifact bundle. The rendered content is read from the prebuilt graph inside the bundle; no workspace is required.
diff <FILE>
Builds the current graph and compares its structure against an older, saved graph JSON file.
update [VERSION]
Checks for and safely installs in-place updates for rescile-ce.
generate-schema
Generates a .schema.json file from the local data dir module. Infers resources, properties, relations, and capabilities from assets, models, and action files.
[RESOURCES]: comma-separated list of resources to include.--output <FILE>: write the generated schema to a file (stdout if omitted).--schema-id <ID>: override schema id (default: module name).--schema-version <VERSION>: override schema version (default: module version).
See Schema Validation — Generating a Schema for details.
validate
Validates workspace structure, data, TOML and Jsonnet rules, action definitions, Canonical Rule IR, and central schema conformance. Bare validate runs all static categories (including the action contract check for exec placement and engine/exec compatibility). It checks the declared rescile_version constraint in module.toml against the running binary version and fails if incompatible. It does not build the graph or change workspace files.
# Full static validation
rescile-ce --data-dir ./data validate
# Strict static validation plus an in-memory graph build
rescile-ce --data-dir ./data validate --strict --build
# Validate only rule sources
rescile-ce validate --only rules
# Combine selected categories
rescile-ce validate --only rules --only schema
# Produce a CI report
rescile-ce validate --strict --format json --output validation.json
| Option | Behavior |
|---|---|
--only <workspace|data|rules|actions|schema|graph> |
Restricts checks. Repeat the option to select several categories. --only actions validates the action command contract (exec placement, engine/exec compatibility). --only graph enables graph construction. |
--target <PATH> |
Validates one TOML/Jsonnet rule file or uses a directory as workspace root. A file target selects rule validation automatically. |
--schema <URL_OR_PATH> |
Uses only supplied schema sources and ignores schema declarations from module.toml. May be repeated. |
--strict |
Enables deep schema value checks and makes warnings fatal. |
--build |
Adds an in-memory graph build. It does not write graph files or run data generators. Materialize required generated inputs before validation. |
--format <human|json> |
Selects human output or a stable JSON report. |
--output <FILE> |
Writes output to a file. Validation reports require --format json; IR rendering is always JSON. |
--render-ir |
Validates rules, then emits normalized Canonical Rule IR. Use --target to inspect one file. |
--render-ir-schema |
Emits the Canonical Rule IR JSON Schema without validating a workspace. |
Rendering modes are standalone: --render-ir cannot be combined with --only, --build, --schema, or --strict; --render-ir-schema also excludes --target.
IR inspection uses validation flags rather than mod because mod is reserved for dependency and lockfile management:
rescile-ce validate --render-ir
rescile-ce validate --render-ir --target models/service_profiles.jsonnet
rescile-ce validate --render-ir-schema
rescile-ee validate accepts the same arguments. Human output uses service logging; JSON and IR output remain suitable for pipelines.
See Schema Validation and Jsonnet Models for details.
mod <add|sync|lock|check|update|fetch>
Module dependency and starter asset management commands:
mod add <NAME> <URL>: Add dependency tomodule.tomland update lockfile. Use--syncto copy/merge starter assets immediately.mod sync: Synchronize starter asset CSVs and JSON inputs from declared module dependencies (supports--diff,--force,--module <NAME>,--bootstrap-policy <POLICY>).mod lock: Resolves the dependency graph and updatesmodule.lock.mod update [NAME]: Updates dependencies to latest remote revisions matching constraints.mod check: Checks whether updates are available on remote repositories.
See Module Dependencies.