Skip to content

install script ignores PI_CODING_AGENT_DIR (hardcodes ~/.pi/agent) #1

@anntnzrb

Description

@anntnzrb

Summary

The installer hardcodes ~/.pi/agent and ignores PI_CODING_AGENT_DIR, so on setups using a custom agent dir (e.g. ~/.config/pi/agent) the extension/skill are copied to the wrong location.

Environment

  • pi version: 0.50.3
  • OS: macOS
  • PI_CODING_AGENT_DIR: set to a non-default path
  • Package: pi-interactive-shell 0.6.2

Steps to Reproduce

  1. Set PI_CODING_AGENT_DIR to a non-default path (e.g. ~/.config/pi/agent).
  2. Run pi install npm:pi-interactive-shell.
  3. Inspect the configured agent dir’s extensions/ and skills/.

Actual

Installer copies to ~/.pi/agent/extensions/interactive-shell and creates a skill symlink under ~/.pi/agent/skills/interactive-shell. No files are placed under $PI_CODING_AGENT_DIR.

Expected

Installer should respect PI_CODING_AGENT_DIR (or equivalent) so extension/skill land under the configured Pi agent dir.

Root Cause

scripts/install.js uses:

const EXTENSION_DIR = join(homedir(), ".pi", "agent", "extensions", "interactive-shell");
const SKILL_DIR = join(homedir(), ".pi", "agent", "skills", "interactive-shell");

No lookup of PI_CODING_AGENT_DIR.

Workaround

Manually copy the package into $PI_CODING_AGENT_DIR/extensions/interactive-shell and copy SKILL.md into $PI_CODING_AGENT_DIR/skills/interactive-shell.

Suggested Fix

Read PI_CODING_AGENT_DIR (and expand ~) when constructing destination paths, falling back to ~/.pi/agent if unset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions