Metadata-Version: 2.4
Name: archo
Version: 0.1.1
Summary: Generate architecture docs from your codebase
Author-email: nas-0 <66395201+nas-0@users.noreply.github.com>
License: MIT
Description-Content-Type: text/markdown
Requires-Dist: anthropic>=0.84.0
Requires-Dist: python-dotenv>=1.2.2
Requires-Dist: pydantic>=2.0
Requires-Dist: typer>=0.24.0
Requires-Dist: platformdirs>=4.9.4
Requires-Dist: tomli_w>=1.2.0
Provides-Extra: openai
Requires-Dist: openai>=1.0; extra == "openai"

# archo

Generate architecture docs from your codebase

`archo` scans your project, sends the source files to an LLM, and generates an `ARCHO.md` file with a Mermaid architecture diagram and a structured breakdown of routes, dependencies, databases, and pub/sub topics.

```
$ archo
Scanning repo: .

Collected (12 files):
  + src/app.py
  + src/routes/users.py
  + src/services/notification.py
  ...

The following files will be sent to anthropic: [...]
Would you like to continue? [y/n]: y

Generating ARCHO.md...
Done — ARCHO.md written.
```

## Install

```bash
pip install archo
```

For OpenAI support:

```bash
pip install archo[openai]
```

## Quick start

Run `archo` in any project directory:

```bash
cd your-project
archo
```

On first run, you'll be prompted to configure your LLM provider, model, and API key. Config is stored in your system config directory (e.g. `~/.config/archo/config.toml`).

## Supported providers

| Provider | Models                  | Notes |
|----------|-------------------------|-------|
| Anthropic | claude-sonnet-4-6, etc. | Default provider |
| OpenAI | gpt-5.4, etc.           | Requires `pip install archo[openai]` |
| Ollama | Any local model         | Requires a running Ollama instance |

## Commands

```bash
archo              # Generate architecture docs for current directory
archo init         # First-time setup (provider, model, API key)
archo provider     # View or change LLM provider
archo model        # View or change model
archo api-key      # View or change API key
archo llm-host     # View or change Ollama host URL
```

## What it generates

`archo` creates an `ARCHO.md` file containing:

- **Mermaid diagram** — visual map of your service, its routes, outbound calls, databases, and pub/sub topics
- **Routes** — all HTTP endpoints with methods and paths
- **Outbound calls** — services your code talks to and how (REST, gRPC, SDK, etc.)
- **Pub/Sub** — topics your service publishes to and subscribes from
- **Databases** — database types and their collections/tables

## Security

`archo` never sends sensitive files to any LLM provider. The following are always excluded:

- `.env`, `.env.production`, `.env.prod`
- `*.pem`, `*.key`, `*.p12`
- `secrets.yaml`, `credentials.json`

Large files (>50KB), lock files, logs, and common non-source directories (`node_modules`, `.venv`, `__pycache__`, etc.) are also skipped.

## License

MIT
