spacestr

đź”” This profile hasn't been claimed yet. If this is your Nostr profile, you can claim it.

Edit
Sharp
Member since: 2022-12-20
Sharp
Sharp 5d

Jesus turned water into wine. Satoshi turned bacon into money.

Sharp
Sharp 8d

Maple AI + opencode 👌

Sharp
Sharp 8d

# Maple Proxy + OpenCode on Omarchy Local OpenAI-compatible Maple proxy in Docker, then OpenCode pointed at `http://127.0.0.1:8080/v1`. ## 0. Install OpenCode Omarchy is Arch-based: ```bash sudo pacman -S opencode # or latest AUR: paru -S opencode-bin ``` Confirm: ```bash opencode --version ``` Docker should already be on Omarchy. If not: ```bash sudo pacman -S docker docker-compose docker-buildx sudo systemctl enable --now docker sudo usermod -aG docker "$USER" ``` Log out and back in so the `docker` group applies. ## 1. Clone Maple Proxy ```bash git clone https://github.com/OpenSecretCloud/maple-proxy.git cd maple-proxy ``` ## 2. Create a Maple API key 1. Sign in at [trymaple.ai](https://trymaple.ai) 2. Account → API Access 3. Create a key and copy it ## 3. Create `.env` and put the key in it ```bash cp .env.example .env ``` Edit `.env` and set at least: ```bash MAPLE_BACKEND_URL=https://enclave.trymaple.ai MAPLE_PCR0_ENVIRONMENT=production MAPLE_PORT=8080 MAPLE_API_KEY=your-real-maple-key MAPLE_ENABLE_CORS=true ``` ## 4. Wire the key into Compose (easy to miss) Stock `docker-compose.yml` **comments out** `MAPLE_API_KEY`. The container will not see your `.env` key unless you uncomment this under `environment:`: ```yaml - MAPLE_API_KEY=${MAPLE_API_KEY} ``` You can leave it commented and only put the key in OpenCode. Either works; OpenCode must have the key either way. Optional: bind only localhost so the proxy is not on the LAN: ```yaml ports: - "127.0.0.1:${MAPLE_PORT:-8080}:8080" ``` ## 5. Start the proxy From the repo directory: ```bash docker compose up -d docker compose logs -f ``` First run builds the image. Wait for a healthy container and something like “Maple Proxy Server started”. ```bash docker compose ps ``` ## 6. Health check ```bash curl -s http://127.0.0.1:8080/health ``` ## 7. List models from *your* proxy ```bash curl -s http://127.0.0.1:8080/v1/models \ -H "Authorization: Bearer your-real-maple-key" | jq ``` Use the `id` fields from that JSON. Names change. ## 8. Write `~/.config/opencode/opencode.json` ```bash mkdir -p ~/.config/opencode ``` ```json { "$schema": "https://opencode.ai/config.json", "model": "maple/kimi-k2-6", "provider": { "maple": { "npm": "@ai-sdk/openai-compatible", "name": "Maple AI", "options": { "baseURL": "http://127.0.0.1:8080/v1", "apiKey": "your-real-maple-key" }, "models": { "kimi-k2-6": { "name": "Kimi K2.6", "tools": true }, "kimi-k3": { "name": "Kimi K3", "tools": true }, "glm-5-3-flash": { "name": "GLM-5.3 Flash", "tools": true }, "glm-5-3": { "name": "GLM 5.3", "tools": true }, "glm-5-2": { "name": "GLM 5.2", "tools": true }, "deepseek-v4-flash": { "name": "DeepSeek V4 Flash", "tools": true }, "gemma4-31b": { "name": "Gemma 4 31B", "tools": true }, "gpt-oss-120b": { "name": "OpenAI GPT-OSS 120B", "tools": true }, "llama3-3-70b": { "name": "Llama 3.3 70B", "tools": true } } } } } ``` Drop any id that is not in your `/v1/models` output. Skip whisper / embed / TTS. ```bash chmod 600 ~/.config/opencode/opencode.json ``` ## 9. Run OpenCode ```bash opencode ``` Pick Maple / `kimi-k2-6` (or whatever you set as `"model"`). Stop later with `docker compose down` in the repo dir. Restart with `docker compose up -d`.

Welcome to Sharp spacestr profile!

About Me

Interests

  • No interests listed.

Videos

Music

My store is coming soon!

Friends