Skip to content

docs: add environment variables documentation#6483

Closed
lalalune wants to merge 3 commits into
developfrom
docs/add-env-vars-documentation
Closed

docs: add environment variables documentation#6483
lalalune wants to merge 3 commits into
developfrom
docs/add-env-vars-documentation

Conversation

@lalalune
Copy link
Copy Markdown
Member

@lalalune lalalune commented Feb 8, 2026

Reopened from #6377 (was merged then rolled back)

Made with Cursor

Greptile Overview

Greptile Summary

Added new documentation file explaining two server environment variables: ELIZA_SERVER_AUTH_TOKEN for API authentication and ELIZA_UI_ENABLE for web UI control. The documentation includes:

  • Clear explanations of each variable's purpose and default behavior
  • Security implications when variables are set or unset
  • Usage examples for different deployment scenarios (production, development, headless)
  • References to related configuration files

Issue found:

  • Incorrect file path reference for authentication middleware (line 77)

Confidence Score: 4/5

  • Safe to merge with minor correction needed
  • Documentation is well-structured and accurate except for one incorrect file path reference. Content correctly describes the behavior of both environment variables based on the actual implementation.
  • Fix the file path reference in docs/environment-variables.md line 77

Important Files Changed

Filename Overview
docs/environment-variables.md Added comprehensive documentation for ELIZA_SERVER_AUTH_TOKEN and ELIZA_UI_ENABLE with examples; one incorrect file path reference

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Doc as environment-variables.md
    participant Env as .env.example
    participant Middleware as API Key Middleware
    participant Config as Config Utils
    
    Dev->>Doc: Reads documentation
    Note over Doc: Explains ELIZA_SERVER_AUTH_TOKEN<br/>and ELIZA_UI_ENABLE variables
    
    Doc->>Env: References template
    Dev->>Env: Sets configuration
    
    alt API Authentication Flow
        Env->>Middleware: AUTH_TOKEN configured
        Note over Middleware: Validates X-API-KEY header<br/>Returns 401 if invalid
    else No Auth Flow
        Env->>Middleware: AUTH_TOKEN not set
        Note over Middleware: Skips validation<br/>Allows all requests
    end
    
    alt UI Toggle Flow
        Env->>Config: UI_ENABLE set to true/false
        Config->>Dev: Force enable or disable UI
    else Automatic UI Flow
        Env->>Config: UI_ENABLE not set
        Config->>Dev: Enable in dev, disable in prod
    end
Loading

YuriNachos and others added 3 commits January 17, 2026 11:18
This commit adds comprehensive documentation for important server
environment variables, specifically covering authentication and UI control.

Added documentation for:
- ELIZA_SERVER_AUTH_TOKEN: API authentication token for securing endpoints
- ELIZA_UI_ENABLE: Web UI control for security and deployment flexibility

The documentation includes:
- Purpose and default behavior for each variable
- Usage examples and configuration values
- Security implications
- Common deployment scenarios (production, development, headless API)
- References to related implementation files

Closes #5716
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 8, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/add-env-vars-documentation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Feb 8, 2026

Claude finished @lalalune's task in 44s —— View job


Review Summary

  • Gather context and read PR changes
  • Review documentation content
  • Check for issues and provide feedback

Overall: Good documentation for key security environment variables ✅

Check Status
Security ✅ No issues
Breaking changes ✅ N/A (docs only)
Tests required ⚠️ N/A (docs only)
Accuracy ⚠️ One file path correction needed

Findings

⚠️ IMPORTANT: Incorrect file reference at line 77

  • Documentation references packages/server/src/authMiddleware.ts
  • Actual file is packages/server/src/middleware/api-key.ts
  • Inline comment added with suggested fix

Positives

  • Clear, well-structured documentation
  • Accurate description of ELIZA_SERVER_AUTH_TOKEN behavior (verified against api-key.ts)
  • Accurate description of ELIZA_UI_ENABLE behavior
  • Consistent with .env.example documentation
  • Helpful example configurations for different deployment scenarios

## Related Files

- **Configuration**: `.env.example` - Template with all available environment variables
- **Authentication**: `packages/server/src/authMiddleware.ts` - API key validation logic
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ IMPORTANT: Incorrect file path

The authentication middleware is at packages/server/src/middleware/api-key.ts, not packages/server/src/authMiddleware.ts.

Suggested change
- **Authentication**: `packages/server/src/authMiddleware.ts` - API key validation logic
- **Authentication**: `packages/server/src/middleware/api-key.ts` - API key validation logic

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

## Related Files

- **Configuration**: `.env.example` - Template with all available environment variables
- **Authentication**: `packages/server/src/authMiddleware.ts` - API key validation logic
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incorrect file path - should be packages/server/src/middleware/api-key.ts

Suggested change
- **Authentication**: `packages/server/src/authMiddleware.ts` - API key validation logic
- **Authentication**: `packages/server/src/middleware/api-key.ts` - API key validation logic

@lalalune lalalune closed this Mar 22, 2026
@lalalune lalalune deleted the docs/add-env-vars-documentation branch May 5, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants