Skip to content

Repository files navigation

deskramer-pi-config

Personal Pi package for portable extensions plus sanitized settings/custom provider templates.

Install on another machine

Full setup, including settings/custom providers and extensions:

npm install -g --ignore-scripts @earendil-works/pi-coding-agent

git clone git@github.com:DesKramer/pi-config.git ~/pi-config
cd ~/pi-config

# Applies config/settings.json and config/models.json into ~/.pi/agent, with backups.
./install.sh

# Loads this repo's extensions as a Pi package.
pi install "$(pwd)"

# Authenticate subscription providers / OAuth providers as needed.
pi /login

Set machine-local provider secrets before using the custom providers:

export AZURE_FOUNDRY_TECH_API_KEY="..."
export COSINE_API_KEY="..."

Put those in your shell profile, a password-manager-backed shell hook, or another machine-local secret manager.

Optional Mem0 OSS memory integration uses a separate local server per machine. It can recall local project-scoped memories before responses and stores only memories you explicitly add:

export MEM0_OSS_URL="http://127.0.0.1:8888"
export MEM0_OSS_API_KEY="..."
export MEM0_USER_ID="my-local-user" # optional stable local namespace

MEM0_OSS_URL defaults to http://127.0.0.1:8888 when unset. Keep MEM0_OSS_API_KEY, MEM0_USER_ID, and Mem0 data machine-local; do not commit them. Use /mem0-status and /mem0-doctor to verify setup.

Extensions-only install

If you only want the package resources without merging settings.json / models.json into ~/.pi/agent:

pi install git:git@github.com:DesKramer/pi-config.git

This loads the extensions, including extensions/custom-providers.ts, which registers providers from the package's config/models.json.

Included resources

Extensions

Extension Purpose
ask-user-tool.ts Adds an interactive ask-user style tool/UI flow.
copy-agent-last.ts Helper for copying the latest assistant output.
custom-providers.ts Registers custom providers from config/models.json.
ephemeral.ts Ephemeral/session helper extension.
firecrawl-tools.ts Firecrawl search/scrape tools.
git-status-widget.ts Git status widget/status display.
mem0.ts Optional self-hosted Mem0 OSS memory integration with bounded project recall, explicit capture/search tools, and status diagnostics.
pi-subagents/ Subagent tooling with scout, researcher, worker, acceptance-criteria, and qa agents plus safe-bash.
pi-workflow/ YAML workflow runner with /workflow commands, checkpoint tool, and pinned branch-correct state.
pretty-markdown-code.ts Improved markdown/code rendering.
provider-model-picker.ts Provider/model picker helper.
remote-pi/ Attached-session Remote Pi bridge over strict LF JSONL Unix socket with fail-open reconnect, snapshots, events, commands, and explicit attached-only capabilities.
skill-dollar.ts $ skill invocation/autocomplete helper.
tps-status.ts Tokens-per-second/status display.
usage.ts Usage/cost/session utility display.
zsh-user-bash.ts Runs user bash commands through zsh/local shell behavior.

Mem0 OSS memory (optional)

Mem0 is expected to run self-hosted and separately on each machine. This repo does not start, configure, sync, or back up the Mem0 server; its database, Docker volumes, dashboard account, and API keys stay local and never enter this repo.

The extension talks to the local REST API at MEM0_OSS_URL, defaulting to http://127.0.0.1:8888. Set MEM0_OSS_API_KEY to the API key generated by your local Mem0 dashboard/setup flow. MEM0_USER_ID is optional; set it only if you want a stable local namespace for memories.

When configured, the extension automatically recalls up to 5 local project-scoped memories before each assistant response, bounded to 6000 characters. Recalled memories are injected as clearly labeled, untrusted reference context; they should not override current instructions, tool results, or safety/privacy requirements.

Memory writes are explicit only. Use /mem0-remember <text> or ask the agent to use its mem0_memory search/add tool for a specific request. Automatic post-turn capture is disabled.

For the reference Docker setup, run the Mem0 OSS server from a separate Mem0 checkout/config. The local endpoints are:

  • REST API: http://localhost:8888 (or http://127.0.0.1:8888 for this extension)
  • Dashboard/setup wizard: http://localhost:2999 (/setup on first run, then the dashboard)

Pi remains usable if Mem0 is missing, stopped, or misconfigured. The extension fails open, does not replace Pi's startup header, and reports state in the footer as mem0: .... Useful commands:

  • /mem0-status — show current Mem0 URL/user/footer state and connectivity.
  • /mem0-doctor — diagnose env, auth, server reachability, and recall/write readiness.
  • /mem0-setup — print local Docker/server and environment setup guidance.
  • /mem0-remember <text> — explicitly save a local memory for future project-scoped recall.

Custom providers

Defined in config/models.json and registered by extensions/custom-providers.ts:

  • azure-foundry-tech
  • cosine

API keys are stored as environment references, not committed raw secrets:

  • AZURE_FOUNDRY_TECH_API_KEY
  • COSINE_API_KEY

Settings

Portable settings currently managed in config/settings.json:

Setting Value
theme dark
defaultProvider cosine
defaultModel glm-5.2
defaultThinkingLevel high
packages npm:pi-web-access, npm:pi-mcp-adapter

./install.sh merges these settings into ~/.pi/agent/settings.json. Package entries are additive, and existing machine-local skills, extensions, prompts, and themes are preserved unless explicitly added to config/settings.json.

Workflows

Two pi-workflow definitions are included:

  • workflows/feature-implementation.workflow.yaml
  • workflows/bug-fixing.workflow.yaml

The bug-fixing workflow analyzes the report, scouts the likely source, asks for expected behavior only when missing, scouts related implementation areas, and delegates the fix to a worker.

To make the workflows discoverable, copy them to ~/.pi/agent/workflows/ or to a trusted project's .pi/workflows/ directory:

mkdir -p ~/.pi/agent/workflows
cp workflows/*.workflow.yaml ~/.pi/agent/workflows/

Prompts

No prompt templates are currently included.

Themes

No custom themes are currently included.

Skills

No skills are currently included. Skills are intentionally machine-specific for this setup.

What is intentionally not included

  • auth.json
  • OAuth/MCP tokens
  • sessions
  • trust decisions
  • npm/git package install caches
  • machine-specific skills such as ~/.cosine/skills
  • raw API keys
  • self-hosted Mem0 OSS data, Docker volumes/databases, dashboard/admin credentials, API keys, and per-machine user IDs

Updating this repo

After changing extensions or config:

cd ~/pi-config # or /Users/deskramer/Documents/Code/pi-config on the source machine
git add .
git commit -m "Update pi config"
git push

On another machine using the cloned/local package workflow:

cd ~/pi-config
git pull
./install.sh
pi update --extensions

If installed directly via pi install git:...:

pi update --extensions

Notes

Custom providers are available two ways:

  1. The package extension extensions/custom-providers.ts registers them from config/models.json.
  2. ./install.sh also merges them into ~/.pi/agent/models.json as a fallback for non-package use.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages