Spaces:
Sleeping
Sleeping
Add HF Space metadata header to README
Browse files
README.md
CHANGED
|
@@ -1,44 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# OpenCode HF Space
|
| 2 |
|
| 3 |
An AI coding agent running in your browser via Hugging Face Spaces, powered by NVIDIA NIM.
|
| 4 |
|
| 5 |
-
##
|
| 6 |
-
|
| 7 |
-
### 1. Create the Space on HF
|
| 8 |
-
|
| 9 |
-
```python
|
| 10 |
-
from huggingface_hub import HfApi, SpaceHardware
|
| 11 |
-
|
| 12 |
-
api = HfApi(token="hf_...")
|
| 13 |
-
api.create_repo(
|
| 14 |
-
repo_id="your-username/opencode-space",
|
| 15 |
-
repo_type="space",
|
| 16 |
-
space_sdk="docker",
|
| 17 |
-
space_hardware=SpaceHardware.CPU_BASELINE,
|
| 18 |
-
private=False,
|
| 19 |
-
exist_ok=False,
|
| 20 |
-
)
|
| 21 |
-
```
|
| 22 |
-
|
| 23 |
-
### 2. Set secrets
|
| 24 |
-
|
| 25 |
-
Set these Space secrets via HF UI or API:
|
| 26 |
|
| 27 |
| Secret | Value |
|
| 28 |
|--------|-------|
|
| 29 |
-
| `NVIDIA_API_KEY` |
|
| 30 |
-
| `HF_TOKEN` |
|
| 31 |
-
|
| 32 |
-
### 3. Push code
|
| 33 |
-
|
| 34 |
-
```bash
|
| 35 |
-
git init
|
| 36 |
-
git add .
|
| 37 |
-
git commit -m "Initial deploy"
|
| 38 |
-
git remote add space https://huggingface.co/spaces/your-username/opencode-space
|
| 39 |
-
git push space main
|
| 40 |
-
```
|
| 41 |
|
| 42 |
-
##
|
| 43 |
|
| 44 |
-
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: OpenCode Home
|
| 3 |
+
emoji: 🧠
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: blue
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
# OpenCode HF Space
|
| 11 |
|
| 12 |
An AI coding agent running in your browser via Hugging Face Spaces, powered by NVIDIA NIM.
|
| 13 |
|
| 14 |
+
## Secrets required
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
| Secret | Value |
|
| 17 |
|--------|-------|
|
| 18 |
+
| `NVIDIA_API_KEY` | NVIDIA NIM API key |
|
| 19 |
+
| `HF_TOKEN` | HF token with Space creation permissions |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
+
## Usage
|
| 22 |
|
| 23 |
+
Visit `https://kenqtade-opencode-home.hf.space` and start coding.
|