Generate code¶
The model works in one folder: it can read and write files there and run programs. Give it a
folder for this purpose, not your home directory. satyrn code creates the folder if needed.
If the model server is not running, it asks whether to start it.
satyrn code uses your default coding agent, pi unless you chose Open Interpreter (see
Choose the coding agent). Add --open-interpreter or --pi
to use the other one for a single session, for example satyrn code ~/ai-code --open-interpreter.
Talk to it¶
satyrn code ~/ai-code
With pi, type your request right away; pi shows each file it reads or writes and each command
it runs. With Open Interpreter, the first time you use a folder, it asks whether you trust it, because settings
inside a folder can run code. Choose 1. Trust and continue for a folder of your own; the answer
is remembered. Its screens still say “Codex” in places, as in that question and in the hint
Ask Codex to do anything: Open Interpreter is based on OpenAI’s Codex CLI. satyrn asks it to
call itself Satyrn (OPEN_INTERPRETER_PRODUCT_NAME); version 0.0.60 does not support that yet,
and a change that adds it has been prepared for Open Interpreter. The header shows what
actually runs:
>_ Open Interpreter (v0.0.60)
model: ollama gpt-oss:20b
directory: /home/you/ai-code
While you type your first request, satyrn lets the model read the coding agent’s context in
the background, so the first answer comes sooner (see Speed; --no-warmup turns
it off). Type a request and press Enter. The interpreter shows each command the model runs and
its output, and may ask for your approval first. You can ask for changes in the same
conversation. Ctrl+C leaves. Without a folder, satyrn code works in the current one.
Example: hello world¶
A real session with Open Interpreter and gpt-oss:20b on a laptop CPU without GPU (Intel i7-13700H), recorded with
docs/example/record.py. The animation on the front page shows its important
moments; here is all of it as text, starting after satyrn code ~/ai-code and the trust
question:
╭──────────────────────────────────────────────────╮
│ >_ Open Interpreter (v0.0.60) │
│ │
│ model: ollama gpt-oss:20b /model to change │
│ directory: ~/ai-code │
╰──────────────────────────────────────────────────╯
Tip: Use /fork to branch the current chat into a new thread.
› Create hello.py that prints Hello, World! Then run it.
• Ran cat > hello.py <<'EOF'
│ print("Hello, World!")
│ EOF
└ (no output)
• Ran python3 hello.py
└ Hello, World!
• Created hello.py:
print("Hello, World!")
Executed it with python3 hello.py, producing:
Hello, World!
Worked for 4m 23s · 19:43
Token usage: total=1,475 input=1,279 (+ 3,450 cached) output=196
To continue this session, run:
codex resume 01a1c6f8-9de8-7572-b6bc-5f1d92680551
$ ^C
$ python3 ai-code/hello.py
Hello, World!
$ exit
exit
The model worked for 4 minutes 23 seconds, longer than usual, for two
reasons that Ollama’s log shows: it was the first request after the model was loaded, so the
model read the whole context first, and the interactive interface sent a second request of its
own at the same moment, which the CPU worked on first. codex resume is wording inherited
from Codex; with satyrn, a session continues with satyrn interpreter resume ID.
The recording, with everything shown and its timing, is
hello-world.cast in
asciicast format; asciinema play replays it.
uv run docs/example/record.py records a new session (the model server must be running).
One request, no conversation¶
satyrn code ~/ai-code -p "Write fizzbuzz.py that prints FizzBuzz for 1 to 15. Run it and tell me the output."
With -p, the model works on the request until it is done, prints its answer and exits. This
is handy in scripts; it is also how this project’s tests and benchmarks drive the model. The
model may write files only in the folder (and in temporary folders).
Both forms accept -m MODEL to use another model than your default for this one time, for
example -m qwen3.6:35b-a3b or its number, -m 2. Only the models that satyrn models lists
can be used: Open Interpreter needs instructions and settings for each model, and those exist
only for the listed ones. See Add a model that is not listed.
Write good requests¶
The model only knows what you tell it and what it finds in the folder.
Name the file and the language: Create
wordcount.pythat … works better than count words.Say how to check the result: … then run it on
README.mdand show the output.For changes, point at the file: In
wordcount.py, ignore case when counting.Keep each request to one step. Ask for the next change after you have seen the result.
The model is told to check its work by running it and to finish with a short summary of what it changed. See How it works for everything it is told.
Use the coding agents directly¶
satyrn pi … and satyrn interpreter … run the project’s copies of pi and Open Interpreter with
the project’s settings and pass every argument on, so all of their own options are available:
satyrn pi --help # pi's own options
satyrn interpreter --oss -C ~/ai-code # what `satyrn code ~/ai-code` runs
satyrn interpreter exec --help # its non-interactive mode
Their settings and history stay in .runtime/pi-home and .runtime/interpreter-home, so a pi
or Open Interpreter you may have installed before is not touched. satyrn ollama … does the same for
Ollama’s command line, for example satyrn ollama list.
Stop¶
satyrn stop
The model stays in memory for 30 minutes after its last request, then Ollama frees the memory
on its own. stop ends the server right away.