@bismawy/pi-arnative

Refined aesthetics. Cohesive tools. Built for Pi. Warm themes, rounded tool boxes, tabbed header, compact footer and a /usage dashboard.

Packages

Package details

extensiontheme

Install @bismawy/pi-arnative from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@bismawy/pi-arnative
Package
@bismawy/pi-arnative
Version
0.8.0
Published
Oct 26, 2026
Downloads
4,793/mo · 290/wk
Author
bismawy
License
MIT
Types
extension, theme
Size
677.5 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "image": "https://raw.githubusercontent.com/bismawy/pi-arnative/main/assets/banner.webp",
  "themes": [
    "./themes/*.json"
  ],
  "extensions": [
    "./extensions/*.ts"
  ]
}

Security note

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

README

Arnative

Refined aesthetics. Cohesive tools. Built for Pi.

Custom badge badge license

Overview

pi-arnative replaces pi’s default terminal chrome with a unified, cohesive visual aesthetic.

  • Warm Themes: Cohesive, contrast-checked OKLCH color palettes generated without drift.
  • Tabbed Header: Compact box menu showing Directory, Model, Context, Skills, Extensions, and Shortcuts.
  • Rounded Tool Boxes: Status, spinner, and duration for every tool call with expandable outputs.
  • Enhanced Footer: 3-row status grid tracking branch, active duration (30s idle freeze), and token speed.
  • Transcript Clock: Timestamps for conversation messages with clean bubble backgrounds.
  • Usage Dashboard: Real-time token counts and cost tracking across all local sessions via /usage.
  • Custom Providers: any OpenAI-, Anthropic-, Gemini- or Ollama-compatible endpoint from three inputs — URL, key, name; models are probed and picked, saved to pi's own models.json/auth.json, together with the context window and output cap the probe answered and the compat flags the endpoint needs. Enter on a stored provider edits: reselect models, re-probe the endpoint, cycle per-model thinking levels (off → auto → minimal → low → medium → high → xhigh → max, auto-detected from ids), set all of them at once ([A] auto, [R] off), probe which effort levels the channel really accepts (p), or delete.
  • Model Heal: keeps models.json correct with no command (adopted from pi-auto-compat) — missing compat flags, the context window and output cap each channel's /models publishes, and the effort levels a relay really accepts. Explicit values always win.

Working Spinner Presets

Configurable via /arnative → Animations (saved to ~/.pi/agent/arnative/config.json). Features 18 presets with live animated preview in the picker (Arnative as default, Pi (system), and alphabetical variants). Press [g] in the picker to toggle Google brand gradient sweep on accent presets.

Footer Presets

Configurable via /arnative → Footers:

  • Arnative (Full) (default 3-row grid)
  • Arnative (Minimal) (single collapsible head row; click or ctrl+alt+m to toggle)
  • Pi (system) (built-in footer)

Auto-compact

Configurable via /arnative → Auto-compact (saved to ~/.pi/agent/arnative/config.json). When the context crosses the chosen threshold after a run settles, pi's own compaction fires — the same machinery and summary as /compact, keeping long sessions light without the manual step. Two shapes of control:

  • Smart (tiered by context window): ≥768k→20% · ≥384k→40% · ≥192k→80% · below 192k→pi core. Every tier lands the trigger near the same ~200k-token transcript ceiling — a 1M window trips at a fifth of its window, a 256k at 80%, and a 128k model defers entirely to pi's own near-full compaction (the behavior that is already safe there).
  • A manual token budget (100k–400k): one absolute number, whatever the window.

Off by default. Guards: no re-trigger while a compaction runs, a growth-margin wait (5% of the threshold) after an attempt that freed too little or failed, and a full reset on session start. Pi's own compaction.reserveTokens threshold, including per-model overrides, is unaffected; whichever fires first wins.

Model heal

Configurable via /arnative → Model heal (saved to ~/.pi/agent/arnative/config.json). Runs on its own on session start, model select, a change to models.json, and an error that names a rejected parameter:

  • Full (default): compat flags offline, plus contextWindow/maxTokens from each channel's GET /models (6 h TTL) and the accepted reasoning_effort levels written as a thinkingLevelMap (24 h TTL).
  • Flags: the offline compat pass only, no network.
  • Off: nothing.

/model-heal forces every pass now, ignoring the TTLs (/auto-compat is an alias once pi-auto-compat is uninstalled). A value you set by hand — even false — is never overwritten, a corrupt models.json is reported and never rewritten, and the first write keeps a backup. While pi-auto-compat is still installed, pi-arnative defers to it and says so once.

Install

pi install npm:@bismawy/pi-arnative

Apply a theme via /settings → Theme → arnative (or variant). Requires a Nerd Font. On a fresh install the arnative theme is applied automatically when pi has no theme of its own; a theme you already chose is never overridden.

To test locally:

npm run dev

Shortcuts

Key (Linux / Win) Action
ctrl+alt+t · alt+t Cycle header tabs
ctrl+alt+r · alt+r Quick reload (/reload)
ctrl+alt+n · alt+n New session (/new)
ctrl+alt+m · alt+m Toggle Minimal footer
/usage Token & cost dashboard (or /arnative → Usage)
/arnative Settings menu (Themes, Headers, Footers, Animations, Auto-compact, Model heal, Providers, Usage)
/model-heal Heal models.json now (or /arnative → Model heal)
Click tool / ctrl+o Toggle tool output box
← Back — step back from submenus/dashboard to menu

To bind app.session.new in ~/.pi/agent/keybindings.json:

{
  "app.session.new": ["ctrl+alt+n", "alt+n"]
}
  • Windows / WSL: Windows Terminal aliases Ctrl+Alt to AltGr; use alt+… (or disable altGrAliasing in WT profile).
  • macOS: Uses ctrl+option+….
  • tmux / Herdr: If Esc has delay, set PI_TUI_ESC_TIMEOUT=100 in your environment.
  • Navigation: ← navigates back to parent menus; Esc cancels or closes the active screen.

Architecture

File Role
extensions/tools.ts Rounded tool boxes, spinners, and duration
extensions/section-headers.ts Tabbed header and resource box (preset: /arnative headers)
extensions/footer.ts 3-row status grid footer and boxed editor (preset: /arnative footers)
extensions/animations.ts Working spinner presets and /arnative → Animations picker
extensions/autocompact.ts Auto-compact: Smart tiers by window or a fixed token budget (/arnative → Auto-compact)
extensions/model-heal.ts Model heal triggers: session start, model select, models.json watcher, rejected-parameter errors, /model-heal
lib/model-heal.ts Model heal passes: compat flags, /models limits sync, effort probe
lib/spinner.ts Spinner preset catalog: frames, cadence, and painters
extensions/arnative.ts Settings menu with live preview and navigation
lib/provider.ts Custom provider wizard: probe, model pick, edit actions, models.json/auth.json save
lib/list-picker.ts The live-preview/multi-select picker every arnative screen shares
extensions/timestamps.ts Message timestamps and bubble backgrounds
extensions/ui-render-tweaks.ts Contrast tweaks, selection style, and UI polish
extensions/usage.ts Token and cost dashboard (/usage)

Theme definitions are generated via themes/gen-themes.mjs using OKLCH color math (lib/color.ts).

Variants: sun · zinc · violet · emerald · matrix · cyberpunk · synthwave · gruvbox · nord · dracula

npm test        # Run unit tests and self-checks
npm run themes  # Rebuild all theme variants
npm run preview # Live preview the working tree in your own Pi (stamps a pushable commit)

Pre-publish verification and tag validation are enforced via scripts/release-check.mjs.

Local-first push gate: the pre-push hook (.githooks/pre-push) rejects any branch push whose commit carries no live-preview stamp, so a fix cannot reach GitHub unseen. npm run preview launches Pi with this working tree and writes .git/arnative-preview for the exact commit that was shown; editing extensions/, lib/, themes/, or package.json afterwards invalidates it and the hook asks for a fresh preview. The preview must run on a clean tree — commit or stash first. Git does not auto-install hooks; activate per clone:

git config core.hooksPath .githooks

License

Distributed under the MIT license.

Author

Bisma