Skip to content

Michaelliv/runline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

180 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

runline ⚡

Code mode for agents.

Turn any API into a callable action. Install a plugin, write JavaScript, call actions. The code runs in a QuickJS WASM sandbox — no filesystem, no network, just plugin actions via a proxy.

npm install -g runline

Quick Start

npm install -g runline
runline init
runline connection add bf --plugin brandfetch --set apiKey=xxx

runline exec 'return await brandfetch.brand.getColors({ domain: "nike.com" })'
# => [{ hex: "#E5E5E5", type: "accent" }, { hex: "#111111", type: "dark" }, ...]

All 188 plugins ship bundled inside runline — no per-plugin install step. Just add a connection for the one you want to use. Agent code runs in a QuickJS sandbox: each plugin is a top-level global, dot-chain into resource and action. Plugin actions execute outside the sandbox with full network access; the agent can only reach APIs through the actions you've configured.

// agent writes this
const company = await brandfetch.brand.getCompany({ domain: "stripe.com" });
const deals = await pipedrive.deal.list({ limit: 10 });
const issue = await github.issue.create({
  owner: "acme", repo: "api",
  title: `New lead: ${company.name}`,
  body: `${deals.length} open deals`
});
return { company: company.name, issue: issue.number };

Plugins

188 built-in plugins covering popular SaaS, DevOps, and productivity APIs. All ship with the package — no separate install needed.

Set the env var shown in the Auth column, add a connection, and go:

export GITHUB_TOKEN=ghp_xxx
runline connection add gh --plugin github --set token=$GITHUB_TOKEN
runline exec 'return await github.user.listRepos({ username: "torvalds" })'
Plugin Actions Resources Auth
actionNetwork 23 attendance, event, person, petition, signature, tag, personTag ACTION_NETWORK_API_KEY
activeCampaign 48 contact, account, accountContact, contactTag, contactList, list, tag, deal, connection, ecomCustomer, ecomOrder, ecomOrderProduct ACTIVE_CAMPAIGN_API_URL, ACTIVE_CAMPAIGN_API_KEY
adalo 5 collection ADALO_APP_ID, ADALO_API_KEY
affinity 16 list, listEntry, person, organization AFFINITY_API_KEY
agileCrm 15 contact, company, deal AGILE_CRM_SUBDOMAIN, AGILE_CRM_EMAIL, AGILE_CRM_API_KEY
airtable 10 base, record AIRTABLE_TOKEN
airtop 24 session, window, extraction, interaction, agent, file AIRTOP_API_KEY
apiTemplateIo 4 account, template, image, pdf API_TEMPLATE_IO_API_KEY
asana 22 task, subtask, taskComment, taskTag, taskProject, user, project ASANA_TOKEN
autopilot 11 contact, contactJourney, contactList, list AUTOPILOT_API_KEY
bambooHr 11 employee, employeeDocument, file, companyReport BAMBOO_HR_SUBDOMAIN, BAMBOO_HR_API_KEY
bannerbear 4 image, template BANNERBEAR_API_KEY
baserow 8 row BASEROW_HOST, BASEROW_TOKEN
beeminder 18 datapoint, charge, goal, user BEEMINDER_API_TOKEN
bitly 3 link BITLY_ACCESS_TOKEN
bitwarden 19 collection, event, group, member BITWARDEN_CLIENT_ID, BITWARDEN_CLIENT_SECRET, BITWARDEN_ENVIRONMENT, BITWARDEN_DOMAIN
box 11 file, folder BOX_ACCESS_TOKEN
brandfetch 5 brand BRANDFETCH_API_KEY
brevo 15 contact, attribute, email, sender BREVO_API_KEY
bubble 5 object BUBBLE_API_TOKEN, BUBBLE_APP_NAME, BUBBLE_HOSTING, BUBBLE_DOMAIN, BUBBLE_ENVIRONMENT
chargebee 5 customer, invoice, subscription CHARGEBEE_ACCOUNT_NAME, CHARGEBEE_API_KEY
circleci 3 pipeline CIRCLECI_API_KEY
ciscoWebex 10 message, meeting WEBEX_ACCESS_TOKEN
clearbit 3 person, company CLEARBIT_API_KEY
clickup 61 checklist, checklistItem, comment, folder, goal, goalKeyResult, guest, task, taskTag, taskList, taskDependency, spaceTag, list, timeEntry, timeEntryTag CLICKUP_ACCESS_TOKEN
clockify 25 client, project, tag, task, timeEntry, user, workspace CLOCKIFY_API_KEY
cloudflare 4 zoneCertificate CLOUDFLARE_API_TOKEN
cockpit 5 collection, form, singleton COCKPIT_URL, COCKPIT_ACCESS_TOKEN
coda 18 table, formula, control, view CODA_ACCESS_TOKEN
coingecko 10 coin, event COINGECKO_API_KEY
contentful 7 space, contentType, entry, asset, locale CONTENTFUL_SPACE_ID, CONTENTFUL_DELIVERY_TOKEN, CONTENTFUL_PREVIEW_TOKEN, source
convertkit 16 customField, form, sequence, tag, tagSubscriber CONVERTKIT_API_SECRET
copper 32 company, lead, opportunity, person, project, task, customerSource, user COPPER_API_KEY, COPPER_EMAIL
cortex 4 analyzer, job, responder CORTEX_HOST, CORTEX_API_KEY
currents 22 action, instance, project, run, signature, specFile, test, testResult CURRENTS_API_KEY
customerIo 9 campaign, customer, event, segment CUSTOMERIO_SITE_ID, CUSTOMERIO_TRACKING_API_KEY, CUSTOMERIO_APP_API_KEY, region
databricks 34 sql, files, genie, modelServing, catalog, table, volume, function, vectorSearch DATABRICKS_HOST, DATABRICKS_TOKEN
deepl 2 language DEEPL_API_KEY, DEEPL_PLAN
demio 4 event, report DEMIO_API_KEY, DEMIO_API_SECRET
dhl 1 shipment DHL_API_KEY
discord 13 channel, member, message DISCORD_BOT_TOKEN, DISCORD_GUILD_ID
discourse 16 category, group, post, user, userGroup DISCOURSE_HOST, DISCOURSE_API_KEY, DISCOURSE_API_USERNAME
disqus 4 forum DISQUS_API_KEY
docker 5 containers, images
drift 5 contact DRIFT_ACCESS_TOKEN
dropbox 9 file, folder, search DROPBOX_ACCESS_TOKEN
dropcontact 2 contact DROPCONTACT_API_KEY
egoi 4 contact EGOI_API_KEY
elasticsearch 9 document, index ELASTICSEARCH_URL, ELASTICSEARCH_USERNAME, ELASTICSEARCH_PASSWORD
emelia 9 campaign, contactList EMELIA_API_KEY
erpnext 5 document ERPNEXT_HOST, ERPNEXT_API_KEY, ERPNEXT_API_SECRET
facebookGraph 1 request FACEBOOK_ACCESS_TOKEN
freshdesk 10 ticket, contact FRESHDESK_DOMAIN, FRESHDESK_API_KEY
freshservice 77 agent, agentGroup, announcement, asset, assetType, change, department, location, problem, product, release, requester, requesterGroup, software, ticket, agentRole FRESHSERVICE_DOMAIN, FRESHSERVICE_API_KEY
freshworksCrm 35 account, appointment, contact, deal, note, salesActivity, task, search FRESHWORKS_CRM_DOMAIN, FRESHWORKS_CRM_API_KEY
getresponse 5 contact GETRESPONSE_API_KEY
ghost 5 post GHOST_URL, GHOST_ADMIN_API_KEY
github 34 file, issue, release, repository, review, user, organization, workflow GITHUB_TOKEN, GITHUB_API_URL
gitlab 17 issue, release, repository, user, file GITLAB_SERVER, GITLAB_TOKEN
gong 4 call, user GONG_BASE_URL, GONG_ACCESS_KEY, GONG_ACCESS_KEY_SECRET
gotify 3 message GOTIFY_URL, GOTIFY_APP_TOKEN, GOTIFY_CLIENT_TOKEN
gotowebinar 20 webinar, registrant, session, attendee, coorganizer, panelist GOTO_ACCESS_TOKEN, GOTO_ORGANIZER_KEY
grafana 17 dashboard, team, teamMember, user GRAFANA_URL, GRAFANA_API_KEY
graphql 2 query, introspect GRAPHQL_ENDPOINT, GRAPHQL_AUTH_HEADER, headers
grist 4 record GRIST_API_KEY, planType, subdomain, GRIST_URL
hackernews 6 article, user, all
halopsa 20 client, site, ticket, user hostingType, HALOPSA_AUTH_URL, HALOPSA_APP_URL, HALOPSA_API_URL, HALOPSA_CLIENT_ID, HALOPSA_CLIENT_SECRET, scope, tenant
harvest 49 client, project, task, contact, invoice, expense, estimate, user, timeEntry, company HARVEST_TOKEN, HARVEST_ACCOUNT_ID
helpscout 13 conversation, customer, mailbox, thread HELPSCOUT_ACCESS_TOKEN
highlevel 17 contact, opportunity, task, calendar HIGHLEVEL_ACCESS_TOKEN, HIGHLEVEL_LOCATION_ID
homeAssistant 13 config, service, state, event, log, template, history HASS_HOST, port, ssl, HASS_TOKEN
hubspot 32 contact, company, deal, ticket, contactList, engagement, form HUBSPOT_ACCESS_TOKEN
humanticAi 3 profile HUMANTIC_AI_API_KEY
hunter 3 domainSearch, emailFinder, emailVerifier HUNTER_API_KEY
intercom 10 contact, company INTERCOM_ACCESS_TOKEN
iterable 6 event, user, userList ITERABLE_API_KEY, ITERABLE_REGION
jenkins 11 job, build, instance JENKINS_URL, JENKINS_USER, JENKINS_TOKEN
jira 16 issue, issueComment, user JIRA_DOMAIN, JIRA_EMAIL, JIRA_API_TOKEN
keap 28 company, contact, contactNote, contactTag, order, product, email, file KEAP_ACCESS_TOKEN
kobotoolbox 17 form, submission, hook, file KOBOTOOLBOX_URL, KOBOTOOLBOX_TOKEN
lemlist 15 activity, campaign, lead, team, unsubscribe, enrich LEMLIST_API_KEY
linear 7 issue LINEAR_API_KEY
lingvanex 1 translate LINGVANEX_API_KEY
linkedin 1 post LINKEDIN_ACCESS_TOKEN
lonescale 4 list, item LONESCALE_API_KEY
magento 15 customer, invoice, order, product MAGENTO_HOST, MAGENTO_ACCESS_TOKEN
mailcheck 1 email MAILCHECK_API_KEY
mailchimp 14 member, memberTag, listGroup, campaign MAILCHIMP_API_KEY
mailerlite 4 subscriber MAILERLITE_API_KEY
mailgun 1 email MAILGUN_API_KEY, MAILGUN_API_DOMAIN, MAILGUN_EMAIL_DOMAIN
mailjet 3 email, sms MAILJET_API_KEY, MAILJET_SECRET_KEY, sandboxMode, MAILJET_SMS_TOKEN
mandrill 2 message MANDRILL_API_KEY
marketstack 3 endOfDayData, exchange, ticker MARKETSTACK_API_KEY, useHttps
matrix 10 account, room, message, event, roomMember MATRIX_HOMESERVER_URL, MATRIX_ACCESS_TOKEN
mattermost 19 channel, message, reaction, user MATTERMOST_URL, MATTERMOST_TOKEN
mautic 20 company, contact, contactSegment, campaignContact, companyContact, segmentEmail MAUTIC_URL, MAUTIC_USERNAME, MAUTIC_PASSWORD
medium 3 post, publication, me MEDIUM_ACCESS_TOKEN
messagebird 2 sms, balance MESSAGEBIRD_ACCESS_KEY
metabase 10 question, alert, database, metric METABASE_URL, METABASE_SESSION_TOKEN
misp 44 attribute, event, eventTag, feed, galaxy, noticelist, object, organisation, tag, user, warninglist MISP_URL, MISP_API_KEY
mocean 2 sms, voice MOCEAN_API_KEY, MOCEAN_API_SECRET
monday 18 board, boardColumn, boardGroup, boardItem MONDAY_API_TOKEN
monicaCrm 45 contact, activity, note, task, tag, journalEntry, reminder, call, conversation MONICA_API_TOKEN, MONICA_URL
msg91 1 sms MSG91_AUTHKEY
nasa 14 apod, asteroidNeoFeed, asteroidNeoLookup, asteroidNeoBrowse, donki, earthAssets NASA_API_KEY
netlify 7 deploy, site NETLIFY_ACCESS_TOKEN
netscalerAdc 3 certificate, file NETSCALER_URL, NETSCALER_USERNAME, NETSCALER_PASSWORD
nextcloud 13 file, folder, user NEXTCLOUD_WEBDAV_URL, NEXTCLOUD_USERNAME, NEXTCLOUD_PASSWORD
nocodb 5 row NOCODB_HOST, NOCODB_API_TOKEN
notion 14 block, database, page, user NOTION_API_KEY
npm 5 package, distTag NPM_REGISTRY_URL, NPM_TOKEN
odoo 6 record, model ODOO_URL, ODOO_DB, ODOO_USERNAME, ODOO_PASSWORD
okta 5 user OKTA_URL, OKTA_API_TOKEN
oneSimpleApi 10 website, socialProfile, information, utility ONE_SIMPLE_API_TOKEN
onfleet 34 organization, task, worker, admin, hub, team, recipient, container, destination ONFLEET_API_KEY
openThesaurus 1 synonyms
openweathermap 2 weather OPENWEATHERMAP_API_KEY
oura 4 profile, summary OURA_ACCESS_TOKEN
paddle 9 coupon, payment, plan, product, user PADDLE_VENDOR_ID, PADDLE_VENDOR_AUTH_CODE, sandbox
pagerduty 9 incident, incidentNote, logEntry, user PAGERDUTY_API_TOKEN
paypal 4 payout, payoutItem PAYPAL_CLIENT_ID, PAYPAL_SECRET, PAYPAL_ENV
peekalink 2 link PEEKALINK_API_KEY
phantombuster 5 agent PHANTOMBUSTER_API_KEY
philipsHue 4 light PHILIPS_HUE_ACCESS_TOKEN, PHILIPS_HUE_USERNAME
pipedrive 47 activity, deal, dealProduct, file, lead, note, organization, person, product PIPEDRIVE_API_TOKEN
plivo 3 sms, mms, call PLIVO_AUTH_ID, PLIVO_AUTH_TOKEN
postbin 6 bin, request
posthog 5 alias, event, identity, track POSTHOG_URL, POSTHOG_API_KEY
profitwell 2 company, metric PROFITWELL_ACCESS_TOKEN
pushbullet 4 push PUSHBULLET_ACCESS_TOKEN
pushcut 1 notification PUSHCUT_API_KEY
pushover 1 message PUSHOVER_API_TOKEN
quickbase 8 field, file, record, report QUICKBASE_HOSTNAME, QUICKBASE_USER_TOKEN
quickbooks 45 bill, customer, employee, estimate, invoice, item, payment, purchase, vendor QUICKBOOKS_ACCESS_TOKEN, QUICKBOOKS_COMPANY_ID, QUICKBOOKS_SANDBOX
quickchart 1 chart
raindrop 13 bookmark, collection, tag, user RAINDROP_ACCESS_TOKEN
reddit 10 post, comment, subreddit, user REDDIT_ACCESS_TOKEN
rocketchat 1 chat ROCKETCHAT_DOMAIN, ROCKETCHAT_USER_ID, ROCKETCHAT_AUTH_TOKEN
rundeck 2 job RUNDECK_URL, RUNDECK_TOKEN
salesforce 48 account, contact, lead, opportunity, case, task, user, sobject, soql SALESFORCE_INSTANCE_URL, SALESFORCE_ACCESS_TOKEN
salesmate 15 company, activity, deal SALESMATE_SESSION_TOKEN, SALESMATE_LINKNAME
securityScorecard 14 company, industry, portfolio, portfolioCompany, invite, report SECURITYSCORECARD_API_KEY
segment 4 identify, track, group SEGMENT_WRITE_KEY
sendgrid 10 mail, contact, list SENDGRID_API_KEY
sendy 6 campaign, subscriber SENDY_URL, SENDY_API_KEY
sentry 21 event, issue, organization, project, release, team SENTRY_TOKEN, SENTRY_URL
servicenow 40 incident, user, userGroup, userRole, businessService, configurationItem, department, tableRecord SERVICENOW_SUBDOMAIN, SERVICENOW_USERNAME, SERVICENOW_PASSWORD
shopify 10 order, product SHOPIFY_SUBDOMAIN, SHOPIFY_ACCESS_TOKEN
signl4 2 alert SIGNL4_TEAM_SECRET
slack 38 message, channel, reaction, user, userGroup, file, star SLACK_ACCESS_TOKEN
sms77 2 sms, voice SMS77_API_KEY
splunk 16 search, alert, report, user SPLUNK_BASE_URL, SPLUNK_AUTH_TOKEN
spotify 30 player, album, artist, playlist, track, library, myData SPOTIFY_ACCESS_TOKEN
stackby 4 row STACKBY_API_KEY
storyblok 7 content, management STORYBLOK_CONTENT_TOKEN, STORYBLOK_MANAGEMENT_TOKEN
strapi 5 entry STRAPI_URL, STRAPI_API_VERSION, STRAPI_API_TOKEN, STRAPI_EMAIL, STRAPI_PASSWORD
strava 9 activity STRAVA_ACCESS_TOKEN
stripe 20 balance, customer, charge, coupon, customerCard, source, token, meterEvent STRIPE_SECRET_KEY
supabase 5 row SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY
syncromsp 20 customer, contact, ticket, rmmAlert SYNCROMSP_SUBDOMAIN, SYNCROMSP_API_KEY
tapfiliate 11 affiliate, affiliateMetadata, programAffiliate TAPFILIATE_API_KEY
telegram 21 message, chat, callback, file TELEGRAM_BOT_TOKEN, TELEGRAM_BASE_URL
thehive 23 alert, case, observable, task, log THEHIVE_URL, THEHIVE_API_KEY
thehiveProject 37 alert, case, task, observable, comment, log, page, query THEHIVE_URL, THEHIVE_API_KEY
todoist 31 task, project, section, comment, label TODOIST_API_TOKEN
travisci 5 build TRAVISCI_API_TOKEN
trello 37 board, boardMember, card, cardComment, list, attachment, checklist, label TRELLO_API_KEY, TRELLO_TOKEN
twake 1 message TWAKE_API_KEY
twilio 2 sms, call TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN
twist 22 channel, thread, comment, messageConversation TWIST_ACCESS_TOKEN
twitter 8 tweet, user, list, dm TWITTER_BEARER_TOKEN
unleashedSoftware 3 salesOrder, stockOnHand UNLEASHED_API_ID, UNLEASHED_API_KEY
uplead 2 person, company UPLEAD_API_KEY
uproc 1 process UPROC_EMAIL, UPROC_API_KEY
uptimerobot 22 account, monitor, alertContact, maintenanceWindow, publicStatusPage UPTIMEROBOT_API_KEY
urlscanio 3 scan URLSCANIO_API_KEY
vero 8 user, event VERO_AUTH_TOKEN
vonage 1 sms VONAGE_API_KEY, VONAGE_API_SECRET
wekan 24 board, list, card, cardComment, checklist, checklistItem WEKAN_URL, WEKAN_TOKEN
woocommerce 15 product, order, customer WOOCOMMERCE_URL, WOOCOMMERCE_CONSUMER_KEY, WOOCOMMERCE_CONSUMER_SECRET
wordpress 15 post, page, user WORDPRESS_URL, WORDPRESS_USERNAME, WORDPRESS_PASSWORD
xero 8 invoice, contact XERO_ACCESS_TOKEN, XERO_TENANT_ID
yourls 3 url YOURLS_URL, YOURLS_SIGNATURE
zammad 22 user, organization, group, ticket ZAMMAD_URL, ZAMMAD_TOKEN
zendesk 18 ticket, user, organization, ticketField ZENDESK_SUBDOMAIN, ZENDESK_EMAIL, ZENDESK_API_TOKEN
zoho 60 account, contact, deal, invoice, lead, product, purchaseOrder, salesOrder, vendor, quote ZOHO_ACCESS_TOKEN, ZOHO_API_DOMAIN
zoom 5 meeting ZOOM_ACCESS_TOKEN
zulip 15 message, stream, user ZULIP_URL, ZULIP_EMAIL, ZULIP_API_KEY

Examples

# List all available actions
runline actions

# Get Nike's brand colors
runline exec 'return await brandfetch.brand.getColors({ domain: "nike.com" })'

# Create a GitHub issue
runline exec '
  return await github.issue.create({
    owner: "acme", repo: "api",
    title: "Bug: login broken",
    labels: ["bug", "urgent"]
  })
'

# Search Pipedrive deals
runline exec 'return await pipedrive.deal.search({ term: "Acme" })'

# Chain actions together
runline exec '
  const contact = await hubspot.contact.get({ id: "123" });
  const task = await todoist.task.create({
    content: `Follow up with ${contact.properties.firstname}`,
    priority: 4
  });
  return { contact: contact.properties.email, taskId: task.id };
'

# Discover actions from inside the sandbox
runline exec 'return brandfetch.help()'
runline exec 'return help()'

# Output as JSON (for agents)
runline exec 'return await github.repo.list({ owner: "torvalds" })' --json

Writing a Plugin

Plugins export a function that receives a RunlinePluginAPI and registers actions.

import type { RunlinePluginAPI } from "runline";

export default function orders(rl: RunlinePluginAPI) {
  rl.setName("orders");
  rl.setVersion("1.0.0");

  // Connection config — env vars override config.json values
  rl.setConnectionSchema({
    apiKey: { type: "string", required: true, env: "ORDERS_API_KEY" },
    baseUrl: { type: "string", required: true, env: "ORDERS_BASE_URL" },
  });

  rl.registerAction("list", {
    description: "List orders for an organization",
    inputSchema: {
      orgId: { type: "string", required: true },
      status: { type: "string", required: false, description: "open, closed, or all" },
      limit: { type: "number", required: false },
    },
    async execute(input, ctx) {
      const { orgId, status, limit } = input as Record<string, unknown>;
      const url = new URL(`${ctx.connection.config.baseUrl}/orgs/${orgId}/orders`);
      if (status) url.searchParams.set("status", status as string);
      if (limit) url.searchParams.set("limit", String(limit));

      const res = await fetch(url.toString(), {
        headers: { Authorization: `Bearer ${ctx.connection.config.apiKey}` },
      });
      if (!res.ok) throw new Error(`Orders API ${res.status}: ${await res.text()}`);
      return res.json();
    },
  });

  rl.registerAction("create", {
    description: "Create a new order",
    inputSchema: {
      orgId: { type: "string", required: true },
      customer: { type: "string", required: true },
      total: { type: "number", required: true },
    },
    async execute(input, ctx) {
      const res = await fetch(`${ctx.connection.config.baseUrl}/orders`, {
        method: "POST",
        headers: {
          Authorization: `Bearer ${ctx.connection.config.apiKey}`,
          "Content-Type": "application/json",
        },
        body: JSON.stringify(input),
      });
      if (!res.ok) throw new Error(`Orders API ${res.status}: ${await res.text()}`);
      return res.json();
    },
  });
}

Key points: execute runs outside the sandbox with full Node.js access (fetch, fs, etc). The sandbox can only call your actions through the proxy. ctx.connection.config holds the resolved config with env var overrides applied.

See packages/runline-plugins/ for 188 real-world examples.

Sandbox

Agent code runs in a QuickJS WASM sandbox:

  • No fetch — network access is only through plugin actions
  • No fs — no filesystem access
  • Timeout — configurable, kills infinite loops
  • Memory limit — configurable, prevents OOM
  • console.log — captured and returned in result.logs
  • Plugin globals — each installed plugin is a top-level proxy (e.g. github, slack, brandfetch). Dot-chain into resource and action: github.issue.create(input)

For Agents

Every command supports --json. Use runline actions --json for full schemas with input types.

runline actions --json          # all actions with schemas
runline exec '<code>' --json    # structured { result, logs } output

SDK

import { Runline } from "runline";
import brandfetch from "runline-plugin-brandfetch";

const rl = Runline.create({
  plugins: [brandfetch],
  connections: [{ name: "bf", plugin: "brandfetch", config: { apiKey: "xxx" } }],
});

const result = await rl.execute(`
  const colors = await brandfetch.brand.getColors({ domain: "stripe.com" });
  return colors.filter(c => c.type === "accent");
`);

console.log(result.result);  // [{ hex: "#635BFF", type: "accent", brightness: 116 }]

CLI Reference

runline exec "<code>"                  # execute JS in sandbox
runline exec -f ./script.js            # execute a file
runline actions                        # list all actions
runline plugin install <source>        # install from git/npm/local
runline plugin list                    # list installed plugins
runline plugin remove <name>           # remove a plugin
runline connection add <n> -p <plugin> -s key=val  # add connection
runline connection list                # list connections
runline connection remove <name>       # remove a connection
runline init                           # create .runline/ directory

Configuration

.runline/config.json:

{
  "connections": [
    { "name": "gh", "plugin": "github", "config": { "token": "ghp_xxx" } },
    { "name": "bf", "plugin": "brandfetch", "config": { "apiKey": "xxx" } }
  ],
  "timeoutMs": 30000,
  "memoryLimitBytes": 67108864
}

Env vars override config values. Plugins declare env var names in their connection schema (e.g. GITHUB_TOKEN).

Development

Runline is a bun workspace monorepo: packages/runline (library + CLI), packages/runline-plugins (188 built-in plugins, bundled into runline's dist at build time), and packages/pi-runline (pi extension that exposes runline to agents).

bun install
bun --filter runline dev -- exec 'return 1 + 2'
bun --filter runline test
bun run check

Pi integration

The pi-runline package is a pi extension that plugs runline into coding agents as two native tools:

  • list_runline_actions — enumerate the action catalog (optionally filtered to one plugin).
  • execute_runline — run JavaScript in the runline sandbox.

It ships with /runline-plugins, a fuzzy multi-select picker for choosing which of the 188 plugins the agent should see, plus a guided credential prompt for the ones you enable.

pi install pi-runline
# then in any pi session inside a project with .runline/
/runline-plugins

See packages/pi-runline/README.md for details.

How It Relates to dripline

dripline is query mode — SQL tables over live APIs. runline is code mode — JavaScript actions over the same APIs. Same plugin architecture, same connection config, different interface. Use dripline when you want to SELECT rows; use runline when you want to create, update, delete, or chain multiple API calls together.

License

MIT