一键导入
cyrus-setup-linear
// Create a Linear OAuth application and configure Cyrus to use it — supports agent-browser automation or guided manual setup.
// Create a Linear OAuth application and configure Cyrus to use it — supports agent-browser automation or guided manual setup.
| name | cyrus-setup-linear |
| description | Create a Linear OAuth application and configure Cyrus to use it — supports agent-browser automation or guided manual setup. |
CRITICAL: Never use Read, Edit, or Write tools on ~/.cyrus/.env or any file inside ~/.cyrus/. Use only Bash commands (grep, printf >>, etc.) to interact with env files — secrets must never be read into the conversation context. Never scrape, extract, or read secret values from web pages — guide the user to copy them manually.
Creates a Linear OAuth application and configures credentials so Cyrus can receive webhooks and respond to issues.
grep -E '^LINEAR_CLIENT_ID=' ~/.cyrus/.env 2>/dev/null
If LINEAR_CLIENT_ID is already set, check if OAuth is also complete:
grep -q '"workspaces"' ~/.cyrus/config.json 2>/dev/null && echo "configured" || echo "not configured"
If both are set, inform the user:
Linear is already configured. Skipping this step. To reconfigure, remove
LINEAR_CLIENT_ID,LINEAR_CLIENT_SECRET, andLINEAR_WEBHOOK_SECRETfrom~/.cyrus/.envand re-run.
Skip to completion.
Read the base URL from the env file (set by setup-endpoint):
grep '^CYRUS_BASE_URL=' ~/.cyrus/.env | cut -d= -f2-
This is needed for the callback and webhook URLs.
Determine which browser automation mode to use (see orchestrator rules):
claude-in-chrome MCP tools are available → use Path A-1 (claude-in-chrome)agent-browser is installed (which agent-browser) and a Chrome debug session is connected → use Path A-2 (agent-browser)Use the mcp__claude-in-chrome__* tools to navigate and interact with the user's existing Chrome browser. The user is likely already signed in to Linear.
Navigate to the Linear API settings page and proceed with form filling and credential capture using the chrome MCP tools (navigate, click, fill, screenshot, javascript_tool, etc.). Follow the same form fields and credential scraping logic as Path A-2 below, but using MCP tools instead of CLI commands.
If agent-browser is connected to a Chrome debug session, automate the Linear app creation.
agent-browser navigate "https://linear.app/settings/api/applications/new"
Wait for page to load. Take a screenshot to verify you're on the right page and logged in.
agent-browser fill "input[name='name']" "<AGENT_NAME>"
agent-browser fill "input[name='developerName']" "Self-hosted"
agent-browser fill "input[name='developerUrl']" "https://github.com/ceedaragents/cyrus"
For the callback URL field:
agent-browser fill "input[name='redirectUrls']" "<CYRUS_BASE_URL>/callback"
Enable webhooks and fill webhook URL:
agent-browser fill "input[name='webhookUrl']" "<CYRUS_BASE_URL>/linear-webhook"
Check the required event types:
Click "Create".
After creation, Linear redirects to the app settings page. Do NOT screenshot credential pages or attempt to scrape secrets. Proceed to Step 4.
Use the mcp__claude-in-chrome__* tools to navigate and interact with the user's existing Chrome browser.
Navigate to the Linear API settings page (https://linear.app/settings/api/applications/new) and fill in the form with the same fields as Path A-2 above. Click "Create". Do NOT screenshot credential pages or attempt to scrape secrets. Proceed to Step 4.
Guide the user through manual creation:
Create a Linear OAuth Application
- Go to your Linear workspace settings:
- Click your workspace name (top-left) → Settings
- Navigate to API in the left sidebar
- Scroll to OAuth Applications → Click Create new
- Fill in the form:
- Application name:
<AGENT_NAME>- Developer name: Your name or org
- Developer URL:
https://github.com/ceedaragents/cyrus- Redirect callback URLs:
<CYRUS_BASE_URL>/callback- Webhook URL:
<CYRUS_BASE_URL>/linear-webhook- Webhook: ✓ enabled
- Event types: ✓ Agent session events, ✓ Inbox notifications, ✓ Permission changes, ✓ Issues
- Public: ✗ leave disabled (this is a private self-hosted app)
- Click Create
Proceed to Step 4.
The agent must NOT scrape, read, or extract secrets from the page. The user copies them manually into the env file.
grep -q '^LINEAR_CLIENT_ID=' ~/.cyrus/.env || echo 'LINEAR_CLIENT_ID=' >> ~/.cyrus/.env
grep -q '^LINEAR_CLIENT_SECRET=' ~/.cyrus/.env || echo 'LINEAR_CLIENT_SECRET=' >> ~/.cyrus/.env
grep -q '^LINEAR_WEBHOOK_SECRET=' ~/.cyrus/.env || echo 'LINEAR_WEBHOOK_SECRET=' >> ~/.cyrus/.env
# macOS
code --new-window ~/.cyrus/.env 2>/dev/null || open -a TextEdit ~/.cyrus/.env
# Linux
code --new-window ~/.cyrus/.env 2>/dev/null || xdg-open ~/.cyrus/.env
Tell the user:
I've opened
~/.cyrus/.env. You need to paste three values from your Linear app settings page:
- Client ID — copy it and paste after
LINEAR_CLIENT_ID=- Client Secret — click the copy button next to it (it's masked with dots), paste after
LINEAR_CLIENT_SECRET=- Webhook Signing Secret — click the copy button next to it, paste after
LINEAR_WEBHOOK_SECRET=Save and close the file when done.
After the user confirms they've saved:
grep -c '^LINEAR_CLIENT_ID=.' ~/.cyrus/.env
grep -c '^LINEAR_CLIENT_SECRET=.' ~/.cyrus/.env
grep -c '^LINEAR_WEBHOOK_SECRET=.' ~/.cyrus/.env
All three must return 1 (the . after = ensures the value is not empty). If any are 0, ask the user to check the file.
Run the OAuth authorization flow:
cyrus self-auth-linear
This will:
~/.cyrus/config.jsonVerify authorization succeeded:
cat ~/.cyrus/config.json | grep -c '"workspaces"'
If the count is 0, authorization failed. Ask the user to check their credentials and try again.
✓ Linear OAuth application created ✓ Credentials saved to
~/.cyrus/.env✓ Workspace authorized viacyrus self-auth-linear
Configure GitHub for Cyrus — gh CLI login and git config for PRs, with optional webhook setup to enable @mention responses in PR comments, automated rebases and merges, and auto-fixing based on CI failures (coming soon).
Configure Slack integration for Cyrus — create a Slack app from manifest, then guide the user to save credentials.
Orchestrate F1 test drives to validate the Cyrus agent system end-to-end across issue-tracker, EdgeWorker, and activity rendering.
Invoke when dev-testing a Cyrus change that spans CYPACK (edgeworker + CLI) and CYHOST (Vercel-hosted GUI) and the hosted GUI needs to point at an unreleased `cyrus-core` from this repo. Publishes `cyrus-core` (and `claude-runner` if needed) as a `-test.N` prerelease under the npm `test` dist-tag so CYHOST can install it via `cyrus-core@test` without affecting the `latest` dist-tag or shipping a real release.
Print a summary of the Cyrus setup and offer to start the agent.
Run all quality checks (tests, lint, typecheck), fix failures, update the changelog, commit, push, and create/update the pull request or merge request.