initial: ollama-compatible facade for claude -p

This commit is contained in:
2026-04-26 14:49:44 +10:00
commit a3be103232
4 changed files with 290 additions and 0 deletions

25
claude-code-proxy.service Normal file
View File

@@ -0,0 +1,25 @@
[Unit]
Description=claude-code-proxy: Ollama-compatible HTTP facade for `claude -p`
Documentation=file:///home/help4bis/claude-proxy/README.md
After=network-online.target
Wants=network-online.target
[Service]
Type=exec
User=help4bis
Group=help4bis
WorkingDirectory=/home/help4bis/claude-proxy
Environment=HOME=/home/help4bis
Environment=PATH=/home/help4bis/.local/bin:/home/help4bis/claude-proxy/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Environment=CLAUDE_PROXY_CONCURRENCY=3
ExecStart=/home/help4bis/claude-proxy/venv/bin/uvicorn app:app --host 127.0.0.1 --port 11435 --workers 1 --log-level info
Restart=always
RestartSec=5s
# Hardening — kept minimal because claude CLI needs free access to $HOME
# for session state, auth cache (~/.claude, ~/.local/state/claude, ~/.cache/claude)
# and the $HOME path is an /mnt bind mount which doesn't play with ProtectHome.
NoNewPrivileges=true
[Install]
WantedBy=multi-user.target