Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@
CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000

# =============================================================================
# OPTION 1: Direct Anthropic (default, no router)
# OPTION 1: Claude Code login (easiest — no API key needed)
# =============================================================================
ANTHROPIC_API_KEY=your-api-key-here
# Just run `claude login` on the host. Shannon mounts ~/.claude into Docker
# automatically. You only need this file with the line above.

# =============================================================================
# OPTION 2: Direct Anthropic API key
# =============================================================================
# ANTHROPIC_API_KEY=your-api-key-here

# OR use OAuth token instead
# CLAUDE_CODE_OAUTH_TOKEN=your-oauth-token-here
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ Shannon is available in two editions:

- **Docker** - Container runtime ([Install Docker](https://docs.docker.com/get-docker/))
- **AI Provider Credentials** (choose one):
- **Anthropic API key** (recommended) - Get from [Anthropic Console](https://console.anthropic.com)
- **Claude Code login** (easiest) - Just run `claude login` on the host
- **Anthropic API key** - Get from [Anthropic Console](https://console.anthropic.com)
- **Claude Code OAuth token**
- **[EXPERIMENTAL - UNSUPPORTED] Alternative providers via Router Mode** - OpenAI or Google Gemini via OpenRouter (see [Router Mode](#experimental---unsupported-router-mode-alternative-providers))

Expand All @@ -117,11 +118,17 @@ cd shannon

# 2. Configure credentials (choose one method)

# Option A: Export environment variables
# Option A: Use Claude Code login (easiest — no API key needed)
claude login
cat > .env << 'EOF'
CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000
EOF

# Option B: Export environment variables
export ANTHROPIC_API_KEY="your-api-key" # or CLAUDE_CODE_OAUTH_TOKEN
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000 # recommended

# Option B: Create a .env file
# Option C: Create a .env file with API key
cat > .env << 'EOF'
ANTHROPIC_API_KEY=your-api-key
CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ services:
- ${OUTPUT_DIR:-./audit-logs}:/app/output
- ${TARGET_REPO:-.}:/target-repo
- ${BENCHMARKS_BASE:-.}:/benchmarks
- ${HOME}/.claude:/tmp/.claude
shm_size: 2gb
ipc: host
security_opt:
Expand Down
4 changes: 3 additions & 1 deletion shannon
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@ cmd_start() {
if [ "$ROUTER" = "true" ] && { [ -n "$OPENAI_API_KEY" ] || [ -n "$OPENROUTER_API_KEY" ]; }; then
# Router mode with alternative provider - set a placeholder for SDK init
export ANTHROPIC_API_KEY="router-mode"
elif [ -f "$HOME/.claude/.credentials.json" ]; then
echo "Using Claude Code login credentials..."
else
echo "ERROR: Set ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN in .env"
echo " (or use ROUTER=true with OPENAI_API_KEY or OPENROUTER_API_KEY)"
echo " Or log in with: claude login"
exit 1
fi
fi
Expand Down