Problem
The CLI includes a comprehensive .env.example file that documents all available environment variables (GITHUB_TOKEN, CI_GITHUB_TOKEN, TELEGRAM_BOT_TOKEN, etc.), but the CLI does not actually load .env files automatically.
This creates a misleading user experience where users expect to:
- Copy
.env.example to .env
- Set their tokens in
.env
- Have the CLI automatically use those values
Current Behavior
- ❌ CLI does not load
.env files automatically
- ❌ No dotenv dependency in package.json
- ❌ No
.env loading code in entry points
- ✅ CLI reads
process.env directly (manual exports work)
Evidence
package.json has no dotenv-related dependencies
- No
require('dotenv').config() in bin/run.js or src/index.ts
- Code in
src/adapters/github/auth.ts only reads process.env directly
- Testing confirms
.env files are ignored
User Workarounds
Currently users must:
No work items found.
Proposed Solution
Add automatic .env file loading:
- Add dotenv dependency:
added 1 package, and audited 266 packages in 1s
72 packages are looking for funding
run npm fund for details
found 0 vulnerabilities
-
Load .env in entry point (bin/run.js):
-
Look for .env files in:
- Current working directory
- User's home directory (
~/.work/.env)
- Project root (if in git repo)
Acceptance Criteria
Priority
Medium - Improves user experience and aligns behavior with documented expectations.
Labels
- enhancement
- user-experience
- configuration
Problem
The CLI includes a comprehensive
.env.examplefile that documents all available environment variables (GITHUB_TOKEN, CI_GITHUB_TOKEN, TELEGRAM_BOT_TOKEN, etc.), but the CLI does not actually load.envfiles automatically.This creates a misleading user experience where users expect to:
.env.exampleto.env.envCurrent Behavior
.envfiles automatically.envloading code in entry pointsprocess.envdirectly (manual exports work)Evidence
package.jsonhas no dotenv-related dependenciesrequire('dotenv').config()inbin/run.jsorsrc/index.tssrc/adapters/github/auth.tsonly readsprocess.envdirectly.envfiles are ignoredUser Workarounds
Currently users must:
No work items found.
Proposed Solution
Add automatic
.envfile loading:added 1 package, and audited 266 packages in 1s
72 packages are looking for funding
run
npm fundfor detailsfound 0 vulnerabilities
Load .env in entry point (
bin/run.js):Look for .env files in:
~/.work/.env)Acceptance Criteria
.envfile and have CLI automatically load it.envfile loading follows standard precedence (local > home > system).envfilesPriority
Medium - Improves user experience and aligns behavior with documented expectations.
Labels