Spaces:
Paused

File size: 1,335 Bytes
67e48b1
 
3a29b38
67e48b1
 
 
3a29b38
67e48b1
3a29b38
 
 
1e79bdd
3a29b38
9a4934f
 
 
 
 
 
3a29b38
438a95f
67e48b1
 
3a29b38
 
438a95f
3a29b38
1e79bdd
3a29b38
9a4934f
 
 
1e79bdd
3a29b38
438a95f
3a29b38
1e79bdd
3a29b38
438a95f
3a29b38
 
 
 
 
438a95f
9a4934f
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
42
43
44
45
46
47
---
title: Claude Code
emoji: 🧠
colorFrom: indigo
colorTo: gray
sdk: docker
app_port: 7860
pinned: false
suggested_storage: small
suggested_variables:
  - name: WORKSPACE_GIT_REPO
    description: "Optional Git repository URL to clone into /workspace/project on first boot."
suggested_secrets:
  - name: ZAI_API_KEY
    description: "Z.AI / GLM key used by Claude Code."
  - name: SLACK_BOT_TOKEN
    description: "Slack bot token for Socket Mode replies."
  - name: SLACK_APP_TOKEN
    description: "Slack app-level token for Socket Mode."
  - name: ACCESS_TOKEN
    description: "Strong password for browser IDE access."
---

# Claude Code on Hugging Face Spaces

This private Docker Space runs Anthropic Claude Code in a protected browser IDE/terminal.

Set these Space secrets before starting:

- `ZAI_API_KEY` or `ANTHROPIC_AUTH_TOKEN`
- `SLACK_BOT_TOKEN`
- `SLACK_APP_TOKEN`
- `ACCESS_TOKEN`

Optional variable:

- `WORKSPACE_GIT_REPO`, clones into `/workspace/project` on first boot

Open the Space, sign in with `ACCESS_TOKEN`, open the integrated terminal, then run:

```bash
claude
```

The image installs Claude Code via the npm package and exposes it through code-server's browser terminal.
When Slack secrets are present, the Space also starts a Socket Mode Slack bot that answers app mentions with Claude Code output.