1. Declarative Environment Variables (.env.local)
For local operations, build-time variables, and workspace linking, Hoox loads a .env.local file at your project root.
Copy the secure template during initialization:
A. ⚡ Cloudflare Core Infrastructure
B. 💱 Exchange API Keys (Securely Redacted)
These credentials must be injected as secure encrypted environment variables into your Cloudflare Worker isolates. The Hoox CLI automates this injection.- Binance:
BINANCE_API_KEY— Your read/write exchange account trade permission key.BINANCE_API_SECRET— Private secret key used to HMAC-SHA256 sign order payloads.
- Bybit:
BYBIT_API_KEY— Order routing account key.BYBIT_API_SECRET— Order signing private key.
- MEXC:
MEXC_API_KEY— Order routing account key.MEXC_API_SECRET— Order signing private key.
C. 💬 Telegram Bot Alerts
D. 🧠 Multi-Provider AI Credentials
Used to power autonomous risk assessments, Telegram conversation loops, and time-series summaries inagent-worker.
OPENAI_API_KEY— Access key for OpenAI GPT models.ANTHROPIC_API_KEY— Access key for Anthropic Claude models.GOOGLE_AI_API_KEY— Access key for Google Gemini models.
2. Managing Environment & Secrets via CLI
To prevent plain-text exposure and ensure proper edge variable binding, never manually paste sensitive keys intowrangler.jsonc files. Instead, utilize the high-integrity hoox config env command groups:
Decrypted
.dev.vars files contain local environment credentials and are
excluded from git history via .gitignore automatically. Running hoox config env generate-dev-vars ensures that local worker testing via bun run dev has
access to simulated credentials safely.3. Worker Configurations (wrangler.jsonc)
Each worker in the monorepo has a standard wrangler.jsonc file at its directory root. These configurations declare:
- Service Bindings: Connects gateway routes (
hoox) to internal compute units (trade-worker,d1-worker) directly via microsecond V8 isolates—no TCP/TLS overhead, no public routes. - Resource Bindings: Declares which D1 databases, R2 storage buckets, and KV configurations are linked.
- Execution Mode: Toggles latency-saving features like Smart Placement (
"placement": { "mode": "smart" }).
4. Runtime KV Configuration (Sub-millisecond Settings)
One of Hoox’s core architectural features is instant runtime parameter updates. By using Cloudflare KV, certain settings can be modified globally in sub-milliseconds and take effect on the very next signal execution—without rebuilding or redeploying any worker. Hoox manages a standard 16-key runtime manifest inside theCONFIG_KV namespace. Below are the most critical runtime parameters:
Managing KV Settings via CLI
🔗 Next Steps
- 5-Minute Quick Start Guide — Launch local worker runners and execute a simulated webhook trade signal.
- Deploying to Production — Deploy and bind all workers in the correct dependency sequence.