Environment Variables
Configure remote-terminal using a .env file in the project root.
Quick Setup
cp .env.example .env
All Variables
Telegram Bot
| Variable | Required | Description |
|---|
TELEGRAM_BOT_TOKEN | Yes* | Bot token from @BotFather |
TELEGRAM_ALLOWED_USERS | Yes* | Comma-separated user IDs |
*Required only if using Telegram bot.
OpenAI (LLM Mode)
| Variable | Required | Description |
|---|
OPENAI_API_KEY | No | Your OpenAI API key |
OPENAI_MODEL | No | Model to use (default: gpt-4.1-nano) |
Workspace
| Variable | Required | Description |
|---|
WORKSPACE | No | Working directory (default: current dir) |
Example .env
# Telegram Bot
TELEGRAM_BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrsTUVwxyz
TELEGRAM_ALLOWED_USERS=987654321,123456789
# OpenAI
OPENAI_API_KEY=sk-your-api-key-here
OPENAI_MODEL=gpt-4.1-nano
# Workspace
WORKSPACE=~/projects/myapp
Getting API Keys
Telegram Bot Token
- Open Telegram and message @BotFather
- Send
/newbot
- Follow the prompts to create your bot
- Copy the token provided
Telegram User ID
- Message @userinfobot
- It will reply with your user ID
OpenAI API Key
- Go to platform.openai.com
- Create a new API key
- Copy and save it (you won’t see it again)
Security Notes
- Never commit your
.env file — It’s in .gitignore by default
- Rotate keys if exposed — Generate new tokens if compromised
- Limit Telegram users — Only add trusted user IDs