cc-connect on Hugging Face Spaces (Private, Matrix Gitter bridge)

Bridge your Gitter / Matrix chat to Claude Code, running on HF Space. No public web exposure — cc-connect is a Matrix bot service using sync long-polling.

Platform Choice: Why Matrix (Gitter bridge)

6-22: Slack manifest mode 死结 (短名 slash command 政策改),改走 Matrix.

  • homeserver: https://gitter.ems.host (社区自建 Gitter 桥接 homeserver)
  • identity server: https://vector.im
  • user: @agent:gitter.im
  • access token: mat_Wz3t7HAFYvXZnPKgauUmIpTHiyCnHC_CBhOq1 (mautrix 旧 prefix)
  • HF 容器 6-22 05:55:06 实测:matrix: connected user_id=@agent:gitter.im + platform ready + cc-connect is running projects=1

View Logs

# Install
pip install -U "huggingface_hub[cli]"

# Login
hf auth login

# Runtime logs
hf spaces logs ce9900ce/cc-connect-matrix --tail 100

# Stream live
hf spaces logs ce9900ce/cc-connect-matrix --follow

Quick Deploy (5 minutes after getting 2 tokens)

# Get ANTHROPIC_API_KEY from console.anthropic.com
./deploy-matrix-hf.sh '<MATRIX_ACCESS_TOKEN>' '<ANTHROPIC_API_KEY>'
# Auto-creates private Space + Dataset + 3 Secrets + push code
# Watch: hf spaces logs ce9900ce/cc-connect-matrix --follow

Hetzner Alternative (5 minutes)

If you have a Hetzner VPS, even faster:

./deploy-hetzner.sh <vps-ip>
# Edit .env with tokens, then: docker compose restart

Architecture

HF Space Container (Debian 12, no public port)
+- start.sh (PID 1)
   +- cc-connect v1.4.0-beta.1 (Go binary)  ← Matrix sync long-polling ↔ Claude Code
   +- Claude Code CLI (npm)
   +- sync_loop.sh           ← git commit + push to HF Dataset every 5min
   +- watchdog.sh            ← keep cc-connect alive
         v git push/pull v
HF Dataset (persistent storage)

No port 8080. No web UI. Just a Matrix bot.

Setup

1. Matrix account (already done)

大古已经提供 token. Gitter 桥接 homeserver gitter.ems.host, user @agent:gitter.im.

2. Create HF Dataset (auto-done by deploy script)

ce9900ce/cc-connect-state-matrix, Private

3. Create HF Space (auto-done by deploy script)

ce9900ce/cc-connect-matrix, SDK: Docker, Private

4. Space Secrets (auto-added by deploy script)

Secret Value
MATRIX_ACCESS_TOKEN mat_xxx from Gitter bridge
ANTHROPIC_API_KEY From console.anthropic.com
HF_TOKEN HF write token (for sync_loop)

5. Upload code (auto-push by deploy script)

deploy script does: git push -f to Space repo.

Usage

In Element / Gitter:

  • Find bot: @agent:gitter.im (Matrix user)
  • DM: Send direct message
  • Channel: @agent:gitter.im hello

License

MIT.

Mon Jun 22 07:16:15 UTC 2026

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support