Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
node-version: [20.x, 22.x, 24.x]
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
# (OIDC). We intentionally don't run `npm install -g npm@latest` — the
# npm bundled with some Node 22.x patch releases has a broken
# node_modules (missing `promise-retry`) that makes self-upgrade fail.
# ci.yml still runs the test matrix against 18/20/22 for runtime compat.
# ci.yml still runs the test matrix against 20/22/24 for runtime compat.
- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Guidance for AI coding assistants working **on** this repo. For guidance on how

- **Name:** `@coreplane/polylane` on npm — binary still invoked as `polylane`
- **Type:** Node.js CLI tool (ESM, bundled with esbuild)
- **Engine:** Node.js 18+ (ships as a single bundled file; dev tooling needs a recent Node)
- **Engine:** Node.js 20+ (ships as a single bundled file; dev tooling needs a recent Node)
- **Language:** TypeScript, strict mode
- Runtime deps are intentionally minimal — check `package.json` before adding a new one.

Expand Down
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# polylane

<p><strong>Agent-focused CLI for the <a href="https://polylane.com">Polylane</a> platform.</strong><br>
Investigate incidents, explore cloud infrastructure, search code, run automations, and drive threads — from any agent or terminal.</p>
Investigate production issues, explore cloud infrastructure, search code, run automations, and drive threads — from any agent or terminal.</p>

<p>📚 <strong>Docs: <a href="https://docs.polylane.com">docs.polylane.com</a></strong> · <a href="https://docs.polylane.com/getting-started">Getting started</a> · <a href="https://docs.polylane.com/llms.txt">llms.txt</a> (agent index)</p>

<p>
<a href="https://www.npmjs.com/package/@coreplane/polylane"><img src="https://img.shields.io/npm/v/@coreplane/polylane.svg" alt="npm version"></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License: MIT"></a>
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg" alt="Node.js >= 18"></a>
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg" alt="Node.js >= 20"></a>
</p>

## What this is

`polylane` is designed to be driven by AI agents. Top-level commands map to the tasks an agent actually performs:

- **Triage** issues — anomalies and alerts detected across your cloud and observability stack
- **Drive** incidents — record timeline notes and milestones as you respond
- **Drive** issue timelines — record notes and milestones as you respond
- **Explore** cloud infrastructure — logs, metrics, dependency graphs
- **Search** code
- **Run** the platform's agent tools directly (`tools search` / `tools run` / `tools code`)
Expand All @@ -29,7 +29,7 @@ The full API surface is available behind `polylane api call <op>` as an escape h

## Install

Pick whichever channel fits your system. All install the same Node-based bundle and require Node 18+ (Homebrew pulls Node in as a dependency; the curl + PowerShell installers check for it).
Pick whichever channel fits your system. All install the same Node-based bundle and require Node 20+ (Homebrew pulls Node in as a dependency; the curl + PowerShell installers check for it).

```bash
# macOS / Linux — curl
Expand All @@ -39,7 +39,7 @@ curl -fsSL https://polylane.com/install.sh | bash
irm https://polylane.com/install.ps1 | iex

# Homebrew (tap: coreplanelabs/polylane)
brew install coreplanelabs/polylane
brew install coreplanelabs/polylane/polylane

# npm
npm install -g @coreplane/polylane
Expand All @@ -48,7 +48,7 @@ npm install -g @coreplane/polylane
bun add -g @coreplane/polylane
```

> Requires [Node.js](https://nodejs.org) 18+ at runtime.
> Requires [Node.js](https://nodejs.org) 20+ at runtime.

Version-pin the curl / PowerShell installers with:

Expand All @@ -61,8 +61,9 @@ $env:POLYLANE_VERSION='v0.1.0'; irm https://polylane.com/install.ps1 | iex

```bash
# 1. Authenticate (pick one)
polylane auth login # OAuth browser (humans at a terminal)
polylane auth login --api-key sk_xxxxx # API key (CI / agents)
polylane auth login # OAuth browser (the default)
polylane auth login --no-browser # OAuth device code (SSH / headless)
polylane auth login --api-key sk_xxxxx # API key (CI / scripts where OAuth is impossible)
polylane auth signup --email agent@example.com # bootstrap a fresh account
# (returns a session token; create an
# API key after step 2 for long-lived use)
Expand All @@ -78,8 +79,8 @@ polylane cloud connect --provider <provider> # see `polylane cloud connect

# 4. Work
polylane issue list --active # what the system is flagging
polylane thread list --type incident # incident threads
polylane incident note <thread-id> "rolled back deploy"
polylane thread list --type investigation # investigation threads
polylane issue note <issue-id> "rolled back deploy"
polylane service logs <service> --since 1h --grep error
polylane tools run findNodes --params '{"query":"api"}'
polylane thread ask "<prompt>" --stream
Expand Down Expand Up @@ -167,11 +168,13 @@ Manage with `polylane config show` and `polylane config set --key <key> --value

## Authentication

OAuth is the default way to connect — including for agents. Use an API key only where a browser sign-in is impossible.

| Command | When |
|---|---|
| `polylane auth login --api-key sk_...` | Scripts / CI / machines |
| `polylane auth login` | Interactive OAuth (browser, PKCE) |
| `polylane auth login` | Interactive OAuth (browser, PKCE) — the default |
| `polylane auth login --no-browser` | OAuth device code (SSH / headless) |
| `polylane auth login --api-key sk_...` | Scripts / CI / machines that cannot complete OAuth |
| `polylane auth signup --email … --password …` | Bootstrap a fresh account from an agent (no browser, no human) |

OAuth credentials live at `~/.polylane/credentials.json` (mode `0600`) and auto-refresh before expiry. `polylane auth status` reports the active source.
Expand Down
8 changes: 4 additions & 4 deletions install/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# irm https://polylane.com/install.ps1 | iex
#
# Installs the bundled CLI to $env:USERPROFILE\.polylane\bin\ and (if needed)
# prints the line to add to your PATH. Node 18+ must be installed.
# prints the line to add to your PATH. Node 20+ must be installed.
# Override the version or install prefix with env vars:
#
# $env:POLYLANE_VERSION='v0.1.0'; irm https://polylane.com/install.ps1 | iex
Expand All @@ -28,12 +28,12 @@ function Ok([string]$msg) { Write-Host "✓ $msg" -ForegroundColor Green }

$node = Get-Command node -ErrorAction SilentlyContinue
if (-not $node) {
Die "Node.js 18+ is required but 'node' was not found.`nInstall from https://nodejs.org, then re-run."
Die "Node.js 20+ is required but 'node' was not found.`nInstall from https://nodejs.org, then re-run."
}
$nodeVersion = (& node -v) -replace '^v', ''
$nodeMajor = [int]($nodeVersion.Split('.')[0])
if ($nodeMajor -lt 18) {
Die "Node.js 18+ is required (found v$nodeVersion)."
if ($nodeMajor -lt 20) {
Die "Node.js 20+ is required (found v$nodeVersion)."
}

# --- resolve download URL ---------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# curl -fsSL https://polylane.com/install.sh | bash
#
# Installs the bundled CLI to ~/.polylane/bin/polylane and (if needed) prints the
# line to add to your shell RC to put it on $PATH. Node 18+ must be installed.
# line to add to your shell RC to put it on $PATH. Node 20+ must be installed.
# Override the version or install prefix with env vars:
#
# POLYLANE_VERSION=v0.1.0 curl -fsSL https://polylane.com/install.sh | bash
Expand Down Expand Up @@ -36,13 +36,13 @@ require_cmd curl
require_cmd uname

if ! command -v node >/dev/null 2>&1; then
die "Node.js 18+ is required but 'node' was not found.
die "Node.js 20+ is required but 'node' was not found.
Install from https://nodejs.org or with your package manager, then re-run."
fi

NODE_MAJOR="$(node -e 'process.stdout.write(String(process.versions.node.split(".")[0]))')"
if [ "$NODE_MAJOR" -lt 18 ]; then
die "Node.js 18+ is required (found $(node -v))."
if [ "$NODE_MAJOR" -lt 20 ]; then
die "Node.js 20+ is required (found $(node -v))."
fi

# --- resolve download URL ---------------------------------------------------
Expand Down
Loading
Loading