FX project and DevOps operations CLI.
Project description
fx-tool
fx is the project manager and operations CLI for projects built on
registers.
It is designed for both local developer workflows and operational workflows:
- scaffold new projects (
clianddb) - add plugin/modules and keep plugin registry aligned with filesystem
- run/install/update projects
- pull plugins from repositories
- manage cron jobs, workflows, and runtime state
- record local operation history in
.fx/fx.db
Install
Install from PyPI:
pip install fx-tool
For local development:
pip install -e ".[dev]"
Entrypoints:
fx --version
fx --help
fx --interactive
python -m fx --help
Quick Start
CLI project:
fx init cli TodoApp
fx status TodoApp
fx health TodoApp
fx run TodoApp
DB/API project:
fx init db DataApp
fx status DataApp
fx health DataApp
fx run DataApp --host 0.0.0.0 --port 9000 --reload
Typical Scaffold Output (fx init)
CLI projects create:
app/__main__.py
app/todo.py
app/plugins/__init__.py
tests/test_todo_automation.py
pyproject.toml
README.md
.fx/fx.db
DB projects create:
app/__main__.py
app/models.py
app/api.py
app/plugins/__init__.py
tests/test_user_api.py
pyproject.toml
README.md
.fx/fx.db
Interactive Shell (TUI-Style REPL)
Launch interactive mode:
fx --interactive
Built-ins:
helphelp <command>commandsexec <system command>exit/quit
Example scripted session:
commands
help module
exec echo hello-from-shell
quit
The generated app started by fx run <cli_project> also opens an interactive
console (same built-in model) and exits cleanly on EOF/non-interactive input.
Command Style and Argument Rules
fx uses registers.cli parsing conventions:
- positional and named forms are both supported
- named options accept both snake and kebab case
- boolean values are flags (
--force,--reload,--foreground) - grouped commands are top-level (
module,plugin,cron) with action args
Examples:
fx init cli MyProject .
fx init --project-type cli --project-name MyProject --root .
fx module add cli users .
fx run . --host 0.0.0.0 --port 9000 --reload
Command Reference
init
Initialize project structure and local fx state.
fx init
fx init cli
fx init cli MyProject
fx init cli MyProject .
fx init db DataProject .
fx init cli MyProject . --force
Backward-compatible forms are supported:
fx init MyProject
fx init MyProject .
status
Inspect project structure and registry status:
fx status .
Includes:
- project record/type
- package and plugin package discovery
- starter file checks (
todo.py,api.py,models.py) - registered modules/plugins
- registry vs filesystem plugin alignment
module
Manage structured modules under <package>/plugins:
fx module add cli users .
fx module add db audit .
fx module list .
Validation:
- action must be
addorlist - add type must be
cliordb - module name is normalized to a valid identifier
plugin
Create alias links to importable plugin packages:
fx plugin make math math_ops .
fx plugin link my_package.tools .
fx plugin list .
Notes:
linkis an alias formake- alias defaults to the last package segment if omitted
run
Run the project entrypoint:
fx run .
fx run . --host 0.0.0.0 --port 9000 --reload
Behavior:
- CLI projects run
python -m <package> - DB projects run
python -m uvicorn <package>.api:app
install
Editable install in current/selected environment:
fx install .
fx install . --extras dev
fx install . --extras dev,docs
fx install . --venv-path .venv
update
Update runtime dependencies from pypi, git, or path:
fx update .
fx update . --source git --repo https://github.com/nexustech101/registers.git --ref main
fx update . --source path --path ../registers
fx update . --package registers
Validation rules:
source=pypirejects--repoand--pathsource=gitrequires--repoand rejects--pathsource=pathrequires--pathand rejects--repo
pull
Sync plugins from a Git repository/local checkout:
fx pull https://github.com/org/plugins-repo.git . --ref main --subdir plugins
fx pull ../local-plugins-repo . --force
pull import-validates copied plugins and fails if imports are broken.
health
Run structure and import checks:
fx health .
Alias: fx --doctor .
history
Inspect operation history from .fx/fx.db:
fx history
fx history 50 .
cron
Command shape:
fx cron <action> [subject] [root] [--workers] [--foreground] [--target] [--payload] [--workflow-file] [--job] [--command] [--metadata]
Actions:
workspaceprepares directories/files for cron workflowsjobsdiscovers/syncs jobs and lists current registrationsstart/stop/statusmanage runtime daemon statetriggerqueues a manual event for a jobgenerate/applygenerate and apply deployment artifactsregisterregisters named workflowsworkflowslists registered workflowsrun-workflowexecutes a registered workflow
Common flow:
fx cron workspace .
fx cron jobs .
fx cron start . --workers 4
fx cron status .
fx cron trigger nightly-build . --payload '{"env":"prod"}'
Workflow flow:
fx cron register deploy-workflow . --workflow-file ops/workflows/ci/deploy-workflow.yml --job nightly-build --target github_actions
fx cron workflows .
fx cron run-workflow deploy-workflow . --payload '{"env":"prod"}'
Registration rules:
registerrequires--workflow-file- choose one execution mode:
--jobor--command(not both)
version
fx version
fx --version
fx -V
Programmatic API
fx can be imported for automation:
from fx import run, get_registry, __version__
result = run(["status", "."], print_result=False)
print(result)
registry = get_registry()
print(registry.list_commands())
print(__version__)
Operational Notes
fxwrites control-plane/project metadata to.fx/fx.dbper project root.- Command failures raise command errors via
registers.cli; run with--helpandhelp <command>to validate argument shape. - If cron job discovery does not detect root-level
app/jobs in your runtime, mirror/import jobs undersrc/appas a compatibility workaround.
Additional Documentation
For a deeper, exhaustive guide, see:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fx_tool-1.1.2.tar.gz.
File metadata
- Download URL: fx_tool-1.1.2.tar.gz
- Upload date:
- Size: 27.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3439c1462ccc51a4684a0fb59e7f90d5702b0a1c141db714cecbe57a6127df25
|
|
| MD5 |
f68542fb0e43ac67c9e163e7cfe75e95
|
|
| BLAKE2b-256 |
13fe6f0a4ed90940c34608ef38c4a0b3cd7290d730399d5852e5e9cfb5283e18
|
Provenance
The following attestation bundles were made for fx_tool-1.1.2.tar.gz:
Publisher:
publish.yml on nexustech101/fx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fx_tool-1.1.2.tar.gz -
Subject digest:
3439c1462ccc51a4684a0fb59e7f90d5702b0a1c141db714cecbe57a6127df25 - Sigstore transparency entry: 1365498567
- Sigstore integration time:
-
Permalink:
nexustech101/fx@c44e99e0294799d89b17ca66cd5cd0ad6adb8845 -
Branch / Tag:
refs/tags/v1.1.2 - Owner: https://github.com/nexustech101
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c44e99e0294799d89b17ca66cd5cd0ad6adb8845 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fx_tool-1.1.2-py3-none-any.whl.
File metadata
- Download URL: fx_tool-1.1.2-py3-none-any.whl
- Upload date:
- Size: 29.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bafea9034dade8a0340639ad5244ac90a0619260d22a33f5fb1af665f17c8d66
|
|
| MD5 |
59a04544dd73c4c7c3f197c6c5d04f63
|
|
| BLAKE2b-256 |
8e90a4668042c4025545501f91fec0528f36bc78d7f4736157561ba1316045f5
|
Provenance
The following attestation bundles were made for fx_tool-1.1.2-py3-none-any.whl:
Publisher:
publish.yml on nexustech101/fx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fx_tool-1.1.2-py3-none-any.whl -
Subject digest:
bafea9034dade8a0340639ad5244ac90a0619260d22a33f5fb1af665f17c8d66 - Sigstore transparency entry: 1365498584
- Sigstore integration time:
-
Permalink:
nexustech101/fx@c44e99e0294799d89b17ca66cd5cd0ad6adb8845 -
Branch / Tag:
refs/tags/v1.1.2 - Owner: https://github.com/nexustech101
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c44e99e0294799d89b17ca66cd5cd0ad6adb8845 -
Trigger Event:
release
-
Statement type: