Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

@thatrandomnerd69/pi-coding-agent

An opinionated, standalone Pi coding agent distribution with a small set of workflow customizations built in.

It bundles the Pi runtime and all included extensions into a single CLI, while preserving Pi's normal authentication, sessions, settings, modes, and command-line options.

Installation

Requires Node.js 22.19 or newer.

npm install --global @thatrandomnerd69/pi-coding-agent
pi

A separate Pi installation is not required.

To check both the distribution build and bundled upstream Pi version:

pi --version
# @thatrandomnerd69/pi-coding-agent build 4f9c2a7d81b3 (Pi 0.84.1)

Included customizations

The standalone CLI always loads five bundled extensions.

Extension Availability What it does
bash-only Always Restricts agents to bash and the coordination tools available to their role.
session-workdir Always Persists and restores each session's working directory.
slash-command-visibility Always Hides selected built-in commands from slash autocomplete.
yeet Always Adds /yeet for AI-assisted commits, pushes, and PR creation.
settle Always Adds /settle for merging or closing PRs and cleaning up branches.

Extension entrypoints live under extensions/<name>/index.ts. Shared implementation modules live in extensions/shared/ and are not separate extensions.

Slash-command visibility

The following built-in commands are hidden from autocomplete:

/name, /tree, /fork, /clone, /compact, /trust, /export, /import, /share, /hotkeys, /changelog, and /llama.

They remain executable when entered manually.

Custom commands

/yeet

Generates GPT-5.6 Luna commit messages, feature branch names, and PR descriptions, then provides interactive commit, push, and PR automation.

Its optional create PR + settle flow is only available when the settle extension is enabled.

/settle [PR-number-or-URL]

Selects one or more open GitHub pull requests, merges or closes them, and can optionally delete their local and remote branches.

Use --dry-run to preview the selected plan without applying it.

Development

npm install
npm run check       # Type-check and run the test suite
npm run test:watch  # Run tests in watch mode
npm run coverage    # Generate text and HTML coverage reports
npm link            # Link this checkout globally
pi                # Run the linked CLI (pi-coding-agent remains as an alias)

Tests use Vitest with mocked Pi APIs. Command-execution tests use either mocks or disposable temporary Git repositories, so they do not modify real user repositories, sessions, branches, or pull requests.

Publishing

Every published build uses a commit-addressed prerelease version:

0.0.0-git.<12-character-commit-hash>

The committed manifests intentionally keep the non-publishable placeholder 0.0.0-development. The prepublishOnly check runs the full test suite and rejects placeholder versions or versions whose hash does not match the current commit.

First publication

npm Trusted Publishing cannot be configured until the package exists. Publish the first build manually from a clean, committed checkout:

npm login
test -z "$(git status --porcelain)"
version="0.0.0-git.$(git rev-parse --short=12 HEAD)"
npm version "$version" --no-git-tag-version --ignore-scripts
npm publish --tag latest --access public

Then configure a GitHub Actions Trusted Publisher in the package settings on npmjs.com:

Setting Value
Organization or user thomasbrugman
Repository pi-customizations
Workflow filename publish.yml
Allowed action npm publish

After a GitHub account rename, update both this Trusted Publisher owner and the repository URLs in package.json; GitHub redirects do not update npm’s OIDC trust configuration. Leave the environment name empty for this workflow. The npm package scope remains @thatrandomnerd69.

Automatic publication

.github/workflows/publish.yml tests and publishes every push to main as 0.0.0-git.<12-character-commit-hash>.

The workflow uses GitHub OIDC instead of a stored npm token, publishes provenance, marks each new build as latest, and safely skips commits that are already present on npm. It can also be run manually from GitHub Actions.

Updating bundled Pi

Dependabot checks daily for new versions of @earendil-works/pi-coding-agent and @earendil-works/pi-tui. It groups the two packages in one pull request. The merge job requires their versions to match.

The CI workflow type-checks the extensions, runs the test suite, loads the CLI entrypoint, and checks the npm package contents. When that workflow passes for a patch update that changes only package.json and package-lock.json, GitHub squash-merges the tested commit and runs the publish workflow. Minor and major updates stay open for manual review because Pi is below version 1.0 and may make breaking changes in a minor release.

To update Pi manually instead, replace <version> with the same version for both packages:

npm install --save-exact \
  @earendil-works/pi-coding-agent@<version> \
  @earendil-works/pi-tui@<version>
npm run check

The bundled CLI disables built-in MCP with --no-mcp to preserve its bash-only policy, including when servers connect after session startup. Extension tool calls remain guarded by bash-only.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages