Required and optional environment variables for Hedis
Hedis uses environment variables for database connection, platform configuration, and external API access. Variables are auto-loaded from a .env file in go/hermes-decompiler/ via godotenv.
# Local MongoDBMONGO_CONNECTION_STRING=mongodb://localhost:27017# MongoDB AtlasMONGO_CONNECTION_STRING=mongodb+srv://user:[email protected]# With authenticationMONGO_CONNECTION_STRING=mongodb://admin:password@localhost:27017/hedis?authSource=admin
Used in:
pkg/database/main.go:16 - Database initialization
All commands that access the database (analyze, maintain-database, packages)
# Use default databaseMONGO_DB_NAME=hedis# Use custom database nameMONGO_DB_NAME=hedis_production# Use clean database for packages commandMONGO_DB_NAME=clean
Used in:
pkg/database/main.go:22 - Database initialization
All database operations
Special case:The packages command uses database name clean for isolated package processing.
Behavior if unset:When required commands are run without this token:
GITHUB_TOKEN environment variable is not set
Source: pkg/pipeline/security.go:66, pkg/pipeline/security.go:149Rate limiting:Without a token, GitHub API requests may be rate-limited. A warning is logged:
// In js/get-packages/index.js:63console.warn("GITHUB_TOKEN not set. You may face rate-limiting.");