Skip to main content
EllygentAI-assisted Systems Engineering
Login
Start free

CLI / Authentication

Authentication

Ellygent CLI uses Personal Access Tokens only. Use a PAT for local development, automation, and CI/CD.

CLI Demo: Authenticate and Download Project Context

Watch a live walkthrough showing how to authenticate with the Ellygent CLI and download structured context from an existing project into a local engineering workflow.

Watch on YouTube

Authentication Method

Personal Access Token (PAT)
Required

PATs are the supported authentication method for both interactive use and automation. The CLI validates the token during login and stores the resulting session locally.

ellygent auth login --token <your-personal-access-token>
ellygent whoami

Personal Access Token Setup

1. Create a PAT
  1. Sign in to the Ellygent web application.

  2. Open Account → Personal Access Tokens.

  3. Create a new token for CLI use.

  4. Copy the token value that starts with elly_pat_.

2. Use the PAT locally
Command flag
ellygent auth login --token <your-personal-access-token>
ellygent whoami
Environment variable

Store the token in ELLYGENT_TOKEN when you do not want to place the PAT directly on the command line.

export ELLYGENT_TOKEN='elly_pat_xxxxxxxxxxxxxxxxxxxxx'
ellygent auth login --token $ELLYGENT_TOKEN
ellygent whoami

Config Storage

After a successful login, the CLI stores its configuration in your user config directory.

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

  • Windows: %APPDATA%\Ellygent\config.json

ellygent config

Environment Variables

Use environment variables for CI/CD, secure shells, and temporary overrides.

VariableDescriptionExample
ELLYGENT_API_URLAPI base URLhttps://www.ellygent.com/api/
ELLYGENT_TOKENPersonal Access Token used for PAT loginelly_pat_xxxxx
ELLYGENT_ORGDefault organizationmy-org
ELLYGENT_PROJECTDefault projectmy-project

CI/CD Example

name: Download Engineering Context

on: [push]

jobs:
  sync-context:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Ellygent CLI
        run: |
          git clone --depth 1 https://github.com/EEQuality/ellygent-cli.git ./ellygent-cli
          npm install --prefix ./ellygent-cli
          npm run build --prefix ./ellygent-cli
          npm install -g ./ellygent-cli

      - name: Authenticate with PAT
        env:
          ELLYGENT_TOKEN: ${{ secrets.ELLYGENT_TOKEN }}
        run: ellygent auth login --token $ELLYGENT_TOKEN --url https://www.ellygent.com

      - name: Download context
        run: ellygent context pull --project safety-system --version v2.1
Previous: Getting StartedNext: Command Reference