Skip to main content
EllygentAI Systems Engineering
Login
Start free

CLI / Reference

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.

VariableDescriptionExample
ELLYGENT_API_URLEllygent API base URLhttps://api.ellygent.com
ELLYGENT_TOKENAccess token (PAT or JWT)elly_pat_xxxxx
ELLYGENT_PATPersonal Access Token for loginelly_pat_xxxxx
ELLYGENT_PASSWORDPassword for email/password login********
ELLYGENT_ORGDefault organization slugmy-org
ELLYGENT_PROJECTDefault project alternative_idmy-project
HTTP_PROXYHTTP proxy serverhttp://proxy.example.com:8080
HTTPS_PROXYHTTPS proxy serverhttp://proxy.example.com:8080
Configuration Priority

When multiple configuration sources exist, the CLI uses this precedence (highest to lowest):

  1. Command-line flags (--org, --project, etc.)

  2. Environment variables (ELLYGENT_*)

  3. Config file (~/.ellygent/config.json)

  4. 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.0

Configuration File

Location
  • Linux/macOS: ~/.ellygent/config.json or $XDG_CONFIG_HOME/ellygent/config.json

  • Windows: %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-project
Available Config Keys
KeyDescription
api-urlEllygent API base URL
default-orgDefault organization for commands
default-projectDefault project for commands
access-tokenManually set access token (advanced)
refresh-tokenManually set refresh token (advanced)

Exit Codes

The CLI uses standard exit codes for scripting and automation:

CodeMeaningDescription
0SuccessCommand completed successfully
1General ErrorCommand failed due to an error
2Invalid UsageIncorrect command syntax or missing arguments
3Authentication ErrorLogin failed or token expired
4Network ErrorUnable to reach API or connection failed
5Not FoundRequested resource (project, version, etc.) not found
6Permission DeniedInsufficient 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
fi

File Locations

Config Directory
  • Linux: ~/.ellygent/ or $XDG_CONFIG_HOME/ellygent/

  • macOS: ~/.ellygent/

  • Windows: %APPDATA%\Ellygent\ (typically C:\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 created

Security Notes

Important Security Practices
  • Config file permissions: Automatically set to mode 0600 (owner read/write only)

  • Never commit secrets: Add .env and .ellygent/config.json to .gitignore

  • PAT 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.)

Previous: TroubleshootingBack to CLI Home

Ellygent

Spec-driven development for teams that need requirements, traceability, and implementation context to stay aligned.

© 2026 Ellygent. All rights reserved.