ollie/data/scripts/acme
Levi Neely 14a52236c8 o: hierarchical context selectors
Refactor o CLI to use explicit context selectors:
- o <cmd>                       Root level
- o session <sname> <cmd>       Session level
- o agent <sname> <aname> <cmd> Agent level

Environment variables $session and $agent can substitute for
positional args for backwards compatibility.

Update acme scripts to use new interface:
  o agent $OLLIE_SESSION $OLLIE_AGENT prompt
2026-08-10 13:37:29 +02:00
..
AddTests o: hierarchical context selectors 2026-08-10 13:37:29 +02:00
AskFile o: hierarchical context selectors 2026-08-10 13:37:29 +02:00
Document o: hierarchical context selectors 2026-08-10 13:37:29 +02:00
Explain o: hierarchical context selectors 2026-08-10 13:37:29 +02:00
Fix o: hierarchical context selectors 2026-08-10 13:37:29 +02:00
README.md acme: add ollie integration commands 2026-08-10 11:29:59 +02:00
Refactor o: hierarchical context selectors 2026-08-10 13:37:29 +02:00
SendVerbatim o: hierarchical context selectors 2026-08-10 13:37:29 +02:00
acme-ollie-ensure o: hierarchical context selectors 2026-08-10 13:37:29 +02:00

README.md

Ollie Acme Commands

These scripts integrate ollie with the acme text editor. They use the acme 9P filesystem to read selections and send prompts to ollie.

Prerequisites

  • An active ollie session with $session and $agent environment variables set
  • The o script in PATH
  • plan9port's 9p command

Commands

Command Selection Required Description
AskFile No Describe and explain the current file
Explain Yes Explain the selected code
Document Yes Add documentation comments to selected code
Fix Yes Fix issues in the selected code
Refactor Yes Refactor the selected code
AddTests Yes Write unit tests for the selected code
SendVerbatim Yes Send selection as-is (wrapped in code fence)

Installation

Add the scripts directory to your PATH or symlink them to a directory in PATH:

export PATH="$PATH:/path/to/ollie/data/scripts/acme"

Or symlink individual commands:

ln -s /path/to/ollie/data/scripts/acme/* ~/bin/

Usage

  1. Start an ollie session and set environment:

    eval $(o env mysession myagent)
    
  2. In acme, add the commands to your window's tag:

    AskFile Explain Fix Refactor Document AddTests SendVerbatim
    
  3. For commands requiring selection, select text first, then middle-click the command.

Example Tag

/home/user/project/main.go Del Snarf Undo Put | AskFile Explain Fix Refactor