← Catalog

pi-runline

Code mode for pi

Package

Install

Install with PiG

pig install npm:pi-runline

Install with Pi

pi install npm:pi-runline
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "extensions/runline-context"
  ]
}

README

Written by the package's publisher, shown as published in version 0.45.0 (README.md). PiG does not review it.

pi-runline

pi-runline is a Pi extension that adds runline to an agent as one tool. The agent writes JavaScript that calls runline actions, and discovers those actions from inside the code it runs.

Use it when a Pi agent should work with services such as GitHub, Slack, or Linear without a separate tool for each endpoint.

Install

Install the extension as a Pi package:

pi install npm:pi-runline

The extension activates in a folder that has a .runline folder at or above it. Create one with the runline command-line interface:

npm install -g runline
runline init

Choose plugins

Run /runline-plugins in a Pi session to choose which plugins the agent is told about:

/runline-plugins

The picker lists every bundled plugin and the plugin files in the project and in ~/.runline/plugins/. Nothing is enabled until you choose.

KeyAction
TypeFilter the list
Up, DownMove the highlight
SpaceEnable or disable the highlighted plugin
Alt+REnter new credentials for the highlighted plugin
EnterSave
EscapeCancel

After you save, the extension offers to set up each newly enabled plugin that needs credentials and has no connection. It asks for each field of the plugin's connection schema and writes the connection to .runline/config.json. It skips a plugin whose required fields are all set through environment variables.

Runline loads a bundled plugin only when the project has a connection for it. For a plugin that needs no credentials, or takes them from the environment, add the connection yourself:

runline connection add node --plugin node

Plugins that use OAuth are connected with runline auth <plugin>. See Connections.

Understand what the agent receives

At the start of a session, the extension loads the project with the runline SDK and adds one message to the conversation. The message names the enabled plugins and explains how to discover and call actions.

The agent then uses a single tool:

ToolBehavior
execute_runlineRuns JavaScript in the runline runtime. Each loaded plugin is a global, return produces the result, and console output is returned as logs

The agent finds actions from inside that code instead of reading schemas from its prompt:

actions.find("create issue");
actions.describe("github.issue.create");
actions.check("github.issue.create", { owner: "acme" });
return await github.issue.create({ owner: "acme", repo: "api", title: "Bug" });

See Run Code for the calling conventions and the runtime.

Configure the extension

The extension keeps two keys in the project's .runline/config.json, next to runline's own settings:

{
  "piPlugins": ["github", "linear", "slack"],
  "showStatus": true
}
KeyDefaultDescription
piPluginsNoneThe plugins named to the agent. /runline-plugins writes it
showStatustrueShows the number of enabled plugins and actions in Pi's status line

To use one runline project from every folder, name it in ~/.pi/agent/runline.json:

{
  "project": "~/Projects/my-runline-project"
}

The extension uses this project when the working folder has no .runline folder at or above it.

Understand the limits

piPlugins controls what the agent is told about, not what it can call. The runtime holds every plugin runline loads for the project: its plugin files, its packages, and the bundled plugins that have a connection. An agent that guesses the name of a loaded plugin that is not in piPlugins can still call it. Remove a plugin's connection, file, or package to make it unreachable.

Runline loads the project's own plugin files and packages only after the project is trusted. Run runline trust in a project that runline init did not create.

Actions run with the permissions of the Pi process, and actions that write run without asking. See Security.