Metadata-Version: 2.4
Name: noidea
Version: 0.2.1
Summary: AI powered commit suggestions
License: MIT
License-File: LICENSE
Author: AccursedGalaxy
Author-email: robinbohrer7@gmail.com
Requires-Python: >=3.10
Classifier: License :: OSI Approved :: MIT License
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: Programming Language :: Python :: 3.14
Requires-Dist: anthropic (>=0.85.0,<0.86.0)
Requires-Dist: keyring (>=25.7.0,<26.0.0)
Requires-Dist: pytest (>=9.0.2,<10.0.0)
Requires-Dist: python-dotenv (>=1.2.2,<2.0.0)
Requires-Dist: typer (>=0.24.1,<0.25.0)
Description-Content-Type: text/markdown

# noidea

AI-powered commit message suggestions via git hooks. Stages a diff, sends it to Claude, and pre-fills your commit editor.

## Install

```bash
pipx install noidea
noidea init
```

> Requires [pipx](https://pipx.pypa.io). Alternatively: `pip install noidea`

`noidea init` installs a `prepare-commit-msg` hook in your repo. From then on, every `git commit` opens your editor with a suggested message pre-filled.

## API Key Setup

noidea needs an Anthropic API key. Three options (checked in order):

1. **Keyring** (recommended): `noidea keys add`
2. **Environment variable**: `export ANTHROPIC_API_KEY=sk-ant-...`
3. **`.env` file**: `ANTHROPIC_API_KEY=sk-ant-...` in a `.env` file

## Commands

### `noidea init`
Installs the `prepare-commit-msg` hook. Backs up any existing hook as `.bak`. Respects `core.hooksPath`.

### `noidea suggest`
Generates a commit message from the current staged diff and prints it.

```
Options:
  -F, --file TEXT   Write message to file instead of stdout (used by the hook)
```

### `noidea keys`

Manage API keys stored in the system keyring.

```bash
noidea keys list    # List saved keys
noidea keys add     # Add a key interactively
noidea keys remove  # Remove a key interactively
```

### `noidea test`
Sends a test message to the Claude API to verify your key and connectivity work.

### `noidea update`
Updates noidea via `pipx upgrade noidea` (falls back to `pip install --upgrade noidea`).

### `noidea --version`
Prints the current version.

## Config

Optional config at `~/.noidea/noidea.toml`:

```toml
[llm]
model = "claude-sonnet-4-6"
max_tokens = 1024
system_prompt = "Your custom prompt here"
```

Falls back to built-in defaults if no config file exists. The default prompt follows conventional commits style (feat/fix/refactor/etc.) with a 72-character subject line limit.

## Requirements

- Python 3.13+
- Anthropic API key

