Lean, plug-in-driven CLI kernel
Project description
Bijux CLI
A modern, predictable CLI framework for Python — strict global flag precedence, first-class plugins, a DI kernel, and an interactive REPL. Build robust, extensible command-line tools that are easy to test, maintain, and scale.
At a glance: Plugin-driven • deterministic flags • DI for testability • REPL • structured JSON/YAML
Quality: 2,600+ tests across layers with 98%+ coverage (see Test Artifacts and HTML coverage). Multi-version CI. Docs build enforced. No telemetry.
Table of Contents
- Why Bijux CLI?
- Try It in 20 Seconds
- Key Features
- Installation
- Quick Start
- Plugins in 60 Seconds
- Structured Output
- Developer Introspection
- Global Flags: Strict Precedence
- Built-in Commands
- When to Use (and Not Use)
- Shell Completion
- Configuration & Paths
- Tests & Quality
- Project Tree
- Roadmap
- Docs & Resources
- Contributing
- Acknowledgments
- License
Why Bijux CLI?
Click and Typer excel at simple tools. Bijux emphasizes predictability and modularity for complex ones:
- Deterministic flags for reliable CI/scripting.
- Dependency Injection kernel for testable, decoupled services.
- First-class plugins to extend without touching the core.
- Interactive REPL for exploration and debugging.
Try It in 20 Seconds
pipx install bijux-cli # Or: pip install bijux-cli
bijux --version
bijux doctor
bijux status -f json --no-pretty
Key Features
- Plugin-Driven Extensibility — Scaffold, install, validate; plugins become top-level commands.
- Deterministic Behavior ⚖ — Strict flag precedence (see ADR-0002).
- DI Kernel — Decouple internals; inspect graphs for debugging/tests.
- REPL Shell — Persistent session with history; great for exploration/demos.
- Structured Output — JSON/YAML (+ pretty/compact, verbosity, consistent errors).
- Diagnostics — Built-in
doctor,audit,docsfor workflows. - Shell Completion — Bash, Zsh, Fish, PowerShell support.
Installation
Requires Python 3.11+.
# Isolated install (recommended)
pipx install bijux-cli
# Standard
pip install bijux-cli
Upgrade: pipx upgrade bijux-cli or pip install --upgrade bijux-cli.
Quick Start
# Discover commands/flags
bijux --help
# Health check
bijux doctor
# REPL mode
bijux
bijux> help
bijux> status
bijux> exit
Plugins in 60 Seconds
# Scaffold from a real template (local dir or Git URL), then install
# Option A: local template (example uses repo's cookiecutter template)
bijux plugins scaffold my_plugin --template ./plugin_template --force
# Option B: cookiecutter-compatible Git URL
# bijux plugins scaffold my_plugin --template https://github.com/bijux/bijux-plugin-template.git --force
# Install & explore
bijux plugins install ./my_plugin --force
bijux plugins list
bijux my_plugin --help
# Validate & remove
bijux plugins check my_plugin
bijux plugins uninstall my_plugin
Plugins dynamically add top-level commands.
Structured Output
For automation:
# Compact JSON
bijux status -f json --no-pretty | jq
# Pretty YAML
bijux status -f yaml --pretty
Developer Introspection
# DI graph
bijux dev di -f json
# Loaded plugins
bijux dev list-plugins
Global Flags: Strict Precedence
Fixed ordering eliminates ambiguity.
| Priority | Flag | Effect |
|---|---|---|
| 1 | -h, --help |
Immediate exit (code 0) with usage; ignores all. |
| 2 | -q, --quiet |
Suppress stdout/stderr; preserves exit code. |
| 3 | -d, --debug |
Full diagnostics; implies --verbose, forces --pretty. |
| 4 | -f, --format <json|yaml> |
Structured output; invalid → code 2. |
| 5 | --pretty / --no-pretty |
Indentation toggle (default: --pretty). |
| 6 | -v, --verbose |
Runtime metadata; implied by --debug. |
Rationale: ADR-0002
Built-in Commands
| Command | Description | Example |
|---|---|---|
doctor |
Environment diagnostics | bijux doctor |
status |
CLI snapshot | bijux status -f json |
repl |
Interactive shell | bijux repl |
plugins |
Manage plugins | bijux plugins list |
config |
Key-value settings | bijux config set core_timeout=5 |
history |
REPL history | bijux history --limit 10 |
audit |
Security checks | bijux audit --dry-run |
docs |
Generate specs/docs | bijux docs --out spec.json |
dev |
Introspection (DI, plugins) | bijux dev di |
sleep |
Pause | bijux sleep -s 5 |
version |
Version info | bijux version |
When to Use (and Not Use)
Use if you need:
- Plugins for extensibility.
- Deterministic flags for CI/scripts. ADR-0002
- REPL for interactive workflows.
- DI for modular, testable design.
Overkill if:
- You’re building a tiny one-off script (Click/Typer may be simpler).
- You don’t need plugins/DI.
Shell Completion
# Install (writes to your shell’s completion dir)
bijux --install-completion
# Or print the script for manual setup
bijux --show-completion
Zsh tip: Ensure compinit runs and your fpath includes the completion directory.
Configuration & Paths
Precedence: flags > env > config > defaults.
- Config:
~/.bijux/.env(BIJUXCLI_CONFIG) - History:
~/.bijux/.history(BIJUXCLI_HISTORY_FILE) - Plugins:
~/.bijux/.plugins(BIJUXCLI_PLUGINS_DIR)
Example:
export BIJUXCLI_PLUGINS_DIR=./custom-plugins
Tests & Quality
- Depth: 2,600+ tests across unit, integration, functional, and E2E layers.
- Coverage: 98%+ code coverage (measured via
pytest-covin CI). - Determinism: CI runs the full suite on multiple Python versions (3.11+).
- Artifacts: JSON/YAML fixtures validate structured outputs; E2E simulates real usage (REPL, plugins, DI).
- Docs: Read the full testing guide → TESTS.md.
Quick commands:
make test # all tests
make test-unit # unit tests only
make test-e2e # end-to-end tests only
Artifacts: Test Artifacts · JUnit report · HTML coverage report
Project Tree
A guided map of the repository (what lives where, and why). See PROJECT_TREE.md for the full breakdown.
Quick glance:
api/ # OpenAPI schemas
config/ # Lint/type/security configs
docs/ # MkDocs site (Material)
makefiles/ # Task modules (docs, test, lint, etc.)
plugin_template/# Cookiecutter-ready plugin scaffold
scripts/ # Helper scripts (hooks, docs generation)
src/bijux_cli/ # CLI + library implementation
tests/ # unit / integration / functional / e2e
Roadmap
- v0.2 — Async command support, richer plugin registry.
- v1.0 — Community plugin marketplace, benchmarks vs. alternatives.
Track progress and suggest features via Issues.
Docs & Resources
- Site: https://bijux.github.io/bijux-cli/
- Changelog: https://github.com/bijux/bijux-cli/blob/main/CHANGELOG.md
- Repository: https://github.com/bijux/bijux-cli
- Issues: https://github.com/bijux/bijux-cli/issues
- Security (private reports): https://github.com/bijux/bijux-cli/security/advisories/new
- Tests: See TESTS.md
- Project Tree: See PROJECT_TREE.md
- Artifacts: Browse all reports & logs — index · Tests · Lint · Quality · Security · SBOM · API · Citation
When filing issues, include --debug output where possible.
Contributing
Welcome! See CONTRIBUTING.md for setup, style, and tests. We label good first issue to help you get started.
Acknowledgments
- Built on Typer (CLI), FastAPI (HTTP API), and Injector (DI).
- Inspired by Click, Typer, and Cobra.
- Thanks to early contributors and testers!
License
MIT — see LICENSES/MIT.txt. © 2025 Bijan Mousavi.
Changelog
All notable changes to Bijux CLI are documented here. This project adheres to Semantic Versioning and the Keep a Changelog format.
Unreleased
Added
- (add new entries via Towncrier fragments in
changelog.d/)
Changed
- (add here)
Fixed
- (add here)
[0.1.2] – 2025-08-17
Added
- New Documentation Engine: Introduced a new modular documentation builder in
scripts/docs_builder/that replaces the previous helper script. - CI Artifact Pages: The documentation site now automatically generates detailed pages for all CI artifacts, including tests, linting, code quality, security, API tests, SBOMs, and citation files.
- Release Evidence: The
publishworkflow now downloads all artifacts from theCIrun, packages them asevidence/*.tar.gzbundles, and attaches them to the GitHub Release for traceability. - Build Hygiene: Makefiles now enforce a "hygienic" build process, ensuring all temporary files, caches, and build outputs are stored under the
artifacts/directory to prevent root directory pollution.
Changed
- CI/CD Overhaul:
- The
ci.ymlworkflow now uploads each category of artifact separately for better organization and downstream consumption. - The
docs.ymlworkflow now waits for the mainCIrun to complete, downloads all artifacts, and uses them to build a data-rich documentation site. - The
publish.ymlworkflow has been streamlined and made more robust, removing the optional "wait for docs" step and improving tag detection.
- The
- Documentation Content: All top-level Markdown documents (
README.md,USAGE.md,TESTS.md,TOOLING.md,CONTRIBUTING.md, etc.) have been significantly rewritten and expanded with tables of contents,back-to-toplinks, and cross-references to the new artifact pages. - Build System:
- All
Makefilemodules have been refactored to use the new hygienicartifacts/directory structure for outputs and caches. tox.inihas been updated to align with the new Makefile targets and to run a comprehensive suite of checks for thepy311environment, mirroring the full CI validation process.
- All
- API Schema: The OpenAPI
schema.yamlhas been improved with stricter validation (additionalProperties: false), better descriptions, response links, and more detailed examples. - Source Code: Refactored async handling in
src/bijux_cli/api.pyand improved type safety across multiple modules by removingpyright: ignorecomments and adding explicitcastcalls where necessary.
Fixed
- Type Safety: Resolved numerous previously ignored type errors throughout the codebase and test suite.
- API Endpoint Logic: Corrected the item update logic in
src/bijux_cli/httpapi.pyby removing a faulty check for duplicate names that was causing incorrect 409 Conflict errors. - Test Suite: Improved the stability and correctness of E2E tests by enhancing golden file comparisons and fixing brittle assertions.
0.1.1 – 2025-08-14
Added
- Publish pipeline: GitHub Actions
publish.ymlthat publishes viamake publishonly after required checks are green and a tag is present. - Project map:
PROJECT_TREE.md(anddocs/project_tree.md) with a curated overview. - Developer Tooling page:
TOOLING.md(anddocs/tooling.md) with embedded configs, Makefile snippets, and CI workflows viainclude-markdown. - Docs assets: Community landing page, Plausible analytics partial, and CSS overrides.
Changed
- Docs generator (
scripts/helper_mkdocs.py):- Copies README, USAGE, TESTS, PROJECT_TREE, and TOOLING into the site with link rewrites and
{#top}anchors. - Generates mkdocstrings pages for all modules under
src/bijux_cli/**. - Builds one consolidated API Reference with this structure:
- top: Api Module, Cli Module, Httpapi Module
- sections (collapsed by default): Commands, Contracts, Core, Infra, Services
- nested groups for command subpackages (
config/,dev/,history/,memory/,plugins/) beneath Commands.
- Emits
reference/**/index.mdto power Material’s section indexes.
- Copies README, USAGE, TESTS, PROJECT_TREE, and TOOLING into the site with link rewrites and
- MkDocs config (
mkdocs.yml): tightened plugin ordering and settings forinclude-markdown, enabled section indexes, and strict mode; added watch paths for configs and scripts. - README / USAGE: Refined copy; standardized top anchors and links to TESTS.md/PROJECT_TREE.md/TOOLING.md.
- SECURITY.md: Rewritten with clearer reporting, SLAs, scope, and safe harbor.
- Makefiles: macOS-safe env handling; Cairo-less Interrogate wrapper for doc coverage.
- Config: Expanded lints/dictionary.
Fixed
- Docs build (strict): resolved broken/unknown links in TOOLING.md and removed duplicate API Reference sections; left sidebar now stays populated when deep-linking into API pages.
- Tests: E2E version fixtures cleaned up.
Packaging
- PyPI links corrected:
project.urlsnow points to accurate Homepage/Docs/Changelog/Issues/Discussions. - Dynamic versioning from Git tags: Using
hatch-vcswithdynamic = ["version"]; annotated tags likev0.1.1define the release version.commitizentags asv$version. - Richer PyPI description:
hatch-fancy-pypi-readmerenders README.md + CHANGELOG.md on PyPI. - Wheel/Sdist layout: Explicit Hatch build config ensures
py.typed, licenses, and metadata are included.
0.1.0 – 2025-08-12
Added
-
Core runtime
- Implemented Dependency Injection kernel, REPL shell, plugin loader, telemetry hooks, and shell completion (bash/zsh/fish).
- Added core modules:
api,cli,httpapi,core/{constants,context,di,engine,enums,exceptions,paths}.
-
Contracts layer (
contracts/)- Defined protocols for
audit,config,context,docs,doctor,emitter,history,memory,observability,process,registry,retry,serializer,telemetry. - Added
py.typedmarkers for downstream type checking.
- Defined protocols for
-
Services layer
- Implemented concrete services for
audit,config,docs,doctor,history,memory. - Built plugin subsystem:
plugins/{entrypoints,groups,hooks,registry}.
- Implemented concrete services for
-
Infra layer (
infra/)- Implemented
emitter,observability,process,retry,serializer,telemetry.
- Implemented
-
Command suite
- Added top-level commands:
audit,docs,doctor,help,repl,sleep,status,version. - Added
config/commands:clear,export,get,list,load,reload,set,unset,service. - Added
dev/commands:di,list-plugins,service. - Added
history/commands:clear,service. - Added
memory/commands:clear,delete,get,list,set,service. - Added
plugins/commands:check,info,install,list,scaffold,uninstall.
- Added top-level commands:
-
Structured output & flags
- Added JSON/YAML output via
--format, pretty printing, and deterministic global flag precedence (ADR-0002).
- Added JSON/YAML output via
-
API contract validation & testing
- Automated lint/validation of
api/*.yamlwith Prance, OpenAPI Spec Validator, Redocly, and OpenAPI Generator. - Added Schemathesis contract testing against the running server.
- Pinned OpenAPI Generator CLI version via
OPENAPI_GENERATOR_VERSIONand automated Node.js toolchain setup in Makefile.
- Automated lint/validation of
-
Documentation tooling
- Integrated MkDocs (Material), mkdocstrings, literate-nav, and ADR index generation.
-
Quality & security pipeline
- Added formatting/linting:
ruff(+format). - Added typing:
mypy,pyright,pytype. - Added docs style/coverage:
pydocstyle,interrogate. - Added code health:
vulture,deptry,radon,codespell,reuse. - Added security:
bandit,pip-audit. - Added mutation testing:
mutmut,cosmic-ray.
- Added formatting/linting:
-
SBOM
- Generated CycloneDX JSON for prod/dev dependencies via
make sbom(usespip-audit).
- Generated CycloneDX JSON for prod/dev dependencies via
-
Citation
- Validated
CITATION.cffand added export to BibTeX/RIS/EndNote formats viamake citation.
- Validated
-
Makefile architecture
- Modularized the Makefile into
makefiles/*.mkfor maintainability and clear separation of concerns. - Centralized all developer workflows (
test,lint,quality,security,api,docs,build,sbom,citation,changelog,publish) in one consistent interface. - Added
bootstraptarget for idempotent virtualenv setup and Git hook installation fromscripts/git-hooks(skips re-installation if already linked). - Added
all-paralleltarget to run independent checks (quality,security,api,docs) concurrently for faster CI/CD. - Added
make helpfor self-documenting targets with grouped sections. - Provided helper macros (
run_tool,read_pyproject_version) to standardize tooling invocation.
- Modularized the Makefile into
-
pre-commit
- Added hygiene hooks:
ruff-format+ruff,mdformat, andcodespell.- Enforced Conventional Commits via commitizen
commit-msghook.
- Enforced Conventional Commits via commitizen
- Added hygiene hooks:
-
tox orchestration
- Configured multi-Python test envs (
py311,py312,py313). - Mapped Makefile workflows into tox envs (
lint,quality,security,api,docs,build,sbom,changelog,citation) to ensure reproducibility. - Passed
MAKEFLAGSto execute Makefile targets inside tox-managed virtualenvs.
- Configured multi-Python test envs (
-
Continuous Integration
- Added GitHub Actions workflow running tox across Python versions with Node.js 20 and Java 17 for API checks.
- Added GitLab CI sample mirroring the GitHub workflow (tox-driven) with artifacts for coverage and API logs.
- CI/CD pipelines directly leverage the modularized Makefile for consistent local/CI behavior.
-
Packaging / PyPI page
- Built dynamic long description via hatch-fancy-pypi-readme from README.md and CHANGELOG.md for PyPI/TestPyPI.
- Packaged with
LICENSES/,REUSE.toml,CITATION.cff, andpy.typedincluded in source distributions.
Changed
- Released initial public version.
Fixed
- None
Project details
Release history Release notifications | RSS feed
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 bijux_cli-0.1.2.tar.gz.
File metadata
- Download URL: bijux_cli-0.1.2.tar.gz
- Upload date:
- Size: 24.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50c3949667ec60cea1975f037d00fc681bb48c5f5d7fc0da57d1396f8729a1ab
|
|
| MD5 |
c99a9f7befda127ebe702645feafb1bf
|
|
| BLAKE2b-256 |
9bb02cfdd98ebe485f956210b776df7f4684748135ab1dd018eac49c2a91e2ac
|
File details
Details for the file bijux_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: bijux_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 208.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a98807d061a19f9c7014ac8e2bbc9bc81b8b20e695c5390853de7f205106d0a
|
|
| MD5 |
05da9570222447114706ba59714b7651
|
|
| BLAKE2b-256 |
55b6b881de15f6cbeb1ae934a3fb7a935c08a8615a8418d9bea0be4d9c53178e
|