Skip to content

Commit d800ca6

Browse files
committed
docs: add LINEAR_API_KEY environment variable documentation
Document the new environment variable override feature for API key configuration. Thanks to Matt Berg (@mberg) for contributing this feature!
1 parent 565f13d commit d800ca6

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,26 @@ Configuration is stored at:
355355
- **Linux/macOS:** `~/.config/linear-cli/config.toml`
356356
- **Windows:** `%APPDATA%\linear-cli\config.toml`
357357

358+
### Environment Variable Override
359+
360+
You can override the configured API key using the `LINEAR_API_KEY` environment variable. This is useful for:
361+
362+
- **CI/CD pipelines** - Set API key via environment without modifying config files
363+
- **Multi-workspace scripts** - Run commands against different workspaces without switching
364+
- **Agent processes** - Spawn isolated processes with their own API key context
365+
- **Security** - Avoid storing API keys in config files on shared systems
366+
367+
```bash
368+
# Override API key for a single command
369+
LINEAR_API_KEY=lin_api_xxx linear-cli issues list
370+
371+
# Set for entire shell session
372+
export LINEAR_API_KEY=lin_api_xxx
373+
linear-cli issues list
374+
```
375+
376+
The environment variable takes precedence over the config file when set.
377+
358378
## Claude Code Integration
359379

360380
Add linear-cli to your Claude Code instructions:

0 commit comments

Comments
 (0)