---
slug: "pi-tool-manager"
source_type: "readme"
source_url: "https://cdn.jsdelivr.net/gh/Star-233/pi-tool-manager@master/README.md"
repo: "https://github.com/Star-233/pi-tool-manager"
source_file: "README.md"
branch: "master"
---
# Tool Manager

A Pi extension that provides `/tools` — an interactive tool browser with toggle disable/enable, cross-session persistence, scrollable descriptions, and source/extension annotations.

## Features

### `/tools` command
Opens a TUI listing all registered tools:

```
Tools (22 active)

[x]  agent_bg  [bg-tasks]       ← dimmed, disabled by our plugin
[ ]  bash      [builtin]        ← green, active
[ ]  read      [builtin]        ← green, active
[ ]  LoopCreate [pi-loop]       ← green, from pi-loop

read  [builtin]  ● active       ← detail panel (full description)
Read the contents of a file.
...

↑↓ navigate  •  space toggle(persist)  •  d toggle(temp)  •  enter detail  •  esc close
```

### Controls

| Key | Action | Persisted |
|-----|--------|-----------|
| `↑` `↓` | Navigate tool list | — |
| `Space` | Toggle disable/enable | ✅ Saved to session, survives restarts |
| `d` | Temporary toggle | ❌ Current session only |
| `Enter` | Enter detail mode | — |
| `Esc` | Back to list / close | — |

In detail mode:

| Key | Action |
|-----|--------|
| `↑` `↓` | Scroll full description |
| `Esc` `Enter` | Back to list mode |

### Cross-session persistence
Disabled tool list is stored via `pi.appendEntry()` in the session file. It survives pi restarts, `/reload`, `/new`, `/resume`, and `/fork`.

### First run defaults
`agent_bg` is disabled by default to avoid conflict with the subagent extension. All other tools keep their original state.

## Files

- `tool-manager/tool-manager.ts` — Main extension file
- `tool-manager/README.md` — This file (English)
- `tool-manager/README.zh.md` — Chinese documentation

## Installation

Place the `tool-manager` folder in `~/.pi/agent/extensions/` (auto-discovered), then `/reload`.

Or install via npm:

```bash
pi install npm:pi-tool-manager
```

Or install via npm:

```bash
pi install npm:pi-tool-manager
```
