npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@335g/pi-autocommit

v0.1.4

Published

Auto-commit extension for pi-coding-agent (checkpoint-then-reorganise strategy)

Readme

@335g/pi-autocommit

npm version License: MIT

A pi-coding-agent extension that automatically commits your changes so you never have to write a commit message. It uses a checkpoint-then-reorganise strategy: lightweight checkpoint commits are created at the end of each turn that mutates files, then at the end of the agent loop they are soft-reset and reorganised into logical Conventional Commits by the LLM.

Migrated from @335g/pi-git? See Migration below. The /git-commit and /git-status commands were removed; auto-commit is now the sole feature.

Features

  • Automatic checkpoints — commits changes at the end of every turn that mutates files, so intermediate state is never lost.
  • LLM-powered reorganisation — at the end of the agent loop, checkpoints are soft-reset and split into coherent Conventional Commits using the assistant's own reasoning as context.
  • Heuristic fallback — when the LLM is unavailable, a single Conventional Commit is produced from diff analysis.
  • Uncommitted-changes footer indicator — a footer cue shows whether the working tree has changes, so you can spot unintended files before a checkpoint captures them.
  • Language support — commit messages can be written in English or Japanese.
  • Merge conflict detection — skips committing when a merge is in progress.

Installation

pi install @335g/pi-autocommit

Or add it to your pi package config:

{
  "packages": {
    "@335g/pi-autocommit": "latest"
  }
}

How it works

Auto-commit is enabled by default. Once installed, the extension:

  1. turn_end — After each turn that ran a file-mutating tool (write, edit, bash), if the working tree has changes, it stages everything (git add -A) and creates a checkpoint commit:
    wip(checkpoint): auto-commit at turn N
  2. agent_end — At the end of the agent loop, it counts the checkpoint commits at HEAD, soft-resets them, and asks the LLM to split the combined diff into logical Conventional Commits (using the assistant's own messages as context). Each logical group is then staged and committed separately.

The footer indicator ([has changes]) reminds you when there are uncommitted changes — check it before writing your next prompt to catch unintended files.

This runs silently in the background. Notifications appear for progress and errors, but no interactive confirmation is required.

Configuration

Create .pi/pi-autocommit.json in your project root:

{
  "lang": "ja",
  "enable": true,
  "model": "anthropic/claude-sonnet-4"
}

| Key | Type | Default | Description | |-----|------|---------|-------------| | lang | string | "en" | Commit message language: "ja" (Japanese) or "en" (English) | | enable | boolean | true | Whether auto-commit is active | | model | string | — | LLM model for commit message generation, in "provider/modelId" format (e.g. "anthropic/claude-sonnet-4"). When omitted, the session's current model is used. | | scope | object | — | Path-to-scope mapping that fixes the Conventional Commits scope deterministically. When set, the LLM no longer infers the scope; it is resolved from the changed file paths instead. See Scope mapping below. |

Disabling auto-commit

{
  "enable": false
}

Outside a git repository, the extension does nothing regardless of config.

Scope mapping

By default, the commit scope is inferred by the LLM from the changed file paths. When you want the scope to stay fixed — for example, while working on a feature, or when a sub-project lives under a specific directory — set scope to a path-to-scope mapping:

{
  "scope": {
    "packages/frontend/**": "frontend",
    "packages/backend/**": "backend",
    "**": "app"
  }
}

Keys are picomatch globs evaluated against the changed file paths. When a commit touches files that all resolve to the same scope, that scope is used; if files resolve to different scopes (or none match), the scope is omitted (type: subject). The most specific (longest literal) glob wins on conflict.

Once scope is set, the LLM is instructed to write type: subject (no scope) and the scope is injected deterministically — so the scope never drifts. When scope is unset, the previous LLM-driven behaviour is preserved.

The ** glob is a handy way to set a single fixed scope for the whole repo:

{ "scope": { "**": "auth" } }

Commit Message Convention

Generated messages follow the Conventional Commits specification:

type(scope): subject

body

footer

Types

| Type | Description | |------------|-----------------------------------------------------| | feat | New feature, command, option, or API | | fix | Bug fix or correction of unintended behavior | | refactor | Code structure improvement without behavior change | | chore | Build config, dependencies, CI, repository setup | | docs | Documentation-only changes | | test | Adding or modifying tests | | style | Code formatting (no behavioral impact) | | perf | Performance improvements |

Migration from @335g/pi-git

@335g/pi-git has been renamed and narrowed in scope to become @335g/pi-autocommit:

  • The /git-commit and /git-status commands were removed. Use !git commit / !git status in pi for manual operations.
  • The config file moved from .pi/pi-git.json to .pi/pi-autocommit.json. The old file is not read.
  • commitEveryTurn was renamed to enable and now defaults to true (installing an autocommit package and getting nothing would be surprising).
  • noBody was removed — commit messages now always include a body.

To migrate:

pi uninstall @335g/pi-git
pi install @335g/pi-autocommit

Then rename your config and adjust keys:

// .pi/pi-autocommit.json
{
  "lang": "ja",
  "enable": true
}

The old @335g/pi-git package is marked deprecated on npm but remains installable.

Development

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

Requirements

License

MIT © Yoshiki Kudo