All bot configuration is done through environment variables inDocumentation Index
Fetch the complete documentation index at: https://superturtle.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
.superturtle/.env (created by superturtle init, gitignored). Never commit credentials.
Required Variables
TELEGRAM_BOT_TOKEN
Your Telegram bot token from @BotFather./newbot.
TELEGRAM_ALLOWED_USERS
Comma-separated Telegram user IDs allowed to use the bot.Recommended Variables
CLAUDE_WORKING_DIR
Default working directory for Claude. Claude can access files and run commands from here.superturtle start sets this automatically to the current project directory.
If you intentionally run the bot-folder launcher directly (bun run start or bun run dev), set CLAUDE_WORKING_DIR in your shell first so the launcher can find CLAUDE_WORKING_DIR/.superturtle/.env.
For repo development, prefer node super_turtle/bin/superturtle.js start from the repo root.
OPENAI_API_KEY
API key for voice transcription (optional but required for voice messages).SHOW_TOOL_STATUS
Show routine tool-call progress messages in Telegram while an answer runs.false. Keep this at false for quieter chats; set it to true only if you want the old per-tool progress updates back.
MAIN_PROVIDER
Startup default driver for the Telegram meta-agent.claudecodex
claude.
This is a startup default, not a forced override. Effective precedence is:
- Saved last-used driver from Telegram
MAIN_PROVIDER- Built-in fallback
claude
/restart keeps the user’s last selected driver. If you set MAIN_PROVIDER=codex, you must also set CODEX_ENABLED=true and have a working local codex CLI; otherwise startup falls back to Claude.
Codex
CODEX_ENABLED
Enable Codex driver and usage reporting.false. Requires a working local codex CLI login.
META_CODEX_SANDBOX_MODE
Sandbox restrictions for Codex SubTurtles.read-only— Can only read filesworkspace-write— Can read/write workspace (default, recommended)danger-full-access— Full file system access (use cautiously)
META_CODEX_APPROVAL_POLICY
When to ask for approval before running Codex.never— Run without asking (default)on-request— Ask only when explicitly requestedon-failure— Ask if something failsuntrusted— Ask for untrusted tasks
META_CODEX_NETWORK_ACCESS
Allow Codex to make network requests.false. Set to true only if Codex needs to fetch URLs, call APIs, etc.
File Access & Security
ALLOWED_PATHS
Comma-separated list of directories Claude can access.~/.claude if you use Claude Code plan mode.
AUDIT_LOG_PATH
Path for security audit logs./tmp/claude-telegram-audit.log. Set to empty string to disable logging.
AUDIT_LOG_JSON
Log in JSON format (easier to parse programmatically).false. Logs as text instead.
Voice Transcription
TRANSCRIPTION_CONTEXT_FILE
Path to a file with context for voice transcription.Dashboard (Optional)
DASHBOARD_ENABLED
Enable the bot’s web dashboard.true. Runs the local web dashboard unless explicitly disabled.
DASHBOARD_AUTH_TOKEN
Authentication token for dashboard access.Authorization: Bearer <token>, x-dashboard-token, or ?token=).
Advanced Configuration
CLAUDE_CLI_PATH
Path to the Claude CLI binary.claude command is not in your PATH.
Default Models & Effort
These values seed fresh driver preferences only. Once a user changes model, effort, or driver in Telegram, the saved preference wins over the env default.DEFAULT_CLAUDE_MODEL
Default Claude model for new users / empty preference files.claude-opus-4-6claude-sonnet-4-6claude-haiku-4-5-20251001
claude-opus-4-6
DEFAULT_CLAUDE_EFFORT
Default Claude effort level for new users / empty preference files.lowmediumhigh
high
DEFAULT_CODEX_MODEL
Default Codex model for new users / empty preference files.gpt-5.3-codexgpt-5.3-codex-spark
gpt-5.3-codex
DEFAULT_CODEX_EFFORT
Default Codex reasoning effort for new users / empty preference files.minimallowmediumhighxhigh
medium
Configuration Groups
Minimal Setup
Bare minimum to run:Development Setup
Good for local testing:Personal Assistant Setup
Full-featured personal use:Production with Codex
Full setup with both drivers:Example .env File
Rate Limiting
RATE_LIMIT_ENABLED
Enable per-user inbound Telegram request throttling.true. This applies a token bucket before the bot starts processing text, voice, and file messages.
RATE_LIMIT_REQUESTS
How many inbound requests each Telegram user can send per window.20 requests. Increase it if you expect a heavier personal usage pattern.
RATE_LIMIT_WINDOW
Time window in seconds.60 seconds. With the defaults, each user gets 20 inbound requests per 60 seconds.
Validation
The bot validates on startup:| Validation | Error | Fix |
|---|---|---|
TELEGRAM_BOT_TOKEN missing | ”ERROR: TELEGRAM_BOT_TOKEN required” | Add to .superturtle/.env |
TELEGRAM_ALLOWED_USERS missing | ”ERROR: TELEGRAM_ALLOWED_USERS required” | Add your ID |
RATE_LIMIT_REQUESTS invalid | Falls back to 20 | Use integer |
CODEX_SANDBOX_MODE invalid | Warns, falls back to “workspace-write” | Use valid option |
| Working directory doesn’t exist | Bot starts but Claude can’t access it | Create directory |
Restart required
All variables are read at startup. Restart the bot for any changes to take effect.Security Best Practices
- Never commit
.superturtle/.env— It contains secrets - Use strong tokens — Telegram and OpenAI provide secure tokens
- Limit
ALLOWED_PATHS— Only include directories Claude needs - Restrict
TELEGRAM_ALLOWED_USERS— Only trusted users - Use read-only sandbox — For Codex if possible (
read-onlyorworkspace-write) - Enable audit logging — Always log interactions for review
Next Steps
- Security — Full security model and threat assessment
- Platform Support — macOS/Linux/Windows differences
- Drivers — Understanding Claude Code vs Codex
