Skip to content

sneaks/jpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jpi

Run pi coding agent inside a Docker container. One command, any project directory.

Quick Start

# Install or update the local jpi command
bash ~/jpi/setup.sh

# First-time setup (installs colima, docker, docker-compose via Homebrew)
jpi setup

# Run pi in any project
cd ~/Projects/myapp
jpi

Commands

Command Description
jpi Run pi in Docker for the current directory
jpi setup Install prerequisites and build the Docker image
jpi upgrade Rebuild Docker image with the latest pi release
jpi help Show usage info

How It Works

  • A single jpi script lives in ~/bin/ (on your PATH)
  • bash ~/jpi/setup.sh installs/updates ~/bin/jpi for fresh machines
  • jpi setup removes the old alias jpi='~/pi/jpi.sh' if it exists
  • It auto-starts Colima (lightweight Docker runtime for macOS) if needed
  • Mounts your current directory as /workspace in the container
  • Mounts ~/.pi, ~/.secrets, ~/.ssh, ~/.gitconfig, and ~/.plannotator so pi has full access to your config

Files

~/jpi/
├── Dockerfile           # Node 23 + pi + tools (git, rg, fd, curl, jq, python3)
├── docker-compose.yml   # Service config with volume mounts
├── entrypoint.sh        # Sources ~/.secrets then runs pi
├── .gitignore
└── README.md

~/bin/
└── jpi                  # Main command (setup / upgrade / run)

Upgrading Pi

Pi is installed at Docker image build time. To get the latest version:

jpi upgrade

This rebuilds the image with --no-cache so npm pulls the latest release.

Release Notes

  • Added setup.sh to install/update ~/bin/jpi for fresh machines.
  • Added legacy migration in jpi setup to remove old jpi aliases pointing to ~/pi/jpi.sh.
  • Setup checks now use built-in grep instead of rg to reduce dependencies.

Verify Fresh Install

To validate the full new-user path end-to-end:

# 1) Remove old local command and any stale alias lines
rm -f ~/bin/jpi
sed -i '' '/alias[[:space:]]\+jpi=.*pi\/jpi\.sh/d' ~/.zshrc ~/.zprofile ~/.zshenv ~/.zsh_aliases 2>/dev/null || true

# 2) Clone clean and run setup
cd ~
rm -rf jpi-test
git clone git@github.com:sneaks/jpi.git jpi-test
cd jpi-test
bash ./setup.sh

# 3) Reload shell and confirm resolution
exec zsh -l
command -v jpi
type jpi

# 4) Run setup and smoke test
jpi setup
jpi help

Expected:

  • command -v jpi points to $HOME/bin/jpi
  • type jpi reports a file, not an alias
  • jpi setup completes without requiring rg

Prerequisites

All handled by jpi setup, but for reference:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors