Newv0.24.0psh · Ollama · zdraw

pcoder.psh

My port of zcoder.zsh to psh, the performance-focused fork of Zsh. A coding agent for Ollama that explores projects, edits files, applies patches, and runs tests from a focused terminal interface.

Built on psh: version 0.24.0 uses psh 1.0.0-rc2 or newer and its bundled JSON, terminal UI, and Markdown components. Choose your workspace, connect an Ollama model, and work locally or beside a remote project.

The shell supplies the toolkit

psh supplies the interpreter and bundled components that power pcoder. Application logic, including HTTP, JSON, session storage, tool dispatch, and the interface, stays in the shell and its native modules. External tools provide specific capabilities: rg for search, and git or patch for applying changes.

zjsonJSON
Parse and encode the agent's structured data inside the shell.
zdrawTerminal UI
Draw the interface, measure Unicode cells, and handle structured input.
zmdownMarkdown
Render replies and workspace documents in the terminal.

From investigation to verified changes

Work through a project

Search, read, edit, apply patches, run tests, and iterate toward an outcome inside the workspace you choose.

Steer ongoing work

Send a correction at the next tool boundary or queue a follow-up for when the current task finishes.

Keep useful context

Resume saved sessions and use compact checkpoints to continue longer tasks when the context window fills.

Warm up while you type

Load the selected Ollama model and stable project context before your first request, with readiness shown in the TUI.

Use project guidance

Read hierarchical AGENTS.md files and discover Agent Skills so the agent starts with your repository's conventions.

Connect tools through MCP

Add stdio MCP servers, including Bit Lantern for finding code through a local structural index.

Keep the conversation in your hands

Read Markdown replies and workspace documents in the TUI. With the native UI, drag to select text inside the chat pane and press Ctrl+Y to copy it through the terminal clipboard. The selection stays inside the chat content area.

Start a message with ! to run your own command through the normal approval policy. Its output appears in chat and becomes context for your next request. pcoder waits for that request instead of automatically asking the model to respond. Commands submitted during active work wait until the current task finishes.

Work where the project lives

Run pcoder locally against your Ollama host, or start the agent on the machine that owns the workspace. The local TUI becomes a thin client: tools run remotely, and command approvals return to your terminal. Running instances on the same machine can also hand off tasks through a private Unix socket relay.

For ACP clients, ./pcoder.psh --acp exposes an Agent Client Protocol v1 agent over stdio. Add --connect HOST to bridge ACP to the authenticated remote API.

Try pcoder.psh

First install psh 1.0.0-rc2 or newer with its bundled zjson, zdraw, and zmdown components. You also need a running Ollama server, a model with tool-calling support, ripgrep, and GNU Make. Install git or patch for patch application.

ollama pull qwen3-coder
git clone https://github.com/ZaguanLabs/pcoder.psh.git
cd pcoder.psh
make
./pcoder.psh --model qwen3-coder --workspace /path/to/project

make checks and compiles the application libraries using psh. Choose a concrete task, such as finding the cause of failing tests, making a fix, and verifying the result. Use --prompt for a request without the full-screen UI.

Workspace files and command approvals

Built-in file tools stay inside the selected workspace. Shell commands ask for approval by default; the sysadmin profile requires approval for every command. Project MCP servers start only after approval. Prompts, source, and tool output go to the Ollama host you choose.