Environment Variables

Configure remote-terminal using a .env file in the project root.

Quick Setup

cp .env.example .env

All Variables

Telegram Bot

VariableRequiredDescription
TELEGRAM_BOT_TOKENYes*Bot token from @BotFather
TELEGRAM_ALLOWED_USERSYes*Comma-separated user IDs

*Required only if using Telegram bot.

OpenAI (LLM Mode)

VariableRequiredDescription
OPENAI_API_KEYNoYour OpenAI API key
OPENAI_MODELNoModel to use (default: gpt-4.1-nano)

Workspace

VariableRequiredDescription
WORKSPACENoWorking 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

  1. Open Telegram and message @BotFather
  2. Send /newbot
  3. Follow the prompts to create your bot
  4. Copy the token provided

Telegram User ID

  1. Message @userinfobot
  2. It will reply with your user ID

OpenAI API Key

  1. Go to platform.openai.com
  2. Create a new API key
  3. 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