Skip to content

Arindam200/gitpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitpack hero screenshot

gitpack

GitHub stars GitHub issues MIT License Node.js version Version 0.1.0

gitpack helps developers turn messy work into review-ready commits and track review progress without leaving the terminal.

Most Git AI tools focus on one narrow step: generating a commit message. gitpack is built for the harder problem:

  • grouping related changes into sensible commits
  • explaining why those groups exist
  • warning about risky areas before review
  • drafting a PR summary that is easier for reviewers to read
  • showing CI status, reviewer comments, and check failures without opening GitHub

By default, gitpack uses AI to improve commit messages, rationales, and PR summaries. The default provider is Nebius Token Factory, but you can point it at a custom OpenAI-compatible base URL.

In Action

gitpack plan example output gitpack command overview output
Plan sensible commits
Group related files, explain the split, and surface risky areas before you commit.
Keep the workflow close
Jump between planning, status, release notes, and review tracking from one CLI surface.

Installation

Install globally with npm:

npm install -g @arindam1729/gitpack

Or run it without installing globally:

npx @arindam1729/gitpack plan --base main

Usage

After installation, run gitpack inside any Git repository:

gitpack plan --base main
gitpack apply
gitpack pr --base main
gitpack status

Get the full command list anytime:

gitpack help

What gitpack does

Given a dirty working tree or an in-progress branch, gitpack answers:

  • What changed, and which files belong together?
  • What should be split out?
  • What looks risky?
  • What should the PR say?

Once the PR is open, gitpack also answers:

  • Did CI pass? Which job failed and why?
  • Who reviewed it and what did they comment?
  • What do I need to do next?

The planner stays deterministic first. AI improves naming and explanations. If AI is disabled or unavailable, gitpack falls back to heuristic suggestions instead of failing.

gh follows the same rule: optional and useful, never required for the core local workflow.

AI Defaults

gitpack is AI-on by default.

Default Nebius Token Factory settings:

  • provider: Nebius Token Factory
  • base URL: https://api.tokenfactory.nebius.com/v1
  • auth: GITPACK_API_KEY or NEBIUS_API_KEY
  • default model: moonshotai/Kimi-K2.5

AI is used for:

  • commit message suggestions
  • commit-group rationale
  • PR title and body suggestions
  • release note generation

Opt out when needed:

gitpack plan --no-ai

Or disable AI by environment:

export GITPACK_AI=false

Use a custom provider:

export GITPACK_BASE_URL=https://api.openai.com/v1
export GITPACK_API_KEY=sk-...
export GITPACK_MODEL=gpt-4o

Default Nebius Token Factory behavior:

export NEBIUS_API_KEY=your-key-here
# or
export GITPACK_API_KEY=your-key-here

Override the model if needed:

export GITPACK_MODEL=deepseek-ai/DeepSeek-R1-0528

GITPACK_NEBIUS_MODEL is still supported for Nebius-specific overrides, but GITPACK_MODEL is the generic setting going forward.

List the text-to-text models available from Nebius Token Factory:

gitpack model
gitpack /model
gitpack model --json

gitpack model only works with the default Nebius provider. If GITPACK_BASE_URL is set, the command exits with an error and asks you to remove it.

Review Commit Messages Interactively

gitpack apply interactive commit message review

gitpack apply now walks each suggested commit one at a time. You can accept the current message and commit immediately, edit it inline, ask AI to regenerate it, or skip that commit suggestion and leave the changes in your working tree.

>_ gitpack (v0.1.0)

model:      Kimi K2.5
directory:  ~/Developer/JavaScript/forms-ai

built by Arindam Majumder

Branch: v3   AI: nebius

! Untracked files are included in the plan. Review generated commit boundaries before applying.

▸ Generating commit message...

Changes to commit:
  .gitignore | 0
  1 file changed

Commit message:
  chore: update .gitignore

[Enter] Accept  [e] Edit  [r] Regenerate  [c] Cancel

Why this exists

The real pain in Git workflows is usually not writing a one-line commit message. It is packaging work well enough that:

  • your history makes sense
  • your PR is easy to review
  • risky changes are visible early
  • you do not need to be a Git expert to clean up a branch

And after the PR is open, context-switching to GitHub to check CI or read comments breaks flow dozens of times per review cycle. gitpack brings that loop back to the terminal.

Prepare Commands

gitpack plan

Inspect the current working tree or branch and propose a commit plan.

  • reads uncommitted changes first; falls back to committed branch changes if working tree is clean
  • groups files into logical commits, keeping related pairs together (e.g. foo.ts + foo.test.ts)
  • suggests a title per commit using AI when available
  • explains the rationale for each group
  • flags risky paths like auth, schema, env, or CI changes
  • supports human-readable and JSON output

gitpack apply

Apply the proposed commit plan safely.

  • shows each suggested commit with file stats and a boxed commit-message preview
  • supports per-commit actions: accept, edit, regenerate, or skip
  • commits accepted groups immediately; skipped groups stay in the working tree
  • still supports non-interactive application with --yes
  • saves pre-apply state so gitpack undo can reverse it

gitpack pr

Generate a PR draft from the branch or current changes.

  • PR title, summary bullets, test plan, and risk notes
  • fills in .github/PULL_REQUEST_TEMPLATE.md when present
  • recent commit rollup when a base branch is available
  • AI improves reviewer-facing wording when available

gitpack release

Prepare release notes from packaged changes and optionally publish a GitHub release.

  • groups commits by type: feat, fix, chore, refactor, docs
  • separates user-facing changes from internal maintenance
  • --draft prints to stdout; --publish calls gh release create

View Commands

These let you track review progress without opening GitHub.

gitpack status

A single-pane branch dashboard.

Branch: feat/auth-refactor → main

Local
  3 uncommitted changes  (run gitpack plan to package)

Commits (4 since main)
  feat(auth): add session middleware
  fix(auth): handle expired tokens
  chore(deps): bump jose to 5.2.0
  test(auth): add session expiry coverage

Pull Request  #142  [draft]
  "Refactor auth middleware to support token expiry"
  https://github.com/org/repo/pull/142

Reviews
  ✓  alice approved
  ✗  bob requested changes  (2 unresolved comments)

Checks
  ✓  lint          passed
  ✓  typecheck     passed
  ✗  tests         failed   → auth/session.test.ts: Expected 401, got 500

Next action: address bob's comments, then re-request review.
  • local changes and commits work without gh
  • PR, review, and CI sections require gh; missing sections are omitted gracefully
  • --watch redraws every 30 seconds while CI runs

gitpack view diff

Colored branch diff, skipping generated and noise files. Supports --file and --commit to narrow scope.

gitpack view comments

PR review comments grouped by file. --unresolved filters to only what needs action.

gitpack view checks

CI job breakdown. Surfaces the first failure line and prints the exact gh run rerun command.

gitpack view log

Branch commits with file stats and risk flags applied.

Utility Commands

gitpack publish

Push the branch, generate the PR body from gitpack pr, and call gh pr create --draft. Prints the PR URL.

gitpack doctor

Checks git repo state, base branch detection, AI key, and gh availability. Useful before starting a session.

gitpack model

Fetches Nebius text->text models for the current API key and shows a formatted display name plus the raw model ID.

  • only available when using the default Nebius Token Factory provider
  • uses GITPACK_API_KEY first, with NEBIUS_API_KEY as fallback

gitpack config

Manage persistent settings at user or project level.

gitpack config set base main
gitpack config set ai off

gitpack undo

Reverse the last gitpack apply using the saved pre-apply ref.

Quick Start

cd /path/to/your/repo
gitpack plan --base main
gitpack apply
gitpack pr --base main
gitpack publish
gitpack status --watch

Local development:

cd /Users/arindammajumder/Developer/JavaScript/gitpack
npm run check
npm run build
node dist/index.js help

Try the deterministic fallback path:

GITPACK_AI=false node dist/index.js plan

Principles

gitpack should be:

  • safe by default
  • useful without setup friction
  • deterministic at its core
  • AI-enhanced by default, but not AI-blocked
  • transparent about what it will do
  • scriptable for advanced users
  • simple enough for everyday developers
  • able to hand off work cleanly from local changes to PRs to releases

Status

Current implementation: plan, apply, pr.

The view layer (status, view diff/comments/checks/log) and the handoff commands (publish, release, config, undo) are planned next. See ROADMAP.md for the sequence.

About

AI-powered Git packaging CLI for planning commits, drafting PRs, and tracking reviews from the terminal.

Resources

License

Stars

Watchers

Forks