Skip to main content

Quick start

Set the API key in the environment. This keeps it out of the command line argument list and is the recommended form for an automated caller.

export LINEAR_API_KEY=lin_api_your_key_here

Verify the authenticated viewer:

linear-cli auth whoami

List teams and then read a small issue page:

linear-cli team list --limit 5
linear-cli issue list --team ENG --limit 5
linear-cli issue get ENG-123

Replace ENG and ENG-123 with values from your workspace. A successful command prints JSON like:

{"success":true,"data":[{"id":"...","name":"Engineering","key":"ENG"}],"pagination":{"hasNextPage":false}}

Use --pretty for indented output while investigating a response. The next page cursor, when a command exposes pagination, is in pagination.endCursor.

To avoid repeating a team key for issue and project creation, save it locally:

linear-cli config set default_team ENG
linear-cli issue list --limit 5

Continue with the JSON and command reference or the AI-agent guide.