Metadata-Version: 2.4
Name: aptitude
Version: 0.1.0
Summary: Generate reusable AI skills from PDFs, EPUBs, web pages, and GitHub repos using pluggable LLM providers.
Author: VikrantKurada
License-Expression: MIT
Project-URL: Homepage, https://github.com/VikrantKurada/Aptitude
Project-URL: Repository, https://github.com/VikrantKurada/Aptitude
Project-URL: Issues, https://github.com/VikrantKurada/Aptitude/issues
Keywords: ai,llm,skills,claude,cli,pdf,epub,github,mcp,ollama
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Text Processing :: General
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.12
Requires-Dist: httpx>=0.27
Requires-Dist: pypdf>=4.2
Requires-Dist: ebooklib>=0.18
Requires-Dist: beautifulsoup4>=4.12
Requires-Dist: tomli-w>=1.0
Provides-Extra: claude
Requires-Dist: anthropic>=0.34; extra == "claude"
Provides-Extra: gemini
Requires-Dist: google-genai>=0.3; extra == "gemini"
Provides-Extra: all
Requires-Dist: anthropic>=0.34; extra == "all"
Requires-Dist: google-genai>=0.3; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Dynamic: license-file

# Aptitude

[![tests](https://github.com/VikrantKurada/Aptitude/actions/workflows/tests.yml/badge.svg)](https://github.com/VikrantKurada/Aptitude/actions/workflows/tests.yml)

**Generate AI skills from artifacts.**

Aptitude reads PDFs, EPUBs, web pages, and GitHub repositories, and turns them — plus a one-line prompt — into a reusable skill: a `SKILL.md` with its supporting files, or the same content repackaged for another runtime. The artifacts say what is true, the prompt says what is relevant.

## Install

```bash
pip install -e ".[dev]"
```

That installs the CLI in editable mode with the test dependencies; afterwards you can run `aptitude ...` or `python -m aptitude ...`. To skip the setup, use the launchers instead — `start.sh` (Linux/macOS) and `start.ps1` (Windows) create a local virtual environment on first run, install Aptitude into it, and forward every argument straight to the CLI.

```bash
./start.sh providers          # Linux / macOS
.\start.ps1 providers         # Windows (PowerShell)
```

## Example

```bash
aptitude create \
  -p "Onboard a new engineer to this HTTP library: what it does, how it is laid out, and where to start reading" \
  -i psf/requests \
  --provider ollama --model mistral-small:latest
```

The model names the skill, and the directory is named after it. This is the tree that run produced:

```text
out/
└── onboard-new-engineer-to-requests-library/
    ├── SKILL.md                     # YAML frontmatter (name, description) then the body
    └── references/
        └── source-material.md       # the whole corpus distilled into one reference file
```

```bash
$ aptitude validate ./out/onboard-new-engineer-to-requests-library
valid
```

That is the default format. The other file-writing formats write into the same flat `out/<skill-name>/` directory too, except `zip`, whose archive lands beside it as `out/<skill-name>.zip`. `--format all` runs each one in turn — [Anatomy of a Generated Skill](docs/product/anatomy.md) walks through a real `--format all` run file by file, including the format that writes nothing.

## Providers

| Provider | API key environment variable | Default model |
|----------|-------------------------------|----------------|
| `claude` | `ANTHROPIC_API_KEY` | `claude-sonnet-5` |
| `gemini` | `GEMINI_API_KEY` | `gemini-2.0-flash` |
| `nvidia` | `NVIDIA_API_KEY` | `meta/llama-3.1-70b-instruct` |
| `ollama` | None (local) | `llama3.1` |
| `openai` | `OPENAI_API_KEY` | `gpt-4o-mini` |

Choose one with `--provider`, `APTITUDE_PROVIDER`, or `provider` in `aptitude.toml`. With none of those set, Aptitude uses `claude` when `ANTHROPIC_API_KEY` is present and `ollama` otherwise. Full precedence rules, per-command options, and the two synthesis strategies are in [docs/product/features.md](docs/product/features.md).

## Output formats

| Format | What it writes |
|--------|----------------|
| `claude-skill` | `SKILL.md` plus reference files, for Claude Canvas or Skill Builder |
| `generic-prompt` | `<skill-name>.md` and `<skill-name>.json`, both carrying one prompt ready to paste into any chat |
| `local-llm` | An Ollama `Modelfile` and a `system.txt`, both carrying the same prompt text as `generic-prompt` |
| `mcp-manifest` | Nothing, today: the exporter returns early while `draft.tools` is empty, and nothing populates it |
| `zip` | An archive of everything already in `out/<skill-name>/`, so under `--format all` it picks up the other formats' files too |

Select with `--format` (default `claude-skill`), comma-separated for several, or `--format all` for every one. Per-format detail is in [docs/product/features.md](docs/product/features.md).

## Documentation

Start at [docs/index.md](docs/index.md), or go straight to a page:

| Page | For |
|---|---|
| [Why Aptitude Exists](docs/why.md) | Understanding the problem it solves |
| [What Aptitude Does](docs/product/features.md) | Commands, providers, formats, configuration |
| [Anatomy of a Generated Skill](docs/product/anatomy.md) | What the output actually looks like |
| [The Product Manager's View](docs/product/perspective.md) | Why it was sequenced this way |
| [Where This Goes](docs/product/roadmap.md) | What is planned, and what is not |
| [The Architect's View](docs/engineering/architecture.md) | How fifty combinations fit in 1,371 lines |
| [Key Decisions](docs/engineering/decisions.md) | What was chosen, rejected, and what would change it |
| [Adding a Provider, Format, or Adapter](docs/engineering/extending.md) | Contributing code |
| [The Art of the Possible](docs/possible.md) | Recipes and speculation |
| [What It Doesn't Do Yet](docs/limitations.md) | Known gaps, with evidence |

`aptitude --help` and `aptitude COMMAND --help` cover the same surface from the terminal.
