linepush
v0.1.51
Published
No more spending time writing commit messages and PR descriptions. Let Linepush do it for you.
Downloads
740
Readme
Linepush
Linepush is a developer CLI that uses an LLM to write commit messages and pull request descriptions from your staged diff and the code around the changes.
No more spending time writing commit messages and PR descriptions. Let Linepush do it for you.
Why Linepush?
Developers often spend unnecessary time writing:
- commit messages
- pull request descriptions
- change summaries
Even worse, many commits end up like:
fix stuff
update code
minor changesLinepush fixes this by using an LLM to analyze what changed (and where), then drafting commit and PR text you can review and use right away.
Features
Commit Message Generation
The npx lp -commit command generates high-quality commit messages based on:
- staged git changes
- the git diff
- the surrounding code context
- affected functions, classes, and modules
This allows Linepush to understand why the change exists, not just what changed.
Example generated commit:
feat(auth): implement login endpoint with validation
- add POST /login API
- implement password validation
- update authentication serviceContext-Aware Code Analysis
Unlike traditional commit generators, Linepush does not rely only on git diff.
It also analyzes:
- modified files
- functions and classes affected
- dependency relationships
- project structure
This allows the LLM to generate much more accurate commit messages.
Generated Pull Requests
The npx lp -create--pr (or lp -create--pr if global) command generates a structured Draft Pull Request by analyzing:
- all commits in the branch
- affected files
- detected features or fixes
- code changes and their context
Draft Pull Request Creation
Pull Requests are created as Drafts so developers can review the generated description before requesting a review.
This prevents accidental PR submissions while still saving time.
Simple CLI Workflow
Linepush is designed to keep the developer workflow simple.
Instead of writing long messages manually:
git add .
git commit -m "..."You can simply run (see Running with npx below):
npx lp -commitAnd for pull requests:
npx lp -create--prInstallation
npm install linepushThe lp binary is not on your PATH when installed this way—npm only links it under node_modules/.bin. Use npx so the CLI runs correctly:
| Command | What to run |
|--------|-------------|
| Init | npx lp init |
| Commit | npx lp -commit |
| Draft PR | npx lp -create--pr |
| Help | npx lp --help |
Running with npx
npx lp …always resolves the Linepush CLI from your project’snode_modules—use this afternpm install linepush(ornpm install --save-dev linepush).- If
lpalone does nothing or command not found, you are almost certainly using a local install: switch tonpx lp …or install globally withnpm install -g linepush.
OpenRouter API key
Linepush calls LLM through OpenRouter. To get a key:
- Create an account at https://openrouter.ai/.
- In the OpenRouter dashboard, create an API key.
- Set
LINEPUSH_OPENROUTER_API_KEYin your.env(see.env.example). You can also put.envin~/.config/linepush/for a user-wide key.
Configuration templates: The published package includes config/linepush/ with default PR_TEMPLATE and COMMIT_TEMPLATE. Run npx lp init (or lp init when global) in your repo to create config/linepush/ and .env in that project. You can also add your own config/linepush/ in the project; the CLI prefers the project folder over defaults.
Commands
lp -commit
Creates a commit with an LLM generated commit message.
What it does
- Detects staged files
- Reads the git diff
- Analyzes the modified code
- Determines the purpose of the changes
- Generates a commit message
- Asks the user for confirmation
- Executes
git commit
Example
git add .
npx lp -commitGenerated output:
Generated Commit Message
feat(auth): implement login endpoint
- add login API route
- add password validation
- update authentication serviceUser confirmation:
Use this commit message? (Y/n)lp -create--pr
Creates a Draft Pull Request for the current branch.
What it does
- Detects the current branch
- Collects all commits in the branch
- Analyzes code changes across the branch
- Generates a structured PR description
- Asks the user to choose the base branch
- Creates a Draft Pull Request
Example Workflow
Typical development workflow using Linepush (use npx when Linepush is a project dependency):
git checkout -b feature/login
git add .
npx lp -commit
npx lp -create--prLicense
MIT License
