Overview
The Corelayer CLI gives you terminal access to Corelayer groups, issues, and integrations. Sign in from your browser, then use Corelayer from the terminal. If your organization uses a dedicated Corelayer deployment, the CLI connects to the right server automatically.Prerequisites
- Node.js 18+
- npm
- A Corelayer account with access to at least one organization
Install
Authenticate
Browser Login
- Opens the Corelayer app in your browser
- Asks you to authorize CLI access for your current organization
- Redirects back to a temporary localhost callback used by the CLI
- Stores your API key and server URL in
~/.corelayer/config.json
Manual Login
Use manual login when the browser cannot open, the localhost callback is blocked, or you already have an auth code.Common Commands
Discover Groups
Set a Default Group
If you work in one group frequently, set it once:List Issues
default-group, you can omit --group.
Inspect One Issue
Summarize Issues for a Group
Manage Issue State
List Integrations
Inspect CLI Config
Logout
Global Flags
The CLI supports these global flags:--jsonfor machine-readable output--quietor-qto suppress success messages--api-url <url>to override the configured API server--no-colorto disable ANSI color output
Dedicated Deployments
For browser login, you do not need to manually choose the API server. Corelayer returns the correctserver_url during authorization and the CLI stores it in ~/.corelayer/config.json.
Use --api-url only when:
- you are doing manual login with an auth code
- you are testing against a local or non-default environment
- you explicitly want to override the stored server URL for one command
Using the CLI with AI Agents
The best pattern is:- Install the CLI once
- Run
corelayer login - Prefer
--jsonwhen an agent needs to read the output - Set
default-groupif the agent will make repeated issue or integration calls
agents/corelayer-cli.md.
Command Types
Agents should treat CLI commands in three categories:1. Read-Only Commands
These are safe to use for discovery, triage, and reporting:corelayer groups listcorelayer issues listcorelayer issues getcorelayer issues summarycorelayer integrations listcorelayer config get
- Prefer
--jsonwhen an agent needs to reason over the output - Use
corelayer groups list --jsonfirst if the correct group is not known - Set
default-groupbefore repeated issue or integration reads
2. Local State Commands
These change the local CLI session or local config, not Corelayer data on the server:corelayer logincorelayer logoutcorelayer config set default-group <group-id>corelayer config set api-url <url>
corelayer loginis fine when the user is actively trying to authenticate- use
corelayer config set default-groupwhen the user will run repeated commands against the same group - avoid changing
api-urlunless the user explicitly wants a different environment - avoid
logoutunless the user asks for it or the workflow clearly requires resetting auth
3. Write and Update Commands
These change data or issue state on the Corelayer server and should be used carefully:corelayer issues close <issue-id> --feedback "..."corelayer issues reopen <issue-id>corelayer issues delete <issue-id> --yes
- ask for explicit approval before running any of these commands
- include a short, accurate reason when closing an issue
- prefer
closeorreopenoverdelete - only use
delete --yeswhen the user has clearly requested deletion - if the user is unsure, show the issue first with
corelayer issues get <issue-id> --json
Recommended Agent Workflows
Investigate issues in one group
Review integrations for a group
Summarize current issue health
Troubleshooting
Browser Login Does Not Open
Copy the URL printed bycorelayer login and open it manually in your browser.
Callback Fails on 127.0.0.1
Use manual login:
Wrong Organization or Server
Log in again while the correct organization is active in the Corelayer app. The browser flow will return the correct server URL for that organization.API Calls Fail After Switching Environments
Check the stored API server:- run
corelayer loginagain - or override the server for a command with
--api-url <url>

