Metadata-Version: 2.4
Name: acli-spec
Version: 0.3.0
Summary: Python SDK for the ACLI (Agent-friendly CLI) specification
Project-URL: Homepage, https://github.com/alpibrusl/acli
Project-URL: Documentation, https://alpibrusl.github.io/acli
Project-URL: Repository, https://github.com/alpibrusl/acli
Project-URL: Issues, https://github.com/alpibrusl/acli/issues
Project-URL: Changelog, https://github.com/alpibrusl/acli/blob/main/CHANGELOG.md
Author: ACLI Contributors
License-Expression: EUPL-1.2
Keywords: agent,ai,cli,specification
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: typer>=0.9.0
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Description-Content-Type: text/markdown

# acli-spec

Python SDK for the [ACLI (Agent-friendly CLI) specification](../../ACLI_SPEC.md).

Build CLI tools that AI agents can discover, learn, and use autonomously.

## Installation

```bash
pip install acli-spec
```

## Quick Start

```python
from pathlib import Path
from acli import ACLIApp, acli_command, OutputFormat
import typer

app = ACLIApp(name="myapp", version="1.0.0")

@app.command()
@acli_command(
    examples=[
        ("Run a task", "myapp run --file task.yaml"),
        ("Dry-run a task", "myapp run --file task.yaml --dry-run"),
    ],
    idempotent=False,
)
def run(
    file: Path = typer.Option(..., help="Path to task file. type:path"),
    dry_run: bool = typer.Option(False, help="Preview without executing."),
    output: OutputFormat = typer.Option(OutputFormat.text, help="Output format."),
) -> None:
    """Execute a task from a YAML file."""
    ...

if __name__ == "__main__":
    app.run()
```

## What you get automatically

- `introspect` command with full command tree as JSON
- `.cli/` folder generation (README, examples, schemas)
- JSON error envelope on `--output json`
- Semantic exit codes (0-9)
- `--version` with semver output

## License

[EUPL-1.2](../../LICENSE)
