The portable coding agent.

6.4 MB portable binary. Written in ANSI C and Lua. Runs on Linux, macOS, Windows, Haiku, and more. Auditable, MIT.

psi on Haiku, with a floating sakura window and red vertical Japanese text overlapping the terminalHaikuExplore the demo
AT HOME ONLinuxmacOSWindowsFreeBSDOpenBSDHaikuand beyond

From the terminal, for the terminal

See psi at work.

Small tasks. A running agent.

Find a bug, fix the function, and run it to verify the result.

Less between you
and the work.

A coding agent should be a tool you can understand, carry with you, and change. psi starts with a small C core and puts the high-level behavior in Lua.

The agent loop, terminal interface, tools, and providers are all open to inspection. Keep the parts you need. Build the parts you’re missing.

Explore the architecture

Choose your model.

Anthropic, OpenAI Codex, OpenRouter, or local models with Ollama. Resume a session with a different provider.

Keep your context.

Branch a conversation, explore another approach, and return. Sessions are append-only JSONL with a full tree.

Work your way.

An interactive TUI, a simple REPL, one-shot prompts, and Lua evaluation. At your keyboard or in your scripts.

Open to inspection

Dependencies, in the open.

What stays with psi, and what builds it.
Connections come from its software bills of materials.

Dependency mapLinux · x86_64
13 packages / 21 connections

Select a package to follow its connections.Expand a package for its license and dependencies.

dependencies psi psi 0.2.0 argtable argtable 3.3.1 cjson cjson 1.7.19 curl curl 8.22.0 glibc glibc 2.42-84 libedit libedit 20260508-3.1 lua lua 5.5.0 nss-cacert nss-cacert 3.126 mbedtls mbedtls 3.6.7 libidn2 libidn2 2.3.8 xgcc xgcc 15.3.0 ncurses ncurses 6.6 libunistring libunistring 1.4.2
psi0.2.0
Runtime7 direct
  • argtable3.3.1

    Package license metadata: BSD-3-Clause

    1 dependencies
    • glibc2.42-84

      Package license metadata: LGPL-2.0-or-later

      2 dependencies
      • libidn22.3.8

        Package license metadata: GPL-2.0-or-later, GPL-3.0-or-later, LGPL-3.0-or-later

        1 dependencies
        • libunistring1.4.2

          Package license metadata: LGPL-3.0-or-later

      • xgcc15.3.0

        Package license metadata: GPL-3.0-or-later

  • cjson1.7.19

    Package license metadata: MIT

    1 dependencies
    • glibc2.42-84

      Package license metadata: LGPL-2.0-or-later

      2 dependencies
      • libidn22.3.8

        Package license metadata: GPL-2.0-or-later, GPL-3.0-or-later, LGPL-3.0-or-later

        1 dependencies
        • libunistring1.4.2

          Package license metadata: LGPL-3.0-or-later

      • xgcc15.3.0

        Package license metadata: GPL-3.0-or-later

  • curl8.22.0

    Package license metadata: curl

    3 dependencies
    • glibc2.42-84

      Package license metadata: LGPL-2.0-or-later

      2 dependencies
      • libidn22.3.8

        Package license metadata: GPL-2.0-or-later, GPL-3.0-or-later, LGPL-3.0-or-later

        1 dependencies
        • libunistring1.4.2

          Package license metadata: LGPL-3.0-or-later

      • xgcc15.3.0

        Package license metadata: GPL-3.0-or-later

    • mbedtls3.6.7

      Package license metadata: Apache-2.0, GPL-2.0-or-later

      1 dependencies
      • glibc2.42-84

        Package license metadata: LGPL-2.0-or-later

        2 dependencies
        • libidn22.3.8

          Package license metadata: GPL-2.0-or-later, GPL-3.0-or-later, LGPL-3.0-or-later

          1 dependencies
          • libunistring1.4.2

            Package license metadata: LGPL-3.0-or-later

        • xgcc15.3.0

          Package license metadata: GPL-3.0-or-later

    • nss-cacert3.126

      Package license metadata: MPL-2.0

  • glibc2.42-84

    Package license metadata: LGPL-2.0-or-later

    2 dependencies
    • libidn22.3.8

      Package license metadata: GPL-2.0-or-later, GPL-3.0-or-later, LGPL-3.0-or-later

      1 dependencies
      • libunistring1.4.2

        Package license metadata: LGPL-3.0-or-later

    • xgcc15.3.0

      Package license metadata: GPL-3.0-or-later

  • libedit20260508-3.1

    Package license metadata: BSD-3-Clause

    2 dependencies
    • glibc2.42-84

      Package license metadata: LGPL-2.0-or-later

      2 dependencies
      • libidn22.3.8

        Package license metadata: GPL-2.0-or-later, GPL-3.0-or-later, LGPL-3.0-or-later

        1 dependencies
        • libunistring1.4.2

          Package license metadata: LGPL-3.0-or-later

      • xgcc15.3.0

        Package license metadata: GPL-3.0-or-later

    • ncurses6.6

      Package license metadata: MIT

      1 dependencies
      • glibc2.42-84

        Package license metadata: LGPL-2.0-or-later

        2 dependencies
        • libidn22.3.8

          Package license metadata: GPL-2.0-or-later, GPL-3.0-or-later, LGPL-3.0-or-later

          1 dependencies
          • libunistring1.4.2

            Package license metadata: LGPL-3.0-or-later

        • xgcc15.3.0

          Package license metadata: GPL-3.0-or-later

  • lua5.5.0

    Package license metadata: MIT

    2 dependencies
    • glibc2.42-84

      Package license metadata: LGPL-2.0-or-later

      2 dependencies
      • libidn22.3.8

        Package license metadata: GPL-2.0-or-later, GPL-3.0-or-later, LGPL-3.0-or-later

        1 dependencies
        • libunistring1.4.2

          Package license metadata: LGPL-3.0-or-later

      • xgcc15.3.0

        Package license metadata: GPL-3.0-or-later

    • ncurses6.6

      Package license metadata: MIT

      1 dependencies
      • glibc2.42-84

        Package license metadata: LGPL-2.0-or-later

        2 dependencies
        • libidn22.3.8

          Package license metadata: GPL-2.0-or-later, GPL-3.0-or-later, LGPL-3.0-or-later

          1 dependencies
          • libunistring1.4.2

            Package license metadata: LGPL-3.0-or-later

        • xgcc15.3.0

          Package license metadata: GPL-3.0-or-later

  • nss-cacert3.126

    Package license metadata: MPL-2.0

