Configuration File
ClawMagic stores runtime config in ~/.clawmagic/config.json. This file is created during onboarding and can be edited directly or via the portal Settings page.
~/.clawmagic/ config.json # Runtime config (providers, features, server settings) secrets.json # Encrypted secrets (AES-256-GCM, chmod 600) logs/ # Daily work logs (JSONL)
Core Environment Variables
| Variable | Default | Purpose |
|---|---|---|
CLAWMAGIC_PORT | 18790 | Server HTTP port |
CLAWMAGIC_HOST | 127.0.0.1 | Server bind address (localhost-only by default) |
CLAWMAGIC_CONFIG_DIR | ~/.clawmagic | Config directory override |
CLAWMAGIC_STATE_DIR | ./state | Local state directory |
CLAWMAGIC_PASSWORD | clawmagic | Portal login password (change in production) |
CLAWMAGIC_SPEC_PACKETING_ENABLED | true | Enable ActionSpec spec-packeting subsystem |
LLM Provider Keys
ClawMagic uses BYOK (Bring Your Own Key). Configure your provider API keys through onboarding, the portal Settings page, or environment variables.
OPENAI_API_KEY— OpenAI models and embeddingsANTHROPIC_API_KEY— Claude modelsGOOGLE_API_KEY— Gemini modelsOPENROUTER_API_KEY— OpenRouter multi-model routingMISTRAL_API_KEY— Mistral models
Add any supported AI provider. Keys are stored encrypted in ~/.clawmagic/secrets.json after onboarding. Environment variables take precedence over stored values.
Marketplace Connection
To connect ClawMagic to the Marketplace API for plugin discovery and purchases:
| Variable | Purpose |
|---|---|
CLAWMARKETPLACE_API_BASE_URL | Marketplace API URL (default: https://api.clawmagic.ai) |
CLAWMARKETPLACE_API_KEY | Your cmk_* API key for marketplace operations |
The agent uses these to browse plugins, request deliveries, and report installations. See /docs/agent-marketplace for the full API.
Feature Flags
CLAWMAGIC_SPEC_PACKETING_ENABLED— ActionSpec tool selection system (default: enabled)CLAWMAGIC_ALLOW_REMOTE— allow non-localhost connections (default: false)CLAWMAGIC_SQLITE_ENABLED— use SQLite for memory storage (default: false)CLAWMAGIC_EMBEDDINGS_ENABLED— enable embedding-based search (default: false)
Security Notes
- Never share
~/.clawmagic/secrets.json— it contains encrypted provider keys. - Change the default portal password (
clawmagic) before exposing to any network. - Marketplace API keys (
cmk_*) are scoped — use minimum required scopes. - State files in
state/may contain conversation history — treat as sensitive.