ollie/scripts
Levi Neely f984565082 scripts: add s/sh, s/job, s/q, s/sched, s/ls, s/kill to ollie filesystem
Install scripts to ~/.config/ollie/scripts/ (not ~/bin/) so they are
served via the 9p mount without PATH changes. Add thin wrappers oq-q
(s/q, foreground one-shot) and oq-schedule (s/sched, background with
b/ path output). Switch osh and oq from OLLIE_9MOUNT to OLLIE.
Update mkfile, docs, and submodule pointer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:06:05 +02:00
..
README.md scripts: add s/sh, s/job, s/q, s/sched, s/ls, s/kill to ollie filesystem 2026-04-18 11:06:05 +02:00
kill scripts: add s/sh, s/job, s/q, s/sched, s/ls, s/kill to ollie filesystem 2026-04-18 11:06:05 +02:00
ls scripts: add s/sh, s/job, s/q, s/sched, s/ls, s/kill to ollie filesystem 2026-04-18 11:06:05 +02:00
oq scripts: add s/sh, s/job, s/q, s/sched, s/ls, s/kill to ollie filesystem 2026-04-18 11:06:05 +02:00
oq-q scripts: add s/sh, s/job, s/q, s/sched, s/ls, s/kill to ollie filesystem 2026-04-18 11:06:05 +02:00
oq-schedule scripts: add s/sh, s/job, s/q, s/sched, s/ls, s/kill to ollie filesystem 2026-04-18 11:06:05 +02:00
osh scripts: add s/sh, s/job, s/q, s/sched, s/ls, s/kill to ollie filesystem 2026-04-18 11:06:05 +02:00

README.md

scripts

Shell scripts for interacting with the ollie 9P filesystem. All scripts read OLLIE (default: $HOME/mnt/ollie) for the mount path.

mk scripts installs them to ~/.config/ollie/scripts/ and they are exposed via the mounted filesystem as s/sh (osh) and s/job (oq), so they are available without any $PATH changes:

exec $OLLIE/s/sh          # start interactive shell
$OLLIE/s/job "my prompt"  # run a batch job

osh

Interactive chat interface for ollie sessions. Resumes the most recent session for the current directory by default; creates a new one if none exists.

osh [-new] [-resume] [-session ID] [-cwd DIR] [-backend B] [-model M] [-agent A]

Flags

Flag Description
-new Always create a new session
-resume Resume last session for the cwd; error if none
-session ID Attach to a specific session by ID
-cwd DIR Working directory (default: pwd)
-backend B Backend override (e.g. ollama, anthropic)
-model M Model override
-agent A Agent config name

Input

At the > prompt:

Input Action
<text> Submit prompt, stream response
/q <text> Enqueue prompt for later
/<cmd> Send to session ctl (e.g. /compact, /clear)
/kill Kill the session and exit
Ctrl-C Interrupt running turn (or exit if idle)

Examples

osh                          # resume or create session for pwd
osh -new -model gpt-4o       # fresh session with model override
osh -session 1745123456-abc  # attach to a specific session

oq

Non-interactive one-shot query. Submits a prompt to b/new, waits for completion, prints the result to stdout, then removes the job. Exit code is non-zero on failure.

oq [flags] [prompt...]
echo "prompt" | oq [flags]

Flags

Flag Description
-name N Base job name; jobs are suffixed -0, -1, ...
-cwd DIR Working directory (default: pwd)
-agent A Agent config name
-backend B Backend override
-model M Model override
-output json Append JSON-only instruction to prompt
-parallel N Run the same prompt N times in parallel (default: 1)
-keep Do not remove job(s) after printing result

Examples

oq "Summarize this repo in one sentence"
cat error.log | oq "What is causing this error?"
oq -output json "List the top 3 risks as JSON"
oq -parallel 4 -keep "Write a haiku about filesystems"
oq -backend ollama -model qwen3:8b "Explain this function" < main.go

With -parallel N and N > 1, results are separated by === {id} === headers.