npm.io
1.0.2 • Published 3d ago

@joyanhui/pi-ext-float-term

Licence
MIT
Version
1.0.2
Deps
1
Size
31 kB
Vulns
0
Weekly
0

@joyanhui/pi-ext-float-term

A pi extension providing floating terminal overlays powered by node-pty. Similar to Neovim's <leader>ft floating terminal.

Features

  • Floating fish shellCtrl+Alt+F opens an interactive fish terminal in an overlay
  • Floating lazygitCtrl+Alt+G opens lazygit in a floating terminal
  • Floating yaziCtrl+Alt+Y opens the yazi file manager
  • Floating gcpCtrl+Shift+Alt+G runs gcp (git conventional commits) then drops into fish
  • Exit gracefullyexit / Ctrl+D quits the shell and auto-closes; Ctrl+Space force-closes

Installation

pi install npm:@joyanhui/pi-ext-float-term

Or for a single session:

pi -e npm:@joyanhui/pi-ext-float-term

Commands

Command Description
/float-fish Open floating fish terminal
/float-lazygit Open floating lazygit
/float-yazi Open floating yazi file manager

Shortcuts

Shortcut Action
Ctrl+Alt+F Floating fish shell
Ctrl+Alt+G Floating lazygit
Ctrl+Alt+Y Floating yazi
Ctrl+Shift+Alt+G Floating gcp (git commit + push)
gcp — Interactive Git Commit & Push

The gcp function (triggered via Ctrl+Shift+Alt+G) is an interactive helper for creating Conventional Commits and pushing them. It automates the git add . && git commit -m "..." && git push workflow.

How it works:

  1. Shows working tree overview — displays git status --short so you can review what will be staged
  2. Prompts for commit type — select from a numbered list of conventional commit types:
# Type Description
1 ✨feat A new feature
2 🐛fix A bug fix
3 📝docs Documentation only changes
4 💄style Formatting, whitespace, missing semicolons (no logic change)
5 ♻️refactor Code refactoring (neither feat nor fix)
6 ⚡perf Performance improvement
7 ✅test Adding or modifying tests
8 👷build Build system, dependencies, CI configuration
9 🔧chore Maintenance, tooling, config files, gitignore
10 ⏪revert Revert a previous commit
11 🔄update Dependency updates, toolchain version bumps, library upgrades
  1. Prompts for commit description — enter a short summary (required)
  2. Executes — runs git add . then git commit -m "<type>: <description>" then git push

The function defaults to type ✨feat (option 1) if you press Enter without selecting a number.

Requirements

  • pi coding agent (v0.x+)
  • node-pty (included as dependency, auto-installed)

Documentation

For more information, visit dev.leiyanhui.com/ai/pi-float-term.

License

MIT

Keywords