Skip to content

piqoni/pi-piqo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Piqo — Pi Extension

A chat-less way to collaborate with your favorite LLM models (remote or local), directly from your files and from any editor. The output is stored automatically into your files.

It is a simple file-watcher extension for pi triggered on-save, which continously monitors directories for @piqo markers and uses the LLM to generate content inline.

Might be useful for keeping notes, writing tasks, researching topics, etc.

Random Example: If you write the following (highlighted line) and save the file: Image

You will get something like (using gpt-5.4-mini):

Image

How It Works

  1. You start pi with the piqo extension and specify directories to watch
  2. Piqo recursively watches those directories for file changes
  3. When a file contains one or more @piqo <instruction> markers, it reads the file, gathers context around all markers, and sends them to pi's LLM in one request
  4. The LLM fulfills each prompt and removes the human prompt line/tag from the file

Usage

If you have Pi installed, you are one command away from using it:

# Load it directly from npm (or alternatively a github repo url)
pi -e npm:pi-piqo --dir=/path/to/your/project

Other options:

# Or if you want to reference a local checkout of this repo
pi -e . --dir=/path/to/your/project

# Watch multiple directories
pi -e . --dir=/path/to/dir1,/path/to/dir2

# Headless mode (no TUI)
pi -e . --dir=/path/to/project -p "Start piqo watcher"

Use exactly one loading mode at a time:

  • If you use pi -e ..., do not also rely on a globally installed pi-piqo.
  • If you installed pi-piqo globally with pi install npm:pi-piqo, run pi --dir=... without -e.

Marker Format

In any text file within the watched directories, add:

@piqo <your instruction here>

The LLM will process it and replace/remove the prompt so the file becomes:

... generated content ...

Examples

In a Python file:

# @piqo add a function to parse CSV files and return a list of dicts

# Becomes generated code with the @piqo prompt removed

In a Markdown file:

@piqo write a summary of REST API best practices

Becomes generated content with the @piqo prompt removed

In a config file:

# @piqo add sensible default nginx config for a Node.js app

# Becomes generated config with the @piqo prompt removed

Behavior Details

  • Debounce: File changes are debounced at 500ms per file to avoid duplicate processing
  • Initial scan: On startup, piqo scans all watched directories for existing markers
  • Ignored paths: Hidden files/dirs, node_modules, .git are automatically skipped
  • Text files only: Only processes common text file extensions (.ts, .js, .py, .md, .txt, etc.)

Installation

To install it for your Pi globally:

pi install npm:pi-piqo

After that, run Pi with just --dir for the directory you want to monitor:

pi --dir=/path/of/your/project

About

A good invisible interface to agents

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors