Metadata-Version: 2.4
Name: bijux-cli
Version: 0.2.0
Summary: Lean, plug-in-driven CLI kernel
Project-URL: Homepage, https://github.com/bijux/bijux-cli
Project-URL: Repository, https://github.com/bijux/bijux-cli.git
Project-URL: Bug Tracker, https://github.com/bijux/bijux-cli/issues
Project-URL: Documentation, https://bijux.github.io/bijux-cli/
Project-URL: Changelog, https://bijux.github.io/bijux-cli/changelog
Project-URL: Discussions, https://github.com/bijux/bijux-cli/discussions
Author-email: Bijan Mousavi <mousavi.bijan@gmail.com>
License:                                  Apache License
                                   Version 2.0, January 2004
                                http://www.apache.org/licenses/
        
           TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
        
           1. Definitions.
        
              "License" shall mean the terms and conditions for use, reproduction,
              and distribution as defined by Sections 1 through 9 of this document.
        
              "Licensor" shall mean the copyright owner or entity authorized by
              the copyright owner that is granting the License.
        
              "Legal Entity" shall mean the union of the acting entity and all
              other entities that control, are controlled by, or are under common
              control with that entity. For the purposes of this definition,
              "control" means (i) the power, direct or indirect, to cause the
              direction or management of such entity, whether by contract or
              otherwise, or (ii) ownership of fifty percent (50%) or more of the
              outstanding shares, or (iii) beneficial ownership of such entity.
        
              "You" (or "Your") shall mean an individual or Legal Entity
              exercising permissions granted by this License.
        
              "Source" form shall mean the preferred form for making modifications,
              including but not limited to software source code, documentation
              source, and configuration files.
        
              "Object" form shall mean any form resulting from mechanical
              transformation or translation of a Source form, including but
              not limited to compiled object code, generated documentation,
              and conversions to other media types.
        
              "Work" shall mean the work of authorship, whether in Source or
              Object form, made available under the License, as indicated by a
              copyright notice that is included in or attached to the work
              (an example is provided in the Appendix below).
        
              "Derivative Works" shall mean any work, whether in Source or Object
              form, that is based on (or derived from) the Work and for which the
              editorial revisions, annotations, elaborations, or other modifications
              represent, as a whole, an original work of authorship. For the purposes
              of this License, Derivative Works shall not include works that remain
              separable from, or merely link (or bind by name) to the interfaces of,
              the Work and Derivative Works thereof.
        
              "Contribution" shall mean any work of authorship, including
              the original version of the Work and any modifications or additions
              to that Work or Derivative Works thereof, that is intentionally
              submitted to Licensor for inclusion in the Work by the copyright owner
              or by an individual or Legal Entity authorized to submit on behalf of
              the copyright owner. For the purposes of this definition, "submitted"
              means any form of electronic, verbal, or written communication sent
              to the Licensor or its representatives, including but not limited to
              communication on electronic mailing lists, source code control systems,
              and issue tracking systems that are managed by, or on behalf of, the
              Licensor for the purpose of discussing and improving the Work, but
              excluding communication that is conspicuously marked or otherwise
              designated in writing by the copyright owner as "Not a Contribution."
        
              "Contributor" shall mean Licensor and any individual or Legal Entity
              on behalf of whom a Contribution has been received by Licensor and
              subsequently incorporated within the Work.
        
           2. Grant of Copyright License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              copyright license to reproduce, prepare Derivative Works of,
              publicly display, publicly perform, sublicense, and distribute the
              Work and such Derivative Works in Source or Object form.
        
           3. Grant of Patent License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              (except as stated in this section) patent license to make, have made,
              use, offer to sell, sell, import, and otherwise transfer the Work,
              where such license applies only to those patent claims licensable
              by such Contributor that are necessarily infringed by their
              Contribution(s) alone or by combination of their Contribution(s)
              with the Work to which such Contribution(s) was submitted. If You
              institute patent litigation against any entity (including a
              cross-claim or counterclaim in a lawsuit) alleging that the Work
              or a Contribution incorporated within the Work constitutes direct
              or contributory patent infringement, then any patent licenses
              granted to You under this License for that Work shall terminate
              as of the date such litigation is filed.
        
           4. Redistribution. You may reproduce and distribute copies of the
              Work or Derivative Works thereof in any medium, with or without
              modifications, and in Source or Object form, provided that You
              meet the following conditions:
        
              (a) You must give any other recipients of the Work or
                  Derivative Works a copy of this License; and
        
              (b) You must cause any modified files to carry prominent notices
                  stating that You changed the files; and
        
              (c) You must retain, in the Source form of any Derivative Works
                  that You distribute, all copyright, patent, trademark, and
                  attribution notices from the Source form of the Work,
                  excluding those notices that do not pertain to any part of
                  the Derivative Works; and
        
              (d) If the Work includes a "NOTICE" text file as part of its
                  distribution, then any Derivative Works that You distribute must
                  include a readable copy of the attribution notices contained
                  within such NOTICE file, excluding those notices that do not
                  pertain to any part of the Derivative Works, in at least one
                  of the following places: within a NOTICE text file distributed
                  as part of the Derivative Works; within the Source form or
                  documentation, if provided along with the Derivative Works; or,
                  within a display generated by the Derivative Works, if and
                  wherever such third-party notices normally appear. The contents
                  of the NOTICE file are for informational purposes only and
                  do not modify the License. You may add Your own attribution
                  notices within Derivative Works that You distribute, alongside
                  or as an addendum to the NOTICE text from the Work, provided
                  that such additional attribution notices cannot be construed
                  as modifying the License.
        
              You may add Your own copyright statement to Your modifications and
              may provide additional or different license terms and conditions
              for use, reproduction, or distribution of Your modifications, or
              for any such Derivative Works as a whole, provided Your use,
              reproduction, and distribution of the Work otherwise complies with
              the conditions stated in this License.
        
           5. Submission of Contributions. Unless You explicitly state otherwise,
              any Contribution intentionally submitted for inclusion in the Work
              by You to the Licensor shall be under the terms and conditions of
              this License, without any additional terms or conditions.
              Notwithstanding the above, nothing herein shall supersede or modify
              the terms of any separate license agreement you may have executed
              with Licensor regarding such Contributions.
        
           6. Trademarks. This License does not grant permission to use the trade
              names, trademarks, service marks, or product names of the Licensor,
              except as required for reasonable and customary use in describing the
              origin of the Work and reproducing the content of the NOTICE file.
        
           7. Disclaimer of Warranty. Unless required by applicable law or
              agreed to in writing, Licensor provides the Work (and each
              Contributor provides its Contributions) on an "AS IS" BASIS,
              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
              implied, including, without limitation, any warranties or conditions
              of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
              PARTICULAR PURPOSE. You are solely responsible for determining the
              appropriateness of using or redistributing the Work and assume any
              risks associated with Your exercise of permissions under this License.
        
           8. Limitation of Liability. In no event and under no legal theory,
              whether in tort (including negligence), contract, or otherwise,
              unless required by applicable law (such as deliberate and grossly
              negligent acts) or agreed to in writing, shall any Contributor be
              liable to You for damages, including any direct, indirect, special,
              incidental, or consequential damages of any character arising as a
              result of this License or out of the use or inability to use the
              Work (including but not limited to damages for loss of goodwill,
              work stoppage, computer failure or malfunction, or any and all
              other commercial damages or losses), even if such Contributor
              has been advised of the possibility of such damages.
        
           9. Accepting Warranty or Additional Liability. While redistributing
              the Work or Derivative Works thereof, You may choose to offer,
              and charge a fee for, acceptance of support, warranty, indemnity,
              or other liability obligations and/or rights consistent with this
              License. However, in accepting such obligations, You may act only
              on Your own behalf and on Your sole responsibility, not on behalf
              of any other Contributor, and only if You agree to indemnify,
              defend, and hold each Contributor harmless for any liability
              incurred by, or claims asserted against, such Contributor by reason
              of your accepting any such warranty or additional liability.
        
           END OF TERMS AND CONDITIONS
        
           APPENDIX: How to apply the Apache License to your work.
        
              Copyright 2025 Bijan Mousavi
        
              Licensed under the Apache License, Version 2.0 (the "License");
              you may not use this file except in compliance with the License.
              You may obtain a copy of the License at
        
                  http://www.apache.org/licenses/LICENSE-2.0
        
              Unless required by applicable law or agreed to in writing, software
              distributed under the License is distributed on an "AS IS" BASIS,
              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
              See the License for the specific language governing permissions and
              limitations under the License.
License-File: LICENSE
Keywords: cli,dependency-injection,developer-tools,fastapi,pluggy,plugins,repl,typer
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Framework :: FastAPI
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: MacOS
Classifier: Operating System :: OS Independent
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Terminals
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: click>=8.1.7
Requires-Dist: colorama>=0.4.6
Requires-Dist: cookiecutter>=2.3.0
Requires-Dist: cryptography>=44.0.1
Requires-Dist: fastapi<1.0,>=0.110
Requires-Dist: injector>=0.20.1
Requires-Dist: orjson>=3.9.0
Requires-Dist: packaging>=23.0
Requires-Dist: pluggy>=1.0.0
Requires-Dist: prompt-toolkit>=3.0.0
Requires-Dist: psutil>=6.0.0
Requires-Dist: pydantic-settings~=2.0
Requires-Dist: pydantic<3.0,>=2.9.2
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: rapidfuzz>=3.0.0
Requires-Dist: structlog>=24.4.0
Requires-Dist: typer>=0.12.5
Provides-Extra: dev
Requires-Dist: anyio<5.0,>=4.4.0; extra == 'dev'
Requires-Dist: bandit<2.0,>=1.7.10; extra == 'dev'
Requires-Dist: build<2.0,>=1.0.3; extra == 'dev'
Requires-Dist: codespell<3.0,>=2.3.0; extra == 'dev'
Requires-Dist: commitizen<5.0,>=4.0.0; extra == 'dev'
Requires-Dist: cosmic-ray>=4.0.0; extra == 'dev'
Requires-Dist: deptry<1.0,>=0.10.0; extra == 'dev'
Requires-Dist: hypothesis-jsonschema<1.0,>=0.23.0; extra == 'dev'
Requires-Dist: hypothesis<7.0,>=6.103.0; extra == 'dev'
Requires-Dist: interrogate<2.0,>=1.7.0; extra == 'dev'
Requires-Dist: mkdocs-gen-files; extra == 'dev'
Requires-Dist: mkdocs-git-revision-date-localized-plugin<2.0,>=1.2.0; extra == 'dev'
Requires-Dist: mkdocs-glightbox<1.0,>=0.3; extra == 'dev'
Requires-Dist: mkdocs-include-markdown-plugin; extra == 'dev'
Requires-Dist: mkdocs-literate-nav; extra == 'dev'
Requires-Dist: mkdocs-material<10.0,>=9.5.39; extra == 'dev'
Requires-Dist: mkdocs-material[imaging]<10.0,>=9.5.39; extra == 'dev'
Requires-Dist: mkdocs-minify-plugin<1.0,>=0.7; extra == 'dev'
Requires-Dist: mkdocs-redirects<2.0,>=1.2; extra == 'dev'
Requires-Dist: mkdocs<2.0,>=1.6.1; extra == 'dev'
Requires-Dist: mkdocstrings[python]<1.0,>=0.26.1; extra == 'dev'
Requires-Dist: mutmut>=3.0; extra == 'dev'
Requires-Dist: mypy<2.0,>=1.11.2; extra == 'dev'
Requires-Dist: openapi-spec-validator<1.0,>=0.7.1; extra == 'dev'
Requires-Dist: pexpect<5.0,>=4.8.0; extra == 'dev'
Requires-Dist: pip-audit<3.0,>=2.7.3; extra == 'dev'
Requires-Dist: prance>=25.4.0.0; extra == 'dev'
Requires-Dist: pydocstyle<7.0,>=6.2.1; extra == 'dev'
Requires-Dist: pytest-asyncio<2.0,>=1.0.0; extra == 'dev'
Requires-Dist: pytest-benchmark<5.0,>=4.0.0; extra == 'dev'
Requires-Dist: pytest-cov<7.0,>=6.2.1; extra == 'dev'
Requires-Dist: pytest-mock<4.0,>=3.14.1; extra == 'dev'
Requires-Dist: pytest-rerunfailures<14.0,>=13.0; extra == 'dev'
Requires-Dist: pytest-timeout<3.0,>=2.4.0; extra == 'dev'
Requires-Dist: pytest<9.0,>=8.4.1; extra == 'dev'
Requires-Dist: radon>=6.0.0; extra == 'dev'
Requires-Dist: reuse<6.0.0,>=4.0.0; extra == 'dev'
Requires-Dist: ruff<1.0,>=0.6.8; extra == 'dev'
Requires-Dist: schemathesis<5.0,>=4.0; extra == 'dev'
Requires-Dist: towncrier<25.0,>=23.0; extra == 'dev'
Requires-Dist: twine<7.0,>=6.1.0; extra == 'dev'
Requires-Dist: types-colorama<1.0,>=0.0.14; extra == 'dev'
Requires-Dist: types-orjson<4.0,>=3.6.0; extra == 'dev'
Requires-Dist: types-pexpect<5.0,>=4.9.0; extra == 'dev'
Requires-Dist: types-psutil<7.0,>=6.0.0; extra == 'dev'
Requires-Dist: types-pyyaml<7.0,>=6.0.12; extra == 'dev'
Requires-Dist: typing-extensions<5.0,>=4.5.0; extra == 'dev'
Requires-Dist: uvicorn<1.0,>=0.30.1; extra == 'dev'
Requires-Dist: vulture<3.0,>=2.7; extra == 'dev'
Description-Content-Type: text/markdown

# Bijux CLI

<a id="top"></a>

**Bijux CLI is a framework for building long-lived, complex command-line tools in Python.**

It is designed for CLIs that **grow**, accumulate features, gain plugins, and must remain **predictable, testable, and understandable** years after their first release.

Bijux is not a wrapper around argument parsing.
It is an **execution framework** for serious tools.

Bijux is built for engineers who care about:

* deterministic global flags (no ambiguity, no surprises),
* first-class plugins with explicit lifecycles,
* a real dependency-injection kernel,
* structured output for automation,
* a unified synchronous **and asynchronous** execution model,
* and an interactive REPL for exploration and debugging.

If you have ever watched a CLI become fragile as it scaled, Bijux exists to prevent that.

[![PyPI - Version](https://img.shields.io/pypi/v/bijux-cli.svg)](https://pypi.org/project/bijux-cli/)
[![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://pypi.org/project/bijux-cli/)
[![Typing: typed (PEP 561)](https://img.shields.io/badge/typing-typed-4F8CC9.svg)](https://peps.python.org/pep-0561/)
[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://raw.githubusercontent.com/bijux/bijux-cli/main/LICENSES/Apache-2.0.txt)
[![Documentation](https://img.shields.io/badge/docs-GitHub%20Pages-brightgreen)](https://bijux.github.io/bijux-cli/)
[![CI Status](https://github.com/bijux/bijux-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/bijux/bijux-cli/actions)

> **At a glance**
> Plugin-driven · Deterministic flags · Dependency Injection · Sync + Async · REPL · JSON/YAML output
> **Quality**
> 1,800+ tests across all layers · 98%+ coverage · Multi-Python CI
> → See [Test Artifacts](https://bijux.github.io/bijux-cli/artifacts/test/) and
> [HTML coverage](https://bijux.github.io/bijux-cli/artifacts/test/htmlcov/index.html)

---

## Table of Contents

* [Why Bijux CLI?](#why-bijux-cli)
* [How to Think About Bijux](#how-to-think-about-bijux)
* [Try It in 20 Seconds](#try-it-in-20-seconds)
* [Key Features](#key-features)
* [Installation](#installation)
* [Platform Support](#platform-support)
* [Quick Start](#quick-start)
* [Plugins in 60 Seconds](#plugins-in-60-seconds)
* [Plugin Non-Goals](#plugin-non-goals)
* [Structured Output](#structured-output)
* [Developer Introspection](#developer-introspection)
* [Global Flags & Strict Precedence](#global-flags--strict-precedence)
* [Built-in Commands](#built-in-commands)
* [When to Use (and Not Use)](#when-to-use-and-not-use)
* [Shell Completion](#shell-completion)
* [Configuration & Paths](#configuration--paths)
* [Tests & Quality](#tests--quality)
* [Project Tree](#project-tree)
* [Stability Notes](#stability-notes)
* [Roadmap](#roadmap)
* [Docs & Resources](#docs--resources)
* [Contributing](#contributing)
* [Acknowledgments](#acknowledgments)
* [License](#license)

---

## Why Bijux CLI?

Click and Typer are excellent for **small or simple tools**.

Bijux is for **complex CLIs** where:

* global flags must behave consistently in CI and automation,
* commands may be synchronous or asynchronous,
* features and plugins are added incrementally,
* internal state must be observable and testable,
* and regressions must be caught early.

Bijux deliberately trades a small amount of upfront structure for **long-term clarity and stability**.

---

## How to Think About Bijux

A Bijux command flows through a **fixed, explicit pipeline**:

```
intent → policy resolution → (sync | async) execution → emission → exit
```

Key principles:

* **Flags never compete** — precedence is strict and deterministic.
* **Decisions are made once**, early in execution.
* **Services are injected**, never hidden behind globals.
* **Commands do not format output** — emission is centralized.
* **Async and sync commands share the same semantics**.
* **The REPL uses the exact same execution path as the CLI**.

If you reason about Bijux in these terms, the framework becomes predictable rather than magical.

---

## Try It in 20 Seconds

```bash
pipx install bijux-cli   # or: pip install bijux-cli

bijux --version
bijux doctor
bijux status -f json --no-pretty
```

---

## Key Features

### Deterministic Global Flags

Global flags follow **strict precedence**, eliminating ambiguity and unexpected behavior in scripts and CI pipelines.

### Unified Sync + Async Execution

Commands may be implemented as synchronous or `async` functions.
Bijux runs both through the same execution pipeline, guaranteeing identical behavior for:

* flag precedence,
* output formatting,
* logging,
* and exit codes.

Async support is part of the core runtime — not a bolt-on.

### Dependency Injection (DI)

All services are explicit and injectable:

* no hidden globals,
* easy mocking,
* inspectable dependency graphs.

### First-Class Plugins

Plugins are treated as real system components:

* scaffolded from templates,
* validated before loading,
* dynamically exposed as top-level commands.

### Interactive REPL

Explore and debug using a persistent shell:

* identical semantics to CLI execution,
* history and introspection built in.

### Structured Output

Every command can emit:

* JSON or YAML,
* pretty or compact,
* consistent error envelopes suitable for automation.

### Built-in Diagnostics

Commands like `doctor`, `audit`, and `docs` help verify environments and workflows.

---

## Installation

Requires **Python ≥ 3.11** (3.11–3.13 tested).

```bash
# Recommended (isolated)
pipx install bijux-cli

# Standard
pip install bijux-cli
```

Upgrade with `pipx upgrade bijux-cli` or `pip install --upgrade bijux-cli`.

---

## Platform Support

* **Supported**: Linux, macOS
r* **Not supported**: Windows

Bijux relies on POSIX filesystem and process semantics.

---

## Quick Start

```bash
bijux --help
bijux doctor

# Enter REPL
bijux
bijux> help
bijux> status
bijux> exit
```

---

## Plugins in 60 Seconds

```bash
# Scaffold a plugin
bijux plugins scaffold my_plugin --template ./plugin_template --force

# Install and explore
bijux plugins install ./my_plugin --force
bijux plugins list
bijux my_plugin --help

# Validate and remove
bijux plugins check my_plugin
bijux plugins uninstall my_plugin
```

Plugins dynamically add **top-level commands** without modifying the core.

---

## Plugin Non-Goals

Bijux plugins are **not sandboxed**.

There are:

* no security guarantees,
* no isolation,
* no permission model.

Only install plugins you trust.

---

## Structured Output

For automation and scripting:

```bash
# Compact JSON
bijux status -f json --no-pretty | jq

# Pretty YAML
bijux status -f yaml --pretty
```

---

## Developer Introspection

```bash
# Inspect the DI graph
bijux dev di -f json

# List loaded plugins
bijux dev list-plugins
```

---

## Global Flags & Strict Precedence

Flags short-circuit in a fixed order.
Once a higher-priority flag applies, lower-priority inputs are ignored.

| Priority | Flag                         | Effect                                 |
| -------: | ---------------------------- | -------------------------------------- |
|        1 | `-h`, `--help`               | Immediate exit with usage              |
|        2 | `-q`, `--quiet`              | Suppress stdout/stderr                 |
|        3 | `--log-level debug`          | Full diagnostics; forces pretty output |
|        4 | `-f`, `--format json / yaml` | Structured output                      |
|        5 | `--pretty / --no-pretty`     | Formatting toggle                      |
|        6 | `--log-level <level>`        | Logging threshold                      |

See the full rationale in the [Precedence docs](https://bijux.github.io/bijux-cli/concepts/precedence/).

---

## Built-in Commands

| Command   | Purpose                 |
| --------- | ----------------------- |
| `doctor`  | Environment diagnostics |
| `status`  | CLI snapshot            |
| `repl`    | Interactive shell       |
| `plugins` | Manage plugins          |
| `config`  | Key-value settings      |
| `history` | REPL history            |
| `audit`   | Security checks         |
| `docs`    | Generate specs/docs     |
| `dev`     | Introspection tools     |
| `sleep`   | Pause execution         |
| `version` | Version info            |

---

## When to Use (and Not Use)

**Use Bijux if you need:**

* extensibility via plugins,
* deterministic behavior in CI,
* sync + async commands under one model,
* structured output,
* testable internals.

**It may be overkill if:**

* you are writing a one-off script,
* your CLI will never grow,
* plugins and DI provide no value.

---

## Shell Completion

```bash
bijux --install-completion
bijux --show-completion
```

Supports Bash, Zsh, Fish, and PowerShell.

---

## Configuration & Paths

Precedence: **flags → env → config → defaults**

| Purpose | Path                | Env                     |
| ------- | ------------------- | ----------------------- |
| Config  | `~/.bijux/.env`     | `BIJUXCLI_CONFIG`       |
| History | `~/.bijux/.history` | `BIJUXCLI_HISTORY_FILE` |
| Plugins | `~/.bijux/.plugins` | `BIJUXCLI_PLUGINS_DIR`  |

---

## Tests & Quality

Bijux is tested to **protect users from regressions**, not to discourage contribution.

* 1,800+ tests across unit, integration, functional, E2E, and nightly layers
* 98%+ coverage enforced in CI
* Property-based and stateful tests
* Benchmarks with thresholds

Run locally:

```bash
make test
make test-unit
make test-night
```

Artifacts:
[https://bijux.github.io/bijux-cli/artifacts/](https://bijux.github.io/bijux-cli/artifacts/)

---

## Project Tree

```text
api/            OpenAPI schemas
config/         Lint/type/security configs
docs/           Documentation (MkDocs)
makefiles/      Task modules
plugin_template/Plugin scaffold
scripts/        Helper scripts
src/bijux_cli/  Core implementation
tests/          All test layers
```

---

## Stability Notes

* Core CLI semantics (flags, precedence, exit behavior) are stable.
* The async execution model is stable and supported.
* Plugin metadata and loader internals may evolve before v1.0.
* Breaking changes, when unavoidable, will be documented clearly.

---

## Roadmap

* **v0.3** — Plugin ergonomics improvements, async-first examples, registry tooling.
* **v1.0** — Plugin compatibility guarantees, long-term stability contract.

---

## Docs & Resources

* Documentation: [https://bijux.github.io/bijux-cli/](https://bijux.github.io/bijux-cli/)
* Artifacts: [https://bijux.github.io/bijux-cli/artifacts/](https://bijux.github.io/bijux-cli/artifacts/)
* Repository: [https://github.com/bijux/bijux-cli](https://github.com/bijux/bijux-cli)

---

## Contributing

Contributions are welcome.
See [CONTRIBUTING.md](https://github.com/bijux/bijux-cli/blob/main/CONTRIBUTING.md).

---

## Acknowledgments

Built on Typer, FastAPI, and Injector.  
Inspired by Click, Typer, and Cobra.  

---

## License

Apache-2.0.
© 2025 Bijan Mousavi.
# Changelog
<a id="top"></a>

All notable changes to **Bijux CLI** are documented here.
This project adheres to [Semantic Versioning](https://semver.org) and the
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format.

<a id="unreleased"></a>

---

<!-- towncrier start -->


<a id="v0-2-0"></a>

## [0.2.0] – 2026-01-26

### Added
- Linear bootstrap flow with explicit phase boundaries and a first-class `CLIIntent`
- Rebuilt E2E suite with domain taxonomy, invariants, and a subprocess harness
- Nightly fuzz and stress suites under `tests/nightly` with dedicated markers
- Expanded regression coverage for bootstrap paths, flags matrix, plugin loader/metadata, and real serializer roundtrips
- Benchmarks with thresholds for startup, discovery (cold/warm), config load, REPL, and help/version fast paths
- API contract gating with stricter schema validation and schemathesis checks
- Docs rebuilt into concepts/guides/reference/examples with section indexes
- API purity guard enabled in CI to prevent IO in API calls

### Changed
- Centralized CLI policy resolution for routing, exit intent, and precedence
- Infra strictness: explicit formats/targets required; no guessing
- Plugin lifecycle contract with explicit states and early metadata validation
- Test organization aligned to `src/` with merged regression suite and nightly rename
- MkDocs generator and nav rebuilt to match the new docs tree

### Fixed
- Help output routing for structured formats
- Exit-policy invariants to detect real Python tracebacks only
- API validation error payloads now JSON-encoded with stable schema

### Removed
- Legacy root docs pages and ADR directory (decisions moved into canonical docs)
- Thin CLI core wrappers (emit/validation) consolidated


[Back to top](#top)

<a id="v0-1-3"></a>

## [0.1.3] – 2025-08-20

### Added
* **ADR-0005:** Zero-root-pollution via **Makefile-orchestrated artifact containment** (all generated outputs under `artifacts/`).  
* **Curated release assets:** zipped bundles for **tests (py311/py312/py313)** and for **lint, quality, security, api, docs, sbom, citation, build**, plus consolidated **checksums**.
* **End-to-end automation:** GitHub Actions to **publish to PyPI**, **create a GitHub Release** with curated bundles, and **deploy docs**.

### Changed
* **Makefiles + workflows** brought into **full ADR-0005 compliance**: CI uploads/downloads only `artifacts/**`; docs deploy hydrates from CI artifacts and builds from `artifacts/docs/**`.

[Back to top](#top)

---

<a id="v0-1-2"></a>

## [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 `publish` workflow now downloads all artifacts from the `CI` run, packages them as `evidence/*.tar.gz` bundles, 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.yml` workflow now uploads each category of artifact separately for better organization and downstream consumption.
    * The `docs.yml` workflow now waits for the main `CI` run to complete, downloads all artifacts, and uses them to build a data-rich documentation site.
    * The `publish.yml` workflow has been streamlined and made more robust, removing the optional "wait for docs" step and improving tag detection.
* **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-top` links, and cross-references to the new artifact pages.
* **Build System:**
    * All `Makefile` modules have been refactored to use the new hygienic `artifacts/` directory structure for outputs and caches.
    * `tox.ini` has been updated to align with the new Makefile targets and to run a comprehensive suite of checks for the `py311` environment, mirroring the full CI validation process.
* **API Schema:** The OpenAPI `schema.yaml` has 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.py` and improved type safety across multiple modules with clearer casts.

### 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.py` by 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.

[Back to top](#top)

---

<a id="v0-1-1"></a>

## [0.1.1] – 2025-08-14

### Added
* **Publish pipeline:** GitHub Actions `publish.yml` that publishes via `make publish` only after required checks are green and a tag is present.
* **Project map:** `PROJECT_TREE.md` (and `docs/project_tree.md`) with a curated overview.
* **Developer Tooling page:** `TOOLING.md` (and `docs/tooling.md`) with embedded configs, Makefile snippets, and CI workflows via `include-markdown`.
* **Docs assets:** Community landing page, Plausible analytics partial, and CSS overrides.

### Changed
* **Docs generator (`scripts/docs_builder/mkdocs_manager.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.md` to power Material’s section indexes.
* **MkDocs config (`mkdocs.yml`):** tightened plugin ordering and settings for `include-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.urls` now points to accurate Homepage/Docs/Changelog/Issues/Discussions.
* **Dynamic versioning from Git tags:** Using `hatch-vcs` with `dynamic = ["version"]`; annotated tags like `v0.1.1` define the release version. `commitizen` tags as `v$version`.
* **Richer PyPI description:** `hatch-fancy-pypi-readme` renders **README.md** + **CHANGELOG.md** on PyPI.
* **Wheel/Sdist layout:** Explicit Hatch build config ensures `py.typed`, licenses, and metadata are included.

[Back to top](#top)

---

<a id="v0-1-0"></a>

## [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.typed` markers for downstream type checking.

* **Services layer**

    * Implemented concrete services for `audit`, `config`, `docs`, `doctor`, `history`, `memory`.
    * Built plugin subsystem: `plugins/{entrypoints,groups,hooks,registry}`.

* **Infra layer** (`infra/`)

    * Implemented `emitter`, `observability`, `process`, `retry`, `serializer`, `telemetry`.

* **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`.

* **Structured output & flags**

    * Added JSON/YAML output via `--format`, pretty printing, and deterministic global flag precedence ([ADR-0002](https://bijux.github.io/bijux-cli/ADR/0002-global-flags-precedence)).

* **API contract validation & testing**

    * Automated lint/validation of `api/*.yaml` with Prance, OpenAPI Spec Validator, Redocly, and OpenAPI Generator.
    * Added **Schemathesis** contract testing against the running server.
    * Pinned OpenAPI Generator CLI version via `OPENAPI_GENERATOR_VERSION` and automated Node.js toolchain setup in Makefile.

* **Documentation tooling**

    * Integrated MkDocs (Material), mkdocstrings, literate-nav, and ADR index generation.

* **Quality & security pipeline**

    * Added formatting/linting: `ruff` (+format).
    * Added typing: `mypy`.
    * 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`.

* **SBOM**

    * Generated CycloneDX JSON for prod/dev dependencies via `make sbom` (uses `pip-audit`).

* **Citation**

    * Validated `CITATION.cff` and added export to BibTeX/RIS/EndNote formats via `make citation`.

* **Makefile architecture**

    * Modularized the Makefile into `makefiles/*.mk` for 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 `bootstrap` target for idempotent virtualenv setup and Git hook installation from `scripts/git-hooks` (skips re-installation if already linked).
    * Added `all-parallel` target to run independent checks (`quality`, `security`, `api`, `docs`) concurrently for faster CI/CD.
    * Added `make help` for self-documenting targets with grouped sections.
    * Provided helper macros (`run_tool`, `read_pyproject_version`) to standardize tooling invocation.

* **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 `MAKEFLAGS` to execute Makefile targets inside tox-managed virtualenvs.

* **Continuous Integration**

    * Added **GitHub Actions** workflow running tox across Python versions with Node.js 20 and Java 17 for API checks.
    * 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`, and `py.typed` included in source distributions.

### Changed

* Released initial public version.

### Fixed

* None

[Back to top](#top)

[Unreleased]: https://github.com/bijux/bijux-cli/compare/v0.2.1...HEAD
[0.2.0]: https://github.com/bijux/bijux-cli/compare/v0.2.0...v0.2.0
[0.1.3]: https://github.com/bijux/bijux-cli/compare/v0.1.2...v0.1.3
[0.1.2]: https://github.com/bijux/bijux-cli/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/bijux/bijux-cli/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/bijux/bijux-cli/releases/tag/v0.1.0
