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
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,28 @@ POLYLANE_VERSION=v0.1.0 curl -fsSL https://polylane.com/install.sh | bash
$env:POLYLANE_VERSION='v0.1.0'; irm https://polylane.com/install.ps1 | iex
```

### Wire it into your coding agents

```bash
polylane setup # configure every detected agent
polylane setup --agent claude --agent cursor # target specific agents
polylane setup --project # this project instead of the home directory
```

`setup` detects installed coding agents and configures each one: it installs the bundled [agent skill](skill/SKILL.md) where the agent supports skills, and registers the Polylane MCP server (`https://mcp.polylane.com/mcp`) in the agent's own config format.

| Agent | Agent skill | MCP server |
|---|---|---|
| Claude Code | `~/.claude/skills/polylane-cli/` | `~/.claude.json` |
| Cursor | `~/.cursor/skills/polylane-cli/` | `~/.cursor/mcp.json` |
| OpenCode | `~/.config/opencode/skills/polylane-cli/` | `~/.config/opencode/opencode.json` |
| Codex CLI | `~/.codex/skills/polylane-cli/` | `~/.codex/config.toml` |
| Windsurf | — | `~/.codeium/windsurf/mcp_config.json` |
| Zed | — | `~/.config/zed/settings.json` |
| VS Code | — | user profile `mcp.json` |

It is idempotent: the skill is overwritten with the version bundled in the CLI, an existing MCP entry is left untouched, and unreadable config files are skipped with a manual pointer instead of clobbered. The curl installer runs it automatically after install (opt out with `--no-setup`).

## Quick start

```bash
Expand Down
11 changes: 11 additions & 0 deletions codegen/generate-skill.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { readFileSync } from 'node:fs';
import { join } from 'node:path';

export function generateSkill(): string {
const skillPath = join(process.cwd(), 'skill', 'SKILL.md');
const content = readFileSync(skillPath, 'utf-8');
return `// Auto-generated from skill/SKILL.md — do not edit
/* eslint-disable */
export const SKILL_MD = ${JSON.stringify(content)};
`;
}
6 changes: 6 additions & 0 deletions codegen/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { parseSpec } from './parse-spec';
import { generateTypes } from './generate-types';
import { generateClient } from './generate-client';
import { generateCommandMeta } from './generate-commands';
import { generateSkill } from './generate-skill';
import { loadEnvLocal } from './env-local';

loadEnvLocal();
Expand All @@ -14,6 +15,11 @@ const GENERATED_DIR = join(process.cwd(), 'src', 'generated');
export async function generateAll(source?: string): Promise<void> {
const specSource = source ?? resolveSpecSource();
const start = Date.now();

mkdirSync(GENERATED_DIR, { recursive: true });
writeFileSync(join(GENERATED_DIR, 'skill.ts'), generateSkill(), 'utf-8');
process.stderr.write(`[codegen] wrote skill.ts (from skill/SKILL.md)\n`);

process.stderr.write(`[codegen] fetching spec: ${specSource}\n`);
const spec = await fetchSpec(specSource);
process.stderr.write(`[codegen] parsed ${Object.keys(spec.paths).length} paths\n`);
Expand Down
2 changes: 2 additions & 0 deletions src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { registry } from '../registry';
import { authCommands } from './auth';
import { configCommands } from './config';
import { helpCommand } from './help';
import { setupCommand } from './setup';
import { updateCommand } from './update';
import { feedCommands } from './feed';
import { issueCommands } from './issue';
Expand Down Expand Up @@ -48,6 +49,7 @@ export function registerAllCommands(): void {
...apiCommands,
...telemetryCommands,
helpCommand,
setupCommand,
updateCommand,
];

Expand Down
Loading
Loading