ollie/scripts
Levi Neely 2ac6378c7e scripts: emit JSONL for -output json; plain newline only for text
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:15:18 +02:00
..
README.md doc: document all s/ scripts (ls, kill, q, sched) 2026-04-18 11:06:32 +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: emit JSONL for -output json; plain newline only for text 2026-04-18 11:15:18 +02:00
oq-q scripts: add -help to s/q and s/sched wrappers 2026-04-18 11:08:38 +02:00
oq-schedule scripts: add -help to s/q and s/sched wrappers 2026-04-18 11:08:38 +02:00
osh scripts: add -help to osh and oq 2026-04-18 11:07:06 +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 exposes them via the mounted filesystem under s/, so they are available without any $PATH changes:

exec $OLLIE/s/sh              # start interactive shell
$OLLIE/s/job "my prompt"      # batch job (foreground)
$OLLIE/s/q "my prompt"        # foreground one-shot query
$OLLIE/s/sched "my prompt"    # background job; prints b/ path
$OLLIE/s/ls                   # list sessions
$OLLIE/s/kill <id>            # kill a session

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.