@bismawy/pi-arnative

中文文档
0.9.1发布于 2026/11/02MITES Module零依赖近 30 天下载 3465

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

原始使用文档
文档目录6 节
  1. Overview
  2. Install
  3. Shortcuts
  4. Architecture
  5. License
  6. Author

Arnative

Refined aesthetics. Cohesive tools. Built for Pi.

Custom badge badge license

pi-arnative

Overview

pi-arnative replaces pi’s default terminal chrome with a unified visual interface.

  • Warm Themes: Contrast-checked OKLCH color palettes generated without drift (arnative plus 10 variants).
  • Tabbed Header: Compact box menu showing Directory, Model, Context, Skills, Extensions, and Shortcuts.
  • Rounded Tool Boxes: Status, spinner, runtime duration, and clickable [show] / [hide] output toggles.
  • Task List: todo tool, /todos view, and a boxed widget above the editor that auto-hides 30s after all tasks finish.
  • Enhanced Footer: 3-row status grid (Arnative (Full)) or single collapsible row (Arnative (Minimal)) tracking branch, diff, active duration, and token speed.
  • Working Spinners: 18 animated presets with live picker preview and optional [g] gradient sweep.
  • Transcript Clock: Per-message timestamps with clean bubble backgrounds.
  • Usage Dashboard: Real-time token counts and cost tracking across local sessions via /usage.
  • Custom Providers: Interactive /providers wizard to probe endpoints, pick models, set thinking levels, edit the base URL, provider id or API key, and save OpenAI-, Anthropic-, Gemini-, or Ollama-compatible channels to models.json and auth.json.
  • Model Heal: Background sync (/model-heal) that fills missing compat flags, /models token limits, and accepted reasoning effort levels in models.json.
  • Auto-compact: Automatic context compaction after a turn settles using smart window tiers or a fixed token budget.
Configuration & Presets

Saved to ~/.pi/agent/arnative/config.json via /arnative:

  • Headers & Footers: Arnative (Full) (default), Arnative (Minimal) (footer only; click head text or press ctrl+alt+m to toggle), or Pi (system).
  • Animations: 18 presets (Arnative default, Pi (system), and alphabetical variants). Press [g] in the picker to toggle the Google gradient sweep.
  • Auto-compact: Off by default. Smart tiers trigger near ~200k tokens (≥768k→20%, ≥384k→40%, ≥192k→80%, <192k→pi core), or pick a fixed budget (100k to 400k).
  • Model heal: Full (default: offline compat flags, GET /models limits with 6h TTL, reasoning effort probe with 24h TTL), Flags (offline only), or Off. Hand-edited fields are never overwritten.
  • Task list (todo): Stored per session in ~/.pi/agent/arnative/todos/<session-id>.json (uninstall @juicesharp/rpiv-todo first to avoid tool name conflict). Click [click to expand] / [click to collapse] or press ctrl+alt+o (alt+o) to toggle; click ↑/↓ counters or press ctrl+alt+j/k (alt+j/k) to scroll. Auto-hides 30s after completion (set PI_ARNATIVE_TODO_HIDE_MS to override, 0 for immediate hide; expanding pauses the timer).

Install

pi install npm:@bismawy/pi-arnative

Requires a Nerd Font. On a fresh install, arnative is applied automatically if no theme is set; switch anytime via /arnative themes or /settings → Theme.

Local development:

npm run dev                  # run pi against this checkout, nothing installed
npm run overlay              # copy extensions/ lib/ themes/ into the installed npm package

To see a change before publishing it: npm run overlay, then press /reload in pi — pi re-evaluates extension TypeScript in the same process, so the reload loads the copied code with no reinstall and no restart. The package stays an npm install; nothing points pi at this directory. A module deleted here is pruned from the installed copy (a stale entry point would keep loading), and pi update --extensions restores the published code once a higher version exists. npm run overlay -- --dry-run lists what would move; PI_CODING_AGENT_DIR targets another agent dir.

Shortcuts

Key (Linux / Win)Action
ctrl+alt+t · alt+tCycle header tabs
ctrl+alt+r · alt+rQuick reload (/reload)
ctrl+alt+n · alt+nNew session (/new)
ctrl+alt+m · alt+mToggle Minimal footer
ctrl+alt+o · alt+oExpand or collapse task list
ctrl+alt+j · alt+jScroll task list down
ctrl+alt+k · alt+kScroll task list up
Click [show] / [hide] · ctrl+oToggle tool output box
← / EscStep back to parent menu / close active screen
/arnativeSettings menu (Themes, Headers, Footers, Animations, Auto-compact, Model heal, Providers, Usage)
/usageToken & cost dashboard
/todosFull task list recap
/providersCustom provider manager
/model-healRun models.json heal passes now
Keybindings & Platform Notes

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

{
  "app.session.new": ["ctrl+alt+n", "alt+n"]
}
  • Windows / WSL: Windows Terminal maps Ctrl+Alt to AltGr; use alt+… or disable altGrAliasing.
  • macOS: Use ctrl+option+….
  • tmux / Herdr: Set PI_TUI_ESC_TIMEOUT=100 if Esc has a delay.

Architecture

Extensions & Components
FileRole
extensions/arnative.ts/arnative settings menu and live preview pickers
extensions/section-headers.tsTabbed header and resource box
extensions/footer.ts3-row status grid, Minimal footer, and boxed editor
extensions/tools.tsRounded tool boxes, spinners, duration, and [show] / [hide] toggles
extensions/todos.tstodo tool, boxed widget above editor, and /todos screen
extensions/animations.tsSpinner preset picker and live preview
extensions/autocompact.tsSmart and fixed-budget context compaction
extensions/model-heal.tsAutomatic models.json heal triggers and /model-heal
extensions/timestamps.tsMessage timestamps and bubble backgrounds
extensions/ui-render-tweaks.tsContrast tweaks, selection styling, and UI polish
extensions/usage.tsToken and cost dashboard (/usage)
lib/todos.tsTask state, window layout, box rows, and session store
lib/spinner.tsSpinner preset catalog, frames, and gradient painters
lib/provider.tsCustom provider probe, model picker, and config writer
lib/model-heal.tsCompat flags, /models limit sync, and reasoning effort probe
lib/list-picker.tsShared live-preview and multi-select picker component
Theme Variants & Development

Themes (themes/gen-themes.mjs + lib/color.ts): arnative · sun · zinc · violet · emerald · matrix · cyberpunk · synthwave · gruvbox · nord · dracula

npm test                              # Run self-checks and unit tests
npm run themes                        # Regenerate theme JSON files
npm run preview                       # Live preview in Pi and stamp .git/arnative-preview
git config core.hooksPath .githooks   # Enable pre-push preview verification hook

License

Distributed under the MIT license.

Author

Bisma

版本与发布记录

@bismawy/pi-arnative 共发布 39 个版本,首次发布于 2026/09/26;过去 12 个月发布了 39 个版本。

版本发布日期距今
0.9.1latest2026/11/026 天前
0.9.02026/10/318 天前
0.8.22026/10/2811 天前
0.8.12026/10/2612 天前
0.8.02026/10/2613 天前
0.8.0-rc.1next2026/10/2513 天前

关于 @bismawy/pi-arnative 的常见问题

@bismawy/pi-arnative 是什么?

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

如何安装 @bismawy/pi-arnative?

在项目目录运行 npm install @bismawy/pi-arnative,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@earendil-works/pi-ai(*)、@earendil-works/pi-tui(*)、@earendil-works/pi-coding-agent(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@bismawy/pi-arnative 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/bismawy__pi-arnative 是否存在。

@bismawy/pi-arnative 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@bismawy/pi-arnative 可以商用吗?

@bismawy/pi-arnative 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bismawy/pi-arnative 的下载量有多少?

根据 npm 官方下载统计,@bismawy/pi-arnative 在 2026/10/08 – 2026/11/06 这 30 天内被下载 3,465 次,日均约 116 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bismawy/pi-arnative 还在维护吗?

最新版本 0.9.1 发布于 2026/11/02(6 天前);至今共发布 39 个版本,其中过去 12 个月发布了 39 个;首次发布于 2026/09/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。