Reference
Complete reference for environment variables, configuration, exit codes, and file locations.
Environment Variables
Environment variables override file-based configuration. Useful for CI/CD pipelines and temporary overrides.
| Variable | Description | Example |
|---|---|---|
ELLYGENT_API_URL | Ellygent API base URL | https://api.ellygent.com |
ELLYGENT_TOKEN | Access token (PAT or JWT) | elly_pat_xxxxx |
ELLYGENT_PAT | Personal Access Token for login | elly_pat_xxxxx |
ELLYGENT_PASSWORD | Password for email/password login | ******** |
ELLYGENT_ORG | Default organization slug | my-org |
ELLYGENT_PROJECT | Default project alternative_id | my-project |
HTTP_PROXY | HTTP proxy server | http://proxy.example.com:8080 |
HTTPS_PROXY | HTTPS proxy server | http://proxy.example.com:8080 |
Configuration Priority
When multiple configuration sources exist, the CLI uses this precedence (highest to lowest):
Command-line flags (
--org,--project, etc.)Environment variables (
ELLYGENT_*)Config file (
~/.ellygent/config.json)Built-in defaults
Example Usage
# Temporary override for one command
ELLYGENT_ORG=test-org ellygent context projects
# Session-wide override
export ELLYGENT_API_URL=https://staging.ellygent.com
ellygent context orgs
ellygent context projects --org my-org
# CI/CD environment
export ELLYGENT_TOKEN="${SECRET_TOKEN}"
export ELLYGENT_ORG=prod-org
ellygent context pull --project critical-system --version v2.0.0Configuration File
Location
Linux/macOS:
~/.ellygent/config.jsonor$XDG_CONFIG_HOME/ellygent/config.jsonWindows:
%APPDATA%\Ellygent\config.json
Structure
{
"apiUrl": "https://api.ellygent.com",
"accessToken": "elly_jwt_xxxxxxxxxxxxxxxxxxxxx",
"refreshToken": "elly_ref_xxxxxxxxxxxxxxxxxxxxx",
"defaultOrg": "my-org",
"defaultProject": "my-project"
}Config Commands
# View current configuration
ellygent config
# Set configuration values
ellygent config set api-url https://api.ellygent.com
ellygent config set default-org my-org
ellygent config set default-project my-projectAvailable Config Keys
| Key | Description |
|---|---|
api-url | Ellygent API base URL |
default-org | Default organization for commands |
default-project | Default project for commands |
access-token | Manually set access token (advanced) |
refresh-token | Manually set refresh token (advanced) |
Exit Codes
The CLI uses standard exit codes for scripting and automation:
| Code | Meaning | Description |
|---|---|---|
0 | Success | Command completed successfully |
1 | General Error | Command failed due to an error |
2 | Invalid Usage | Incorrect command syntax or missing arguments |
3 | Authentication Error | Login failed or token expired |
4 | Network Error | Unable to reach API or connection failed |
5 | Not Found | Requested resource (project, version, etc.) not found |
6 | Permission Denied | Insufficient permissions to access resource |
Example Usage in Scripts
#!/bin/bash
ellygent context pull --project safety-system --version v2.1
if [ $? -eq 0 ]; then
echo "✓ Context downloaded successfully"
exit 0
else
echo "✗ Failed to download context"
exit 1
fiFile Locations
Config Directory
Linux:
~/.ellygent/or$XDG_CONFIG_HOME/ellygent/macOS:
~/.ellygent/Windows:
%APPDATA%\Ellygent\(typicallyC:\Users\<username>\AppData\Roaming\Ellygent\)
Workspace Structure
After running ellygent context pull, context is downloaded to:
.ellygent/ # Context root (default)
├── metadata.json # Project metadata
├── traceability.json # Traceability graph (if included)
├── requirements/ # Specification markdown files
│ ├── functional_requirements.md
│ ├── safety_requirements.md
│ └── ...
├── capabilities/ # Capability markdown files
│ └── ...
├── architecture/ # Architecture docs (if included)
│ └── ...
├── constraints/ # Design constraints (if included)
│ └── ...
└── glossary/ # Terminology (if included)
└── ...Custom Workspace Directory
# Sync to custom directory
ellygent context pull --project safety-system --version v2.1 --workspace ./context/
# Result: ./context/.ellygent/ is createdSecurity Notes
Important Security Practices
Config file permissions: Automatically set to mode 0600 (owner read/write only)
Never commit secrets: Add
.envand.ellygent/config.jsonto.gitignorePAT rotation: Revoke and regenerate PATs regularly
Least privilege: Only grant necessary organization/project access
CI/CD secrets: Use platform secret management (GitHub Secrets, GitLab CI/CD variables, etc.)