Perfect for the engineers who love building, but hate having to track everything.
Feels like you are just using git, but you are also keeping those Linear issues nice and tidy!
This CLI runs 100% locally. Configure your Linear API key once and you're ready to go!
lit-checkout-trimmed.mov
lit-switch-demo.mov
In this version 0.1, only three commands are supported
lit switch "description of issue"- Runs a search through Linear for issues matching the description
- If multiple hits, will ask to disambiguate
- Assigns issue to you, marks as in progress
- git checkout the branch name (creaets it if it doesn't exist)
lit commit "commit message/issue comment"- Figures out correct issue based on branch
- leaves a comment on the issue
- git commit -m
lit checkout "Issue Title" -d "Description of Issue" -t f- Parses arguments: title, description (optional), issye type [bug, feature, improvement] (optional)
- Creates new Linear Issue
- Generates the Linear automation friendly branch name (exactly how Linear does it in the UI)
- Does git checkout -b LinearbranchName
1. Install
Install globally via npm:
npm install -g linear-lit-cli2. Get your Linear API Key
Visit linear.app/settings/account/security and create a personal API key.
3. Configure (Recommended)
Save your API key permanently with one command:
lit config set linear-api-key <your_key>Your key is stored securely at ~/.config/lit-cli/config.json and you'll never need to set it again!
Done! Now you can use lit from anywhere. 🎉
Want to contribute or run from source?
git clone https://github.com/tekaratzas/lit-cli.git
cd lit-cli
npm install
npm run install-globalAlready using environment variables? No problem! While lit config set is the easiest method, you can also:
Environment Variable:
export LINEAR_API_KEY=<your_key>Add to ~/.zshrc or ~/.bashrc for persistence.
Interactive Prompt:
If no API key is found, lit will prompt you when you run a command (useful for quick testing).
Note: Priority order is: Environment variable → Config file → Interactive prompt
# Set your API key (recommended)
lit config set linear-api-key <your_key>
# View your config (API key is masked for security)
lit config list
# Get a specific value
lit config get linear-api-keyConfig is stored at: ~/.config/lit-cli/config.json
Once configured, you can use these commands:
# Create a new Linear issue and checkout a branch
lit checkout "Fix login bug" -d "Users can't login" -t bug
# Switch to an existing issue's branch
lit switch "login bug"
# Commit and comment on the current issue
lit commit "Fixed authentication logic"
# Manage configuration
lit config set linear-api-key <your_key>
lit config listlit checkout <title> [options] (alias: co)
-d, --description <text>- Issue description-t, --type <type>- Issue type:b/bug,f/feature,i/improvement
lit switch <description> (alias: sw)
- Searches Linear for matching issues
- Prompts to select if multiple matches found
lit commit <message> (alias: cm)
- Commits with message and posts comment to Linear issue
lit config <command>
set <key> <value>- Set a config valueget <key>- Get a config valuelist- Show all config values
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details.