-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·41 lines (34 loc) · 1.71 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·41 lines (34 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
# Claude Code CLI + AMC Integration
#
# This script configures environment variables so that Claude Code CLI
# routes all API calls through the AMC Gateway for evidence collection.
#
# Usage:
# source setup.sh # Set env vars in current shell
# claude "your prompt" # Claude Code now routes through AMC
#
# Or use amc wrap directly:
# amc wrap claude-cli -- claude "your prompt"
set -euo pipefail
# ─── AMC Integration ───────────────────────────────────────────────
# Claude Code reads ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY from env.
# AMC's claude-cli adapter sets these to route through the gateway.
# Check if AMC gateway is running
AMC_GATEWAY_URL="${AMC_GATEWAY_URL:-http://localhost:3700}"
echo "[AMC] Configuring Claude Code CLI for AMC evidence collection"
echo "[AMC] Gateway URL: ${AMC_GATEWAY_URL}"
# Set Anthropic-specific env vars to point at AMC Gateway
export ANTHROPIC_BASE_URL="${AMC_GATEWAY_URL}/v1"
export ANTHROPIC_API_URL="${AMC_GATEWAY_URL}/v1"
export AMC_LLM_BASE_URL="${AMC_GATEWAY_URL}/v1"
# Proxy settings for additional capture
export HTTP_PROXY="${AMC_GATEWAY_URL}"
export HTTPS_PROXY="${AMC_GATEWAY_URL}"
export NO_PROXY="localhost,127.0.0.1,::1"
echo "[AMC] Environment configured. Run Claude Code normally:"
echo " claude \"What is the capital of France?\""
echo ""
echo "[AMC] Or use amc wrap for automatic setup:"
echo " amc wrap claude-cli -- claude \"your prompt\""
# ────────────────────────────────────────────────────────────────────