Metadata-Version: 2.4
Name: ainfera
Version: 0.1.0
Summary: CLI for the Ainfera AI agent infrastructure platform
Project-URL: Homepage, https://ainfera.ai
Project-URL: Documentation, https://docs.ainfera.ai
Project-URL: Repository, https://github.com/ainfera-ai/cli
Project-URL: Changelog, https://github.com/ainfera-ai/cli/blob/main/CHANGELOG.md
Author-email: Ainfera Technologies <labs@ainfera.ai>
License: Apache-2.0
License-File: LICENSE
Keywords: agents,ai,cli,infrastructure,trust
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.10
Requires-Dist: click>=8.1
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic-settings>=2.0
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.0
Requires-Dist: websockets>=12.0
Provides-Extra: dev
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Description-Content-Type: text/markdown

# ainfera

The CLI for the [Ainfera](https://ainfera.ai) AI agent infrastructure platform.

Deploy AI agents with trust scores, kill switches, and metered billing.
One command.

## Install

```bash
pip install ainfera
```

## Quick Start

```bash
# Authenticate
ainfera login --key ainf_your_api_key

# Initialize in your agent repo
cd my-agent
ainfera init

# Deploy
ainfera deploy

# Check trust score
ainfera trust

# View live logs
ainfera logs --follow

# Emergency stop
ainfera kill
```

## Commands

| Command | Description |
|---------|-------------|
| `ainfera login` | Authenticate with your API key |
| `ainfera init` | Detect framework and generate ainfera.yaml |
| `ainfera deploy` | Deploy agent to sandboxed environment |
| `ainfera status` | View agent status and trust score |
| `ainfera trust` | Detailed trust score breakdown |
| `ainfera kill` | Trigger kill switch (emergency stop) |
| `ainfera logs` | View or stream execution logs |

## Configuration

The CLI stores config in `~/.ainfera/config.yaml`:

```yaml
api_key: ainf_your_key
api_url: https://api.ainfera.ai
default_agent: a1b2c3d4-...
```

Or use environment variables:
- `AINFERA_API_KEY` — API key (overrides config file)
- `AINFERA_API_URL` — API endpoint (default: https://api.ainfera.ai)

## JSON Output

Every command supports `--json` for scripting:

```bash
ainfera status --json | jq '.trust_grade'
ainfera trust --json | jq '.dimensions'
```

## ainfera.yaml

Configuration for your agent lives in `ainfera.yaml` at the repo root:

```yaml
name: research-agent
framework: langchain
version: 0.1.0

compute:
  sandbox: docker
  memory: 512mb
  cpu: 1
  timeout: 300s

trust:
  anomaly_detection: true
  quarantine_threshold: 400

billing:
  model: per_call
  price_per_call: 0.003
  creator_share: 0.80

inference:
  provider: openai
  model: gpt-4o-mini

kill_switch:
  enabled: true
  auto_quarantine: true
```

## Links

- [Documentation](https://docs.ainfera.ai)
- [Console](https://console.ainfera.ai)
- [API Reference](https://api.ainfera.ai/docs)
- [GitHub](https://github.com/ainfera-ai)

## License

Apache 2.0 — see [LICENSE](LICENSE)
