@neilurk12/pi-clean-footer

Clean, minimal, and lightweight powerline-style footer extension for pi coding agent.

Packages

Package details

extension

Install @neilurk12/pi-clean-footer from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@neilurk12/pi-clean-footer
Package
@neilurk12/pi-clean-footer
Version
0.4.2
Published
May 31, 2026
Downloads
1,770/mo · 419/wk
Author
neilurk12
License
MIT
Types
extension
Size
24.2 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./dist/index.js"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-clean-footer

Clean, minimal, and lightweight powerline-style footer extension for pi.

Shows a compact split footer:

pi-clean-footer example

Features

  • Smart short model names, plus thinking effort (low, med, high, xhigh)
  • Current directory basename only
  • Git branch + dirty file count, including untracked files
  • Event-driven git refresh after file-changing tools and user bash commands
  • Context usage as used/max
  • Cumulative active-branch token totals: input, output, total, cache read, cache write
  • Optional session cost display ($x.xx) using provider cost data; auto-hides for zero-cost models
  • Adaptive width tiers for narrow terminals
  • /footer toggle
  • /footer refresh force refresh

Install

From npm (recommended) | https://www.npmjs.com/package/@neilurk12/pi-clean-footer:

pi install @neilurk12/pi-clean-footer

For project-local install:

pi install -l @neilurk12/pi-clean-footer

Or from local checkout (development):

pi install /absolute/path/to/pi-clean-footer

Usage

Toggle footer:

/footer

Force git refresh:

/footer refresh

Show active config paths and resolved config:

/footer config

Reload config after editing JSON:

/footer reload

Configuration

Config is optional. Defaults match the built-in package behavior.

Load order:

  1. Global: ~/.pi/agent/clean-footer.json
  2. Project: .pi/clean-footer.json

Project config overrides global config. Nested modelAliases and colors are merged.

Example:

{
  "preset": "compact",
  "enabled": true,
  "showGit": true,
  "showTokens": true,
  "showCacheRead": true,
  "showCacheWrites": false,
  "showContext": true,
  "showDirectory": true,
  "showEffort": true,
  "showCost": true,
  "gitRefreshDebounceMs": 500,
  "separator": " | ",
  "layouts": [
    {
      "minWidth": 100,
      "left": ["model", "directory", "git", "toks"],
      "right": ["cost", "context", "tokensFull"]
    },
    {
      "minWidth": 80,
      "left": ["model", "directory", "git", "toks"],
      "right": ["cost", "context", "tokensNoCache"]
    },
    {
      "minWidth": 60,
      "left": ["model", "directory", "git", "toks"],
      "right": ["cost", "context", "tokensTotal"]
    },
    {
      "minWidth": 40,
      "left": ["model", "directory", "git"],
      "right": ["cost", "context"]
    },
    {
      "minWidth": 0,
      "left": ["model"],
      "right": ["context"]
    }
  ],
  "contextWarningPercent": 70,
  "contextDangerPercent": 85,
  "modelAliases": {
    "claude-sonnet-4-5-20250929": "sonnet-4.5",
    "gpt-5.5-codex": "gpt-5.5"
  },
  "colors": {
    "model": "accent",
    "directory": "dim",
    "git": "success",
    "gitDirty": "warning",
    "contextNormal": "success",
    "contextWarning": "warning",
    "contextDanger": "error",
    "tokens": "muted",
    "cost": "muted",
    "separator": "dim"
  }
}

Preset example:

{
  "preset": "minimal",
  "showGit": true
}

Supported presets:

Preset Description
default Built-in footer behavior.
minimal Quiet model + context layout with git, directory, and tokens hidden.
compact Model, git, context, and total tokens with cache noise hidden.
dense Full information layout with cache read and write counts enabled.
focus Model + context only for low-distraction sessions.
muted Softer semantic colors while keeping default-style behavior.

Preset values are applied before user config, so explicit settings override the preset. Unknown preset names are ignored with a /footer config warning and default behavior is used.

Supported layout segment IDs:

  • model - model name plus thinking effort when showEffort is enabled
  • directory - current directory basename
  • git - git branch and dirty count
  • context - context usage
  • tokensFull - input, output, total, cache read, and cache write tokens
  • tokensNoCache - input, output, and total tokens
  • tokensTotal - total tokens only
  • toks - tokens-per-second rate or activity indicator
  • cost - cumulative session cost in $x.xx format

layouts are selected by the highest minWidth less than or equal to the terminal width. showGit, showTokens, showContext, showDirectory, and showEffort still act as global visibility controls. showCache is a deprecated global cache-token gate; use showCacheRead and showCacheWrites to hide cache read () and write () counts independently. Unknown or duplicate layout segments are omitted and reported by /footer config.

Malformed JSON keeps defaults/last loaded behavior and reports an error through /footer config or at startup.

Package manifest

This package declares its extension through package.json:

{
  "pi": {
    "extensions": ["./dist/index.js"]
  }
}

Development

Type-check extension:

npx tsc --noEmit --skipLibCheck --moduleResolution Node16 --module Node16 --target ES2022 --types node src/index.ts

Notes

Extensions run with full system permissions. Review code before installing any pi package.