Descends, sniffs out the manifests, leafs through commits, comes back up with a .md thing.
```bash go install github.com/elev1e1n/spelunk-md@latest spelunk-md --api-key sk-or-xxxxxxxxxxxxxxxx cd /path/to/your/project spelunk-md ```
Tip
No need to save the key — OPENROUTER_API_KEY works too. The spelunker isn't picky.
A file tree (respecting .gitignore), manifests (go.mod, package.json, Cargo.toml), key configs, the last 30 commits, a README if you're lucky. All of it goes into one prompt, the prompt goes to OpenRouter, out comes a map file.
It won't touch an existing file without asking. If manners get in the way — --force.
Note
deepseek/deepseek-v4-flash runs by default — cheap, fast. For a more deliberate result — --model anthropic/claude-sonnet-4.6 or --model google/gemini-2.5-pro.
```bash spelunk-md --path ~/projects/my-app spelunk-md --model anthropic/claude-opus-4 spelunk-md --dry-run spelunk-md --output docs/PROJECT.md --force spelunk-md --api-key clear ```
Full flag list: spelunk-md --help.
```bash go install github.com/elev1e1n/spelunk-md@latest go install github.com/elev1e1n/spelunk-md@v1.0.0 ```
Or from source:
```bash git clone https://github.com/elev1e1n/spelunk-md cd spelunk-md just build ```
Important
The key lives in the system keyring — Keychain, Credential Manager, or Secret Service. It never appears in code or project files.