Sayr
CLI

CLI

Manage Sayr tasks, comments, and releases from your terminal with the sayr command-line tool

The Sayr CLI (@sayrio/cli, binary sayr) wraps the same personal-access-token API (/v1/me/*) that powers integrations and bots. List, create, and update tasks, manage labels and assignees, post comments, and run your releases (create, update, publish, and manage their labels, status updates, comments, and linked pull requests), all without opening a browser.

Installation

The CLI needs Node.js 18 or newer.

npm install -g @sayrio/cli
sayr --help

Windows users

Running npm install -g @sayrio/cli may appear to succeed, but sayr commands can then fail with errors. The workaround is to run the install command from a terminal with administrator privileges. After that, sayr commands should work in non-admin terminals too.

To try it without a global install, run npx -p @sayrio/cli sayr --help. The package ships two commands, sayr and sayr-local, so npx needs -p to know which one you mean.

Quick start

# 1. Log in with a personal access token (create one under Settings > API keys)
sayr login --token api_xxxxxxxx

# 2. Set a default organization so you can leave out --org
sayr config set-org platform

# 3. See what's on the board
sayr task list --limit 5

# 4. Create a task
sayr task create "Fix the flaky deploy check" --priority high --status todo

# 5. Update it (123 is the task's number: the 123 in SAY-123)
sayr task update 123 --status in-progress

Commands that act on an existing task take its number, the part after the dash in a key like SAY-123. task list prints keys, and task create prints the task's URL, which ends in the number too.

Missing a detail, such as a title or an organization? At a terminal the CLI asks for it instead of failing. See Guided mode.

How permissions work

The CLI can only do what your API key's scopes, and your own role in the organization, allow. A key is a ceiling, never a grant: it can never do more than its owner can, and it can never touch member, team, or billing management, whatever scopes it holds. Give each key only the scopes it needs, and if a command is refused the CLI prints the reason. See Authentication & API keys for the full scope list.

Command groups at a glance

CommandsWhat they doPage
login, logout, whoamiSign in, sign out, and check who you're signed in asAuthentication & API keys
taskCreate, list, view, update, label, and assign tasksTasks
commentRead, post, edit, and delete task commentsComments
releasesCreate, update, publish, and delete releases; their labels, status updates, comments, pull requestsReleases
orgs, labels, categoriesList your organizations, labels, and categories; create labels; choose an organizationOrganizations, labels & categories
Any command with missing inputHave the CLI ask for what you left outGuided mode
--json, --yes, exit codesRun the CLI from scripts, CI, and agentsScripting & automation
configConfig file, profiles, environment variables, precedence, and error codesConfiguration reference

Every command takes --help (for example sayr releases publish --help) to print its full flag list.

On this page