| name | cyberfabric |
|---|---|
| description | cli reference to help with the development of cyberfabric framework. It helps with the development of the framework from its initialization, adding/removing modules, modifying configuration files, build and/or run project and deploy them. |
This document summarizes the CLI implemented under crates/cli/src.
It focuses on:
- [command surface] Every top-level command and nested subcommand
- [arguments] The supported flags and positional arguments
- [purpose] What each command is meant to do
- [examples] Realistic usage patterns
The crate exposes a single entrypoint:
- [
cargo cyberfabric] Cargo subcommand form via thecargo-cyberfabricbinary
Example:
cargo cyberfabric init /tmp/my-appThis CLI is a tool for automating cyberfabric development, a Rust framework. You can get more information about it in:
- CyberFabric repository main: https://github.com/cyberfabric/cyberfabric-core
- Modkit libraries(the ones that leverage this CLI tool) are located in https://github.com/cyberfabric/cyberfabric-core/tree/main/libs
- More documentation of the project will be located in https://github.com/cyberfabric/cyberfabric-core/tree/main/docs
Clone(shallow) the repo to .cyberfabric folder (create it if it doesn't exist), and use it as a reference.
cargo cyberfabric
├── init
├── mod
│ └── add
├── config
│ ├── mod
│ │ ├── list
│ │ ├── add
│ │ ├── db
│ │ │ ├── add
│ │ │ ├── edit
│ │ │ └── rm
│ │ └── rm
│ └── db
│ ├── add
│ ├── edit
│ └── rm
├── docs
├── lint
├── test
├── tools
├── run
├── build
└── deploy
- [
-p, --path <PATH>] Optional workspace path. When provided toconfig ...,build,run,deploy, andlint, the CLI immediately changes the current working directory to this directory. Relative config paths, generated project locations, and workspace-scoped lint resolution then resolve from that directory. When omitted, the current working directory is left unchanged. - [
-c, --config <PATH>] Config file path. This is required forconfig ...,build,run, anddeploycommands because there is no default. Forbuildandrun, the CLI forwards this path to the generated server through theCF_CLI_CONFIGenvironment variable. - [
--name <NAME>] Forbuildandrun, overrides the generated server project and binary name that would otherwise default to the config filename stem. - [
-v, --verbose] Usually enables more logging or richer output. - [name validation] Config-managed names for modules, DB servers, and generated server names only allow letters,
numbers,
-, and_.
From the current implementation, the CLI is mainly for:
- [workspace scaffolding] Initialize a CyberFabric workspace and add module templates
- [config management] Enable modules and patch YAML config sections
- [server generation] Generate a runnable Cargo project under
.cyberfabric/<name>/ - [build/run/deploy] Build, run, or package that generated server as a Docker image
- [source inspection] Resolve Rust source for crates/items through workspace metadata or crates.io
- [tool bootstrap] Install or upgrade
rustup,cargofmt, andclippy
Initialize a new project from the default CyberFabric template repo or a local template.
Synopsis:
cargo cyberfabric init <path> [--verbose] [--name <NAME>] [--local-path <PATH>] [--git <URL>] [--subfolder <NAME>] [--branch <NAME>]Arguments:
- [
<path>] Target directory to initialize - [
-v, --verbose] Verbose output fromcargo-generate - [
-n, --name <NAME>] Override the generated project name; inferred from the final path segment by default - [
--local-path <PATH>] Use a local template directory instead of Git - [
--git <URL>] Template Git URL, defaults tohttps://github.com/cyberfabric/cf-template-rust - [
--subfolder <NAME>] Template subfolder, defaults toInit - [
--branch <NAME>] Git branch, defaults tomain
Behavior:
- [creates target directory] If it does not exist
- [fails on file path] Errors if
<path>already exists and is not a directory - [uses directory name as project name] The final path segment becomes the generated project name unless
--nameis provided - [forces git init] Template generation runs with Git initialization enabled
Examples:
cargo cyberfabric init /tmp/cf-democargo cyberfabric init /tmp/cf-demo --git https://github.com/cyberfabric/cf-template-rust --branch main --subfolder Initcargo cyberfabric init /tmp/cf-demo --local-path ~/dev/cf-template-rustScaffolds workspace content from templates.
Generate a module template inside an existing workspace's modules/ directory and wire Cargo workspace dependencies.
Synopsis:
cargo cyberfabric mod add [--path <PATH>] [--verbose] [--local-path <PATH>] [--git <URL>] [--subfolder <NAME>] [--branch <NAME>] <template>Available templates:
- [
background-worker] Background worker module template - [
api-db-handler] API/database handler module template - [
rest-gateway] REST gateway module template
Arguments:
- [
<template>] One of the three value-enum names above - [
-p, --path <PATH>] Workspace root, defaults to. - [
-v, --verbose] Verbose template generation output - [
--local-path <PATH>] Local template root instead of Git - [
--git <URL>] Template repo URL, defaults tohttps://github.com/cyberfabric/cf-template-rust - [
--subfolder <NAME>] Template subfolder root, defaults toModules - [
--branch <NAME>] Template branch, defaults tomain
Behavior:
- [requires
modules/] Fails unless<workspace>/modulesalready exists - [creates
modules/<template>] The generated module name matches the template name - [prevents duplicates] Fails if that module directory already exists
- [updates workspace members] Adds generated modules to
workspace.members - [promotes dependencies] Moves new module dependency source/version metadata into
workspace.dependencies - [rewrites module Cargo files] Rewrites module dependencies to
workspace = true - [inherits workspace lints] Adds
lints.workspace = trueto generated modules if needed - [includes SDK crate when present] If the generated module contains
sdk/, it is also added as a workspace member
Examples:
cargo cyberfabric mod add background-worker -p /tmp/cf-democargo cyberfabric mod add rest-gateway -p /tmp/cf-demo --verbosecargo cyberfabric mod add api-db-handler -p /tmp/cf-demo --local-path ~/dev/cf-template-rust --subfolder ModulesManages the YAML application config file used by build and run.
There are two branches:
- [
config mod ...] Module configuration - [
config db ...] Global database server configuration
Manage the modules section in the app config.
List workspace modules, configured modules, and optionally known system crates.
Synopsis:
cargo cyberfabric config mod list -c <CONFIG> [-p <PATH>] [--system] [--verbose] [--registry <REGISTRY>]Arguments:
- [
-c, --config <CONFIG>] Required config file path - [
-p, --path <PATH>] Optional workspace directory - [
-s, --system] Also print built-in system registry modules - [
-v, --verbose] Print full metadata - [
--registry <REGISTRY>] Registry used only for verbose system lookups, defaults tocrates.io
Behavior:
- [discovers local modules] Scans the workspace for module crates
- [loads configured modules] Reads enabled modules from the config file
- [path activation] If
-p/--pathis provided, the CLI first changes the current working directory there before resolving-c/--config - [marks enabled locals] Shows when a workspace module is enabled in config
- [shows missing locals] Shows when a configured module is not present in the workspace
- [optional crates.io fetch] If both
--systemand--verboseare used, the CLI fetches registry metadata andsrc/module.rsdetails from crates.io - [registry support] Only
crates.iois currently supported
Built-in system module names:
- [
credstore] - [
file-parser] - [
api-gateway] - [
authn-resolver] - [
static-authn-plugin] - [
authz-resolver] - [
static-authz-plugin] - [
grpc-hub] - [
module-orchestrator] - [
nodes-registry] - [
oagw] - [
single-tenant-tr-plugin] - [
static-tr-plugin] - [
tenant-resolver] - [
types-registry]
Examples:
cargo cyberfabric config mod list -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.ymlcargo cyberfabric config mod list -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --systemcargo cyberfabric config mod list -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --system --verboseAdd or update a module entry in the config file's modules section.
Synopsis:
cargo cyberfabric config mod add -c <CONFIG> [-p <PATH>] [--package <NAME>] [--module-version <VER>] [--default-features <BOOL>] [-F, --feature <FEATURES>]... [--dep <NAME>]... <module>Arguments:
- [
<module>] Module name in the config - [
-c, --config <CONFIG>] Required config file path - [
-p, --path <PATH>] Optional workspace directory - [
--package <NAME>] Override metadata package name - [
--module-version <VER>] Override metadata version - [
--default-features <BOOL>] Persist Cargodefault_features - [
-F, --feature <FEATURES>] Feature list; accepts comma-separated values and can be repeated - [
--dep <NAME>] Metadata dependency name; repeat to add more
Behavior:
- [upsert] Creates or updates
modules.<module> - [path activation] If
-p/--pathis provided, Clap changes the current working directory while parsing that value, before-c/--configis resolved - [local-first discovery] Tries to discover module metadata from the workspace
- [remote module support] If the module is not local, you must provide both
--packageand--module-version - [portable metadata] Local filesystem paths are intentionally not persisted into config metadata
- [merge semantics] Existing metadata fields are preserved unless you explicitly override them
- [metadata requirements] Package and version are required in the resulting metadata, whether sourced locally or passed explicitly
Examples:
cargo cyberfabric config mod add background-worker -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.ymlcargo cyberfabric config mod add rest-gateway -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml -F json,metrics -F tracing --dep authn-resolver --dep tenant-resolvercargo cyberfabric config mod add credstore -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --package cf-credstore --module-version 0.4.2cargo cyberfabric config mod add api-db-handler -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --default-features falseRemove a module from the config file's modules section.
Synopsis:
cargo cyberfabric config mod rm -c <CONFIG> [-p <PATH>] <module>Behavior:
- [path activation] If
-p/--pathis provided, Clap changes the current working directory while parsing that value, before-c/--configis resolved - [strict removal] Fails if the module is not present in config
Example:
cargo cyberfabric config mod rm background-worker -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.ymlManage module-level database config under modules.<module>.database.
Subcommands:
- [
add] Add or patch a module DB config - [
edit] Edit an existing module DB config - [
rm] Remove a module DB config
Shared DB flags:
- [
--engine <postgres|mysql|sqlite>] - [
--dsn <DSN>] - [
--host <HOST>] - [
--port <PORT>] - [
--user <USER>] - [
--password <PASSWORD>] - [
--dbname <NAME>] - [
--params <K=V,...>] - [
--sqlite-file <FILE>] - [
--sqlite-path <PATH>] - [
--pool-max-conns <N>] - [
--pool-min-conns <N>] - [
--pool-acquire-timeout-secs <SECS>] - [
--pool-idle-timeout-secs <SECS>] - [
--pool-max-lifetime-secs <SECS>] - [
--pool-test-before-acquire <BOOL>] - [
--server <NAME>] Reference a named global DB server
Rules:
- [path activation] If
-p/--pathis provided, each subcommand changes the current working directory while Clap is parsing that value, before-c/--configis resolved - [payload required]
addandeditrequire at least one DB-related field - [module must exist]
addrequires the module already exist in config and recommendsconfig mod addfirst - [edit requires existing DB config]
editfails if no module DB config exists yet - [patch semantics]
addandeditpatch only the fields you provide
Examples:
cargo cyberfabric config mod db add background-worker -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --server primarycargo cyberfabric config mod db add api-db-handler -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --engine postgres --host localhost --port 5432 --user app --password '${DB_PASSWORD}' --dbname appdb --pool-max-conns 20cargo cyberfabric config mod db edit api-db-handler -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --pool-acquire-timeout-secs 30 --pool-test-before-acquire truecargo cyberfabric config mod db rm api-db-handler -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.ymlManage global database server config under database.servers.
Subcommands:
- [
add] Add or upsert a named global DB server - [
edit] Edit an existing global DB server - [
rm] Remove an existing global DB server
Synopsis:
cargo cyberfabric config db add -c <CONFIG> [-p <PATH>] <name> <db-flags...>
cargo cyberfabric config db edit -c <CONFIG> [-p <PATH>] <name> <db-flags...>
cargo cyberfabric config db rm -c <CONFIG> [-p <PATH>] <name>Behavior:
- [path activation] If
-p/--pathis provided, each subcommand changes the current working directory while Clap is parsing that value, before-c/--configis resolved - [server name] Stored under
database.servers.<name> - [add is upsert]
addcreates or patches an existing server entry - [edit is strict]
editrequires the server to already exist - [payload required]
addandeditrequire at least one DB-related field - [cleanup]
rmremoves the top-leveldatabasesection if it becomes empty andauto_provisionis unset
Examples:
cargo cyberfabric config db add primary -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --engine postgres --host localhost --port 5432 --user app --password '${DB_PASSWORD}' --dbname appdbcargo cyberfabric config db edit primary -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --pool-max-conns 30 --pool-idle-timeout-secs 120cargo cyberfabric config db add local-sqlite -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --engine sqlite --sqlite-path /tmp/cf-demo/dev.dbcargo cyberfabric config db rm primary -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.ymlResolve Rust source for a crate/module/item query from local workspace metadata, the local docs cache, or crates.io.
Synopsis:
cargo cyberfabric docs [--path <PATH>] [--registry <REGISTRY>] [--verbose] [--libs] [--version <VERSION>] [--clean] [<query>]Arguments:
- [
-p, --path <PATH>] Workspace or crate to inspect, defaults to. - [
--registry <REGISTRY>] Registry fallback, defaults tocrates.io - [
-v, --verbose] Print resolution metadata before the source - [
-l, --libs] Printlibrary_name -> package_namemappings for a package query instead of source - [
--version <VERSION>] Resolve a specific crate version after metadata/cache lookup misses - [
--clean] Remove the docs cache for the selected registry before resolving - [
[<query>]] Rust path to resolve, starting with the package name; omitted only when--cleanis used by itself
Supported query examples:
- [
cf-modkit] - [
tokio::sync] - [
cf-modkit::gts::plugin::BaseModkitPluginV1] - [
cf-modkit::gts::schemas::get_core_gts_schemas]
Behavior:
- [query requirement] A query is required unless
--cleanis passed by itself - [package-only libs mode]
--libsrequires a package-only query such ascf-modkit - [local resolution first] Tries workspace metadata before hitting the network
- [cache-first registry fallback] Reuses cached crate sources before downloading from the registry
- [crates.io fallback] Downloads and extracts crate source if local resolution and cache lookup both fail
- [exact version fallback]
--versionpins the registry/cache fallback to that exact crate version - [recursive re-export resolution] Follows re-exports across
crate,self,super, and dependency boundaries until it reaches the final source - [library mapping output]
--libsprints the Rust source-code library name on the left and the Cargo package name on the right, including renamed dependencies likemodkit_macros -> cf-modkit-macros - [cache location] Registry sources are cached under the OS temp directory in
cyberfabric-docs-cache/<registry>/ - [cache cleaning]
--cleanremoves the selected registry cache before resolution - [source output] Prints the resolved Rust source to stdout
- [verbose metadata] Also prints query, package, library, version, manifest path, and source path
- [registry support] Only
crates.iois supported today
Examples:
cargo cyberfabric docs -p /tmp/cf-demo cf-modkitcargo cyberfabric docs cf-modkit::modulecargo cyberfabric docs --verbose tokio::synccargo cyberfabric docs --libs cf-modkitcargo cyberfabric docs --version 1.0.217 serde::de::Deserializecargo cyberfabric docs --cleancargo cyberfabric docs --clean -p /tmp/cf-demo tokio::syncInstall or upgrade a small set of Rust tooling dependencies.
Known tool names:
- [
rustup] - [
cargofmt] Installs therustfmtrustup component - [
clippy]
Synopsis:
cargo cyberfabric tools (--all | --install <tool,...>) [--upgrade] [--yolo] [--verbose]Arguments:
- [
-a, --all] Select all known tools - [
--install <tool,...>] Comma-separated tool names - [
-u, --upgrade] Upgrade instead of initial install - [
-y, --yolo] Skip confirmation prompts - [
-v, --verbose] Show subprocess output
Behavior:
- [selection required] You must pass either
--allor--install - [interactive by default] Without
--yolo, the command prompts before installing/upgrading - [rustup bootstrap] If
rustupis missing, the CLI can attempt to install it - [component installs]
cargofmtandclippyare installed throughrustup component add - [upgrade mode] Selected
rustupupgrades viarustup self update; selected components upgrade viarustup update
Examples:
cargo cyberfabric tools --allcargo cyberfabric tools --install clippy,cargofmt --yolocargo cyberfabric tools --install rustup,clippy --upgrade --verboseGenerate a server project under .cyberfabric/<name>/ and run it.
Synopsis:
cargo cyberfabric run -c <CONFIG> [-p <PATH>] [--name <NAME>] [--watch] [--otel] [--fips] [--release] [--clean]Arguments:
- [
-c, --config <CONFIG>] Required config file path - [
-p, --path <PATH>] Optional workspace directory - [
--name <NAME>] Override the generated server project and binary name; defaults to the config filename stem - [
-w, --watch] Re-run when watched inputs change - [
--otel] Pass Cargo featureotel - [
--fips] Pass Cargo featurefips - [
-r, --release] Use release mode - [
--clean] Remove.cyberfabric/<name>/Cargo.lockbefore running
Behavior:
- [name resolution] Uses the config filename stem by default, so
config/quickstart.ymlgenerates under.cyberfabric/quickstart/;--nameoverrides that default - [path activation] If
-p/--pathis provided, Clap changes the current working directory while parsing that value, before-c/--configis resolved and.cyberfabric/<name>/is generated - [generates server structure] Writes
.cyberfabric/<name>/Cargo.toml,.cyberfabric/<name>/.cargo/config.toml, and.cyberfabric/<name>/src/main.rs - [runtime config handoff] The generated
src/main.rsreads the config path fromCF_CLI_CONFIG, andcargo cyberfabric runsets that environment variable automatically before invokingcargo run - [loads config dependencies] Builds dependencies from the config and local module metadata
- [feature passthrough]
--oteland--fipsenable the generated project's matching Cargo features - [runs inside
.cyberfabric/<name>] Executescargo runin the generated directory - [watch mode] Restarts on config changes, workspace
Cargo.tomlchanges, and changes in path-based dependencies - [dependency watch management] Reconciles watched dependency paths when config dependencies change
- [manual generated-project execution] If you invoke the generated project or compiled binary yourself instead of
using
cargo cyberfabric run, you must setCF_CLI_CONFIGmanually
Examples:
cargo cyberfabric run -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.ymlcargo cyberfabric run -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --watchcargo cyberfabric run -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --otel --fips --release --cleancargo cyberfabric run -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --name demo-serverGenerate a server project under .cyberfabric/<name>/ and build it.
Synopsis:
cargo cyberfabric build -c <CONFIG> [-p <PATH>] [--name <NAME>] [--otel] [--fips] [--release] [--clean]Arguments:
- [
-c, --config <CONFIG>] Required config file path - [
-p, --path <PATH>] Optional workspace directory - [
--name <NAME>] Override the generated server project and binary name; defaults to the config filename stem - [
--otel] Pass Cargo featureotel - [
--fips] Pass Cargo featurefips - [
-r, --release] Use release mode - [
--clean] Remove.cyberfabric/<name>/Cargo.lockbefore building
Behavior:
- [generates before build] Recreates the generated server project before invoking Cargo
- [name resolution] Uses the config filename stem by default, so
config/quickstart.ymlbuilds from.cyberfabric/quickstart/;--nameoverrides that default - [path activation] If
-p/--pathis provided, Clap changes the current working directory while parsing that value, before-c/--configis resolved and.cyberfabric/<name>/is generated - [feature passthrough]
--oteland--fipsenable the generated project's matching Cargo features - [builds inside
.cyberfabric/<name>] Executescargo buildin the generated directory - [runtime config source] The generated server no longer embeds the config path; the resulting binary reads it from
CF_CLI_CONFIGwhen you execute it - [manual generated-project execution] If you later run the generated project or binary outside the CLI, you must
set
CF_CLI_CONFIGyourself
Examples:
cargo cyberfabric build -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.ymlcargo cyberfabric build -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --releasecargo cyberfabric build -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --otel --fips --cleancargo cyberfabric build -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --name demo-serverGenerate a server project under .cyberfabric/<name>/ and build a Docker image with the workspace Dockerfile.
Synopsis:
cargo cyberfabric deploy -c <CONFIG> [-p <PATH>] [--manifest <Cargo.toml>] [--debug] [--dockerfile] [--args <KEY=VALUE>]...Arguments:
- [
-c, --config <CONFIG>] Required config file path; copied into the image and used as the runtimeCF_CLI_CONFIGtarget - [
-p, --path <PATH>] Optional workspace directory - [
-m, --manifest <Cargo.toml>] Optional Cargo manifest to build instead of generating.cyberfabric/<name>/; the path must point to a file namedCargo.toml - [
--debug] Docker build mode; defaults to release mode. Use this flag to build in debug mode. - [
--dockerfile <Dockerfile>] Dockerfile path to use instead of the default(Dockerfile from cwd) - [
--args <KEY=VALUE>] DockerfileARGoverride passed asdocker build --build-arg; repeat for multiple overrides
Behavior:
- [generates by default] Without
--manifest, recreates the generated server project from the config, matchingbuildandrun - [manifest override] With
--manifest, does not generate.cyberfabric/<name>/; Docker builds the provided manifest instead and uses itspackage.nameas the artifact name - [Dockerfile bootstrap] If
Dockerfileis missing from the selected workspace root, writes the shared CLI Dockerfile there before running Docker - [build context requirement] The config file and selected manifest must be inside the workspace root because Docker can only copy files from the build context
- [Docker args] The CLI provides
BUILDER_MANIFEST,BUILD_MODE,ARTIFACT_NAME,LOCAL_CONFIG_PATH, andCONFIG_EXT; repeated--argsvalues are appended afterward so they can override Dockerfile arguments
Examples:
cargo cyberfabric deploy -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.ymlcargo cyberfabric deploy -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --debugcargo cyberfabric deploy -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --manifest /tmp/cf-demo/Cargo.tomlcargo cyberfabric deploy -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --args BUILDER_FLAGS="--features metrics"Run workspace linting helpers from the selected workspace directory.
Synopsis:
cargo cyberfabric lint [-p <PATH>] [--all] [--fmt] [--clippy] [--strict] [--dylint]Arguments:
- [
-p, --path <PATH>] Optional workspace directory; changes the current working directory while Clap parses it - [
--all] Runs the default lint suites; this is also the default when neither--fmt,--clippy, nor--dylintis passed - [
--fmt] Runscargo fmt --check --all; if passed by itself, it disables the default implicit--all - [
--clippy] Runs workspace Clippy checks; if passed by itself, it disables the default implicit--all - [
--strict] Turns Clippy warnings into errors; valid only when Clippy is selected explicitly or through--all - [
--dylint] Runs embedded Dylint rules against the workspace rooted at the current or selected directory
Behavior:
- [path activation] If
-p/--pathis provided, it changes the current working directory - [default lint selection] With no explicit lint-selection flags,
lintbehaves as if--allwas enabled - [explicit selection disables default all] Passing
--fmt,--clippy, and/or--dylintopts into just those requested lint suites unless--allis also provided - [workspace formatting check]
--fmtrunscargo fmt --check --all - [workspace Clippy] Clippy runs as
cargo clippy --workspace --all-targets --all-features. The--all-featuresflag ensures every feature-gated code path is checked. The workspace currently has no mutually exclusive features, so enabling all features simultaneously is safe. - [strict scope]
--strictis rejected unless Clippy is active through--clippyor--all - [workspace-scoped dylint] Dylint resolves the workspace from the current working directory, so
-p/--pathis the way to lint another workspace without manually changing directories - [toolchain bootstrap] Before running Dylint, the CLI ensures the toolchains required by the embedded lint dylibs are installed
Examples:
cargo cyberfabric lintcargo cyberfabric lint --clippy --strictcargo cyberfabric lint --fmtcargo cyberfabric lint --dylintcargo cyberfabric lint -p /tmp/cf-demo --dylintDeclared in the CLI but currently unimplemented.
Synopsis:
cargo cyberfabric test [--e2e] [--module <NAME>] [--coverage]Arguments:
- [
--e2e] - [
--module <NAME>] - [
--coverage]
Current status:
- [placeholder only] Calling this subcommand currently reaches
unimplemented!("Not implemented yet")
cargo cyberfabric init /tmp/cf-demo
cargo cyberfabric mod add background-worker -p /tmp/cf-demo
cargo cyberfabric config mod add background-worker -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml
cargo cyberfabric run -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.ymlcargo cyberfabric mod add api-db-handler -p /tmp/cf-demo
cargo cyberfabric config db add primary -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --engine postgres --host localhost --port 5432 --user app --password '${DB_PASSWORD}' --dbname appdb
cargo cyberfabric config mod add api-db-handler -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml
cargo cyberfabric config mod db add api-db-handler -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --server primary
cargo cyberfabric run -p /tmp/cf-demo -c /tmp/cf-demo/config/quickstart.yml --watchcargo cyberfabric docs --verbose tokio::sync- [
-c/--configis mandatory] Forconfig ...,build,run, anddeploy - [generated servers expect
CF_CLI_CONFIG]cargo cyberfabric runsets it for you, but manual execution of.cyberfabric/<name>/or its compiled binary must provide it explicitly - [
lint --dylintneeds the feature build] Without thedylint-rulesfeature enabled, it currently reaches an error - [
lint --strictdepends on Clippy] Use it together with--clippyor--all - [
testis not ready] It is part of the CLI surface but currently panics at runtime - [
toolscan mutate your system] It may installrustupor rustup components - [
docs --registry] Onlycrates.iois supported - [
docs] Accepts a single query, and that query is only optional when--cleanis used by itself - [
config mod add] Remote modules require both--packageand--module-version - [
config mod db add] The module must already exist in config
cargo cyberfabric init <path> [--name <name>]
cargo cyberfabric mod add <background-worker|api-db-handler|rest-gateway> [-p <workspace>]
cargo cyberfabric config mod list [-p <workspace>] -c <config>
cargo cyberfabric config mod add <module> [-p <workspace>] -c <config>
cargo cyberfabric config mod rm <module> [-p <workspace>] -c <config>
cargo cyberfabric config mod db add <module> [-p <workspace>] -c <config> ...
cargo cyberfabric config mod db edit <module> [-p <workspace>] -c <config> ...
cargo cyberfabric config mod db rm <module> [-p <workspace>] -c <config>
cargo cyberfabric config db add <name> [-p <workspace>] -c <config> ...
cargo cyberfabric config db edit <name> [-p <workspace>] -c <config> ...
cargo cyberfabric config db rm <name> [-p <workspace>] -c <config>
cargo cyberfabric docs [-p <path>] [--version <version>] [--clean] [<query>]
cargo cyberfabric lint [-p <workspace>] [--all] [--clippy] [--strict] [--dylint]
cargo cyberfabric tools --all
cargo cyberfabric run [-p <workspace>] -c <config> [--name <name>] [--watch]
cargo cyberfabric build [-p <workspace>] -c <config> [--name <name>]
cargo cyberfabric deploy [-p <workspace>] -c <config> [--manifest <Cargo.toml>] [--args <KEY=VALUE>]...