docs: update env-based OpenRouter profile setup
This commit is contained in:
parent
7fd845235c
commit
3b8aee4cbf
4 changed files with 62 additions and 25 deletions
61
README.md
61
README.md
|
|
@ -12,7 +12,8 @@ Claude Code über einfache Profile starten:
|
|||
- `claude-free`
|
||||
- `claude-profile <name>`
|
||||
|
||||
Die eigentliche Konfiguration liegt in einer YAML-Datei.
|
||||
Die eigentliche Konfiguration der Modelle liegt in einer YAML-Datei.
|
||||
Der OpenRouter-API-Key kommt aus der Shell-Umgebung.
|
||||
|
||||
## Voraussetzungen
|
||||
|
||||
|
|
@ -42,6 +43,24 @@ chmod +x bin/claude-profile bin/install-claude-profiles lib/profiles.sh
|
|||
source ~/.bashrc
|
||||
```
|
||||
|
||||
## OpenRouter-Key setzen
|
||||
|
||||
Der OpenRouter-Key wird **nicht** in `config/profiles.yml` gespeichert.
|
||||
Stattdessen wird er über die Shell-Umgebung gesetzt.
|
||||
|
||||
Temporär für die aktuelle Session:
|
||||
|
||||
```bash
|
||||
export OPENROUTER_API_KEY="sk-or-v1-..."
|
||||
```
|
||||
|
||||
Dauerhaft in `~/.bashrc`:
|
||||
|
||||
```bash
|
||||
export OPENROUTER_API_KEY="sk-or-v1-..."
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
## Nutzung
|
||||
|
||||
```bash
|
||||
|
|
@ -57,10 +76,46 @@ Oder generisch:
|
|||
claude-profile pro
|
||||
claude-profile glm
|
||||
claude-profile kimi
|
||||
claude-profile free
|
||||
```
|
||||
|
||||
## Konfiguration
|
||||
|
||||
Die Datei `config/profiles.yml` enthält nur noch:
|
||||
|
||||
- den Startbefehl für Claude Code,
|
||||
- die OpenRouter-Base-URL,
|
||||
- die Profile,
|
||||
- die Modellnamen.
|
||||
|
||||
Beispiel:
|
||||
|
||||
```yaml
|
||||
defaults:
|
||||
claude_cmd: "claude"
|
||||
openrouter_base_url: "https://openrouter.ai/api"
|
||||
|
||||
profiles:
|
||||
pro:
|
||||
mode: "pro"
|
||||
|
||||
glm:
|
||||
mode: "openrouter"
|
||||
model: "z-ai/glm-5.2"
|
||||
|
||||
kimi:
|
||||
mode: "openrouter"
|
||||
model: "moonshotai/kimi-k2.7-code"
|
||||
|
||||
free:
|
||||
mode: "openrouter"
|
||||
model: "openrouter/free"
|
||||
```
|
||||
|
||||
## Sicherheit
|
||||
|
||||
`config/profiles.yml` enthält echte Keys und wird nicht committed.
|
||||
Nur `config/profiles.example.yml` gehört ins Repo.
|
||||
`config/profiles.yml` enthält lokale Einstellungen und bleibt unversioniert.
|
||||
Nur `config/profiles.example.yml` gehört ins Repository.
|
||||
|
||||
Keine echten API-Keys committen.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue