Skip to content
hariappointyPublic
forked from Michaelliv/runline

About

⚡ Code mode for agents

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

226 Commits

Folders and files

Repository files navigation

runline ⚡

Code mode for agents.

Turn any API or host capability into a callable action. Install a plugin, write JavaScript, call actions. Code runs in a QuickJS WASM runtime with plugin globals; enable the built-in node plugin when you want filesystem, path, OS, process, crypto, shell, and fetch actions.

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 203 built-in 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 runtime: each configured plugin is a top-level global, dot-chain into resource and action. Configure the built-in node plugin for host work like node.fs.readFile, node.process.execFile, node.path.join, node.crypto.hash, and node.fetch.

// 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

203 built-in plugins covering popular SaaS, DevOps, productivity, image-generation APIs, and host Node capabilities. 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
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
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
contentful 7 space, contentType, entry, asset, locale CONTENTFUL_SPACE_ID, CONTENTFUL_DELIVERY_TOKEN
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
databricks 34 sql, files, genie, modelServing, catalog, table, volume, function, vectorSearch DATABRICKS_HOST, DATABRICKS_TOKEN
deepl 2 language DEEPL_API_KEY
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
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
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
gitlab 17 issue, release, repository, user, file GITLAB_TOKEN
gmail 32 message, thread, draft, label, profile, alias
gong 4 call, user GONG_ACCESS_KEY, GONG_ACCESS_KEY_SECRET
googleCalendar 11 calendar, event
googleContacts 10 contact, group
googleDocs 21 document
googleDrive 20 file, folder, fileFolder, drive
googleImage 1 image GOOGLE_API_KEY
googleSheets 13 spreadsheet, sheet
googleSlides 7 presentation, page
googleTasks 12 taskList, task
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
grist 4 record GRIST_API_KEY
hackernews 6 article, user, all
halopsa 20 client, site, ticket, user HALOPSA_API_URL, HALOPSA_CLIENT_ID, HALOPSA_CLIENT_SECRET
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, 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
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 88 issue, comment, state, label, project, milestone, projectUpdate, view, cycle, initiative, team, user, attachment, org, webhook 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_EMAIL_DOMAIN
mailjet 3 email, sms MAILJET_API_KEY, MAILJET_SECRET_KEY
mandrill 2 message MANDRILL_API_KEY
marketstack 3 endOfDayData, exchange, ticker MARKETSTACK_API_KEY
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
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
node 38 fs, path, os, process, crypto, fetch —
notion 14 block, database, page, user NOTION_API_KEY
npm 5 package, distTag
odoo 6 record, model ODOO_URL, 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
openai 1 image OPENAI_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
pagerduty 9 incident, incidentNote, logEntry, user PAGERDUTY_API_TOKEN
paypal 4 payout, payoutItem PAYPAL_CLIENT_ID, PAYPAL_SECRET
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
quickchart 1 chart
raindrop 13 bookmark, collection, tag, user RAINDROP_ACCESS_TOKEN
recraft 1 image RECRAFT_API_KEY
reddit 10 post, comment, subreddit, user
replicate 1 image REPLICATE_API_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
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
strapi 5 entry STRAPI_URL
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
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
together 1 image TOGETHER_API_KEY
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
xai 1 image XAI_API_KEY
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
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
# List actions only for connected services
runline actions --connected

# 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 runtime
runline exec 'return actions.list()'
runline exec 'return actions.list("brandfetch")'
runline exec 'return actions.find("create issue")'
runline exec 'return actions.describe("github.issue.create")'
runline exec 'return actions.check("github.issue.create", { owner: "a" })'

# 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: plugin execute handlers run outside the QuickJS runtime with full Node.js access (fetch, fs, etc). Agent code calls them through configured plugin globals; add a node connection to expose host APIs through the built-in node plugin. ctx.connection.config holds the resolved config with env var overrides applied.

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

Sandbox

Agent code runs in a QuickJS WASM runtime:

  • 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)
  • Configured Node globals — when configured, the built-in node plugin exposes host-backed actions such as node.fs.readFile, node.fs.writeFile, node.path.join, node.os.info, node.process.execFile, node.crypto.hash, and node.fetch

For Agents

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

runline actions --json          # all actions with schemas
runline actions --connected --json  # only connected services
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 the QuickJS runtime
runline exec -f ./script.js            # execute a file
runline actions                        # list all actions
runline actions --connected            # only actions for configured connections
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 (203 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 a single native tool:

  • execute_runline — run JavaScript in the runline runtime. Discovery happens inside the runtime via actions.list / find / describe / check, so the agent never needs a separate listing tool.

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

pi install npm: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

About

⚡ Code mode for agents

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages