Metadata-Version: 2.4
Name: specfact-cli
Version: 0.4.0
Summary: SpecFact CLI - Spec→Contract→Sentinel tool for contract-driven development with automated quality gates
Project-URL: Homepage, https://github.com/nold-ai/specfact-cli
Project-URL: Repository, https://github.com/nold-ai/specfact-cli.git
Project-URL: Documentation, https://github.com/nold-ai/specfact-cli#readme
Project-URL: Issues, https://github.com/nold-ai/specfact-cli/issues
Author-email: "NOLD AI (Owner: Dominikus Nold)" <hello@noldai.com>
License: # Sustainable Use License
        
        Version 1.0
        
        ## Acceptance
        
        By using the software, you agree to all of the terms and conditions below.
        
        ## Copyright License
        
        The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations below.
        
        ## Limitations
        
        You may use or modify the software only for your own internal business purposes or for non-commercial or personal use. You may distribute the software or provide it to others only if you do so free of charge for non-commercial purposes. You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor's trademarks is subject to applicable law.
        
        ## Patents
        
        The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
        
        ## Notices
        
        You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms. If you modify the software, you must include in any modified copies of the software a prominent notice stating that you have modified the software.
        
        ## No Other Rights
        
        These terms do not imply any licenses other than those expressly granted in these terms.
        
        ## Termination
        
        If you use the software in violation of these terms, such use is not licensed, and your license will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your license will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your license to terminate automatically and permanently.
        
        ## No Liability
        
        As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
        
        ## Definitions
        
        The "licensor" is Nold AI (Owner: Dominikus Nold).
        
        The "software" is the SpecFact CLI software the licensor makes available under these terms, including any portion of it.
        
        "You" refers to the individual or entity agreeing to these terms.
        
        "Your company" is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. Control means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
        
        "Your license" is the license granted to you for the software under these terms.
        
        "Use" means anything you do with the software requiring your license.
        
        "Trademark" means trademarks, service marks, and similar rights.
        
        ---
        
        Copyright (c) 2025 Nold AI (Owner: Dominikus Nold)
License-File: LICENSE.md
Keywords: async,beartype,cli,contract-driven-development,contracts,crosshair,icontract,property-based-testing,quality-gates,spec-first,specfact,state-machine,tdd
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.11
Requires-Dist: beartype>=0.22.4
Requires-Dist: crosshair-tool>=0.0.97
Requires-Dist: gitpython>=3.1.45
Requires-Dist: hypothesis>=6.142.4
Requires-Dist: icontract>=2.7.1
Requires-Dist: jinja2>=3.1.6
Requires-Dist: jsonschema>=4.23.0
Requires-Dist: networkx>=3.4.2
Requires-Dist: pydantic>=2.12.3
Requires-Dist: python-dotenv>=1.2.1
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: rich<14.0.0,>=13.0.0
Requires-Dist: ruamel-yaml>=0.18.16
Requires-Dist: ruff>=0.14.2
Requires-Dist: typer>=0.20.0
Requires-Dist: typing-extensions>=4.15.0
Provides-Extra: dev
Requires-Dist: basedpyright>=1.32.1; extra == 'dev'
Requires-Dist: beartype>=0.22.4; extra == 'dev'
Requires-Dist: black>=25.9.0; extra == 'dev'
Requires-Dist: crosshair-tool>=0.0.97; extra == 'dev'
Requires-Dist: hypothesis>=6.142.4; extra == 'dev'
Requires-Dist: icontract>=2.7.1; extra == 'dev'
Requires-Dist: isort>=7.0.0; extra == 'dev'
Requires-Dist: pip-tools>=7.5.1; extra == 'dev'
Requires-Dist: pylint>=4.0.2; extra == 'dev'
Requires-Dist: pytest-asyncio>=1.2.0; extra == 'dev'
Requires-Dist: pytest-cov>=7.0.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.15.1; extra == 'dev'
Requires-Dist: pytest-xdist>=3.8.0; extra == 'dev'
Requires-Dist: pytest>=8.4.2; extra == 'dev'
Requires-Dist: ruff>=0.14.2; extra == 'dev'
Requires-Dist: semgrep>=1.141.1; extra == 'dev'
Requires-Dist: tomlkit>=0.13.3; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0.12.20250516; extra == 'dev'
Provides-Extra: scanning
Requires-Dist: semgrep>=1.141.1; extra == 'scanning'
Description-Content-Type: text/markdown

# SpecFact CLI

> **Stop "vibe coding", start shipping quality code with contracts**

[![License](https://img.shields.io/badge/license-Sustainable%20Use-blue.svg)](LICENSE.md)
[![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/)
[![Status](https://img.shields.io/badge/status-beta-orange.svg)](https://github.com/nold-ai/specfact-cli)

---

## What is SpecFact CLI?

A command-line tool that helps you write better code by enforcing **contracts** - rules that catch bugs before they reach production.

Think of it as a **quality gate** for your development workflow that:

- ✅ Catches async bugs automatically
- ✅ Validates your code matches your specs
- ✅ Blocks bad code from merging
- ✅ Works offline, no cloud required

**Perfect for:** Teams who want to ship faster without breaking things.

---

## Quick Start

### Install in 10 seconds

```bash
# Zero-install (just run it)
uvx specfact --help

# Or install with pip
pip install specfact-cli
```

### Your first command (< 60 seconds)

```bash
# Starting a new project?
specfact plan init --interactive

# Have existing code?
specfact import from-code --repo . --name my-project

# Using GitHub Spec-Kit?
specfact import from-spec-kit --repo ./my-project --dry-run
```

That's it! 🎉

---

## See It In Action

We ran SpecFact CLI **on itself** to prove it works:

- ⚡ Analyzed 32 Python files → Discovered **32 features** and **81 stories** in **3 seconds**
- 🚫 Set enforcement to "balanced" → **Blocked 2 HIGH violations** (as configured)
- 📊 Compared manual vs auto-derived plans → Found **24 deviations** in **5 seconds**

**Total time**: < 10 seconds | **Total value**: Found real naming inconsistencies and undocumented features

👉 **[Read the complete example](docs/examples/dogfooding-specfact-cli.md)** with actual commands and outputs

---

## What Can You Do?

### 1. 🔄 Import from GitHub Spec-Kit

Already using Spec-Kit? **Level up to automated enforcement** in one command:

```bash
specfact import from-spec-kit --repo ./spec-kit-project --write
```

**Result**: Your Spec-Kit artifacts become production-ready contracts with automated quality gates.

### 2. 🔍 Analyze Your Existing Code

Turn brownfield code into a clean spec:

```bash
specfact import from-code --repo . --name my-project
```

**Result**: Auto-generated plan showing what your code actually does

### 3. 📋 Plan New Features

Start with a spec, not with code:

```bash
specfact plan init --interactive
specfact plan add-feature --key FEATURE-001 --title "User Login"
```

**Result**: Clear acceptance criteria before writing any code

### 4. 🛡️ Enforce Quality

Set rules that actually block bad code:

```bash
specfact enforce stage --preset balanced
```

**Modes:**

- `minimal` - Just observe, never block
- `balanced` - Block critical bugs, warn on others
- `strict` - Block everything suspicious

### 5. ✅ Validate Everything

One command to check it all:

```bash
specfact repro
```

**Checks:** Contracts, types, async patterns, state machines

---

## Documentation

For complete documentation, see **[docs/README.md](docs/README.md)**.

**Quick Links:**

- 📖 **[Getting Started](docs/getting-started/README.md)** - Installation and first steps
- 🎯 **[The Journey: From Spec-Kit to SpecFact](docs/guides/speckit-journey.md)** - Level up from interactive authoring to automated enforcement
- 📋 **[Command Reference](docs/reference/commands.md)** - All commands with examples
- 🤖 **[IDE Integration](docs/guides/ide-integration.md)** - Set up slash commands in your IDE
- 💡 **[Use Cases](docs/guides/use-cases.md)** - Real-world scenarios

---

## Installation Options

### 1. uvx (Easiest)

No installation needed:

```bash
uvx specfact plan init
```

### 2. pip

Install globally:

```bash
pip install specfact-cli
specfact --help
```

### 3. Docker

Run in a container:

```bash
docker run ghcr.io/nold-ai/specfact-cli:latest --help
```

---

## Contributing

We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

```bash
git clone https://github.com/nold-ai/specfact-cli.git
cd specfact-cli
pip install -e ".[dev]"
hatch run contract-test-full
```

---

## License

**Sustainable Use License** - Free for internal business use

### ✅ You Can

- Use it for your business (internal tools, automation)
- Modify it for your own needs
- Provide consulting services using SpecFact CLI

### ❌ You Cannot

- Sell it as a SaaS product
- White-label and resell
- Create competing products

For commercial licensing, contact [hello@noldai.com](mailto:hello@noldai.com)

**Full license**: [LICENSE.md](LICENSE.md) | **FAQ**: [USAGE-FAQ.md](USAGE-FAQ.md)

---

## Support

- 💬 **Questions?** [GitHub Discussions](https://github.com/nold-ai/specfact-cli/discussions)
- 🐛 **Found a bug?** [GitHub Issues](https://github.com/nold-ai/specfact-cli/issues)
- 📧 **Need help?** [hello@noldai.com](mailto:hello@noldai.com)

---

> **Built with ❤️ by [NOLD AI](https://noldai.com)**

Copyright © 2025 Nold AI (Owner: Dominikus Nold)