Retained at runtimeBuild-time onlyA → B: A depends on B

Nix runtime closure + direct build inputs for .#default at 646098f. Other platforms and static builds differ. The full build closure contains 918 packages; the diagram shows runtime relationships and direct build-input relationships.

Runtime SBOM Full build SBOM
Read the dependency list
Shown packages and their visible relationships from the runtime and build SBOMs
PackageVersionShown dependenciesLicense
psi0.2.0argtable, bash, cjson, cjson, curl, gcc-wrapper, glibc, gnumake, libedit, libedit, lua, nss-cacert, nss-cacert, pkg-config-wrapper, stdenv-linux, zlibMIT
argtable3.3.1glibcBSD-3-Clause
cjson1.7.19glibcMIT
curl8.22.0glibc, mbedtls, nss-cacertcurl
glibc2.42-84libidn2, xgccLGPL-2.0-or-later
libedit20260508-3.1glibc, ncursesBSD-3-Clause
libidn22.3.8libunistringGPL-2.0-or-later, GPL-3.0-or-later, LGPL-3.0-or-later
libunistring1.4.2None recordedLGPL-3.0-or-later
lua5.5.0glibc, ncursesMIT
mbedtls3.6.7glibcApache-2.0, GPL-2.0-or-later
ncurses6.6glibcMIT
nss-cacert3.126None recordedMPL-2.0
xgcc15.3.0None recordedGPL-3.0-or-later
bash5.3p15None recordedGPL-3.0-or-later
cjson1.7.19None recordedMIT
gcc-wrapper15.3.0None recordedGPL-3.0-or-later
gnumake4.4.1None recordedGPL-3.0-or-later
libedit20260508-3.1None recordedBSD-3-Clause
nss-cacert3.126None recordedMPL-2.0
pkg-config-wrapper0.29.2None recordedGPL-2.0-or-later
stdenv-linux26.05pre-gitNone recordedMIT
zlib1.3.2None recordedZlib

Portable by design.
Down to the core.

C89 and Lua are a deliberate choice. psi runs on familiar desktops and less-traveled systems, with a Cosmopolitan build that runs on Linux, macOS, and Windows.

Read the portability notes
TESTED OPERATING SYSTEMSSTATUS
  • LinuxTested
  • macOSTested
  • WindowsTested
  • FreeBSD / OpenBSDTested
  • HaikuTested

Across i686, x86_64, aarch64, and riscv64 where available. See the porting notes for build details.

A little Lua.
A lot of possibility.

Add a slash command. Register a tool. Subscribe to the agent lifecycle. Your extensions are ordinary Lua files, loaded straight from disk.

Even the agent loop and terminal rendering live in Lua. Customization goes all the way down.

Explore the extension API
~/.config/psi/extensions/hello.luaLUA
-- A command, in a few lines.
return function(psi)
  psi.commands.register("greet", function(rest)
    return psi.records.new_command_action(
      "print", "hi, " .. (rest ~= "" and rest or "friend")
    )
  end)
end

Small tool.
Big range.

Bring a model provider and a project.
psi brings the rest.

nix run github:siraben/psi

Requires Nix with flakes enabled.

Configure your provider before the first agent turn. Provider setup
Build with psi