Official command-line interface for the Operately external API.
npm install -g @operately/operately-cliThe package installs two equivalent binaries:
operatelyop
Verify the installed version:
operately --version
# or
operately versionnpm update -g @operately/operately-cliOr:
npm install -g @operately/operately-cli@latest# Save a token to the default profile
operately auth login --token <your-token>
# Verify authentication
operately auth whoami
# Explore the CLI
operately --help
operately projects --help
operately projects create --help
# Run API commands
operately people get_me
operately spaces list
operately companies get_work_mapThe current bundled API catalog exposes 243 endpoint commands across 11 namespaces:
commentscompaniesdocumentsgoalsnotificationspeopleproject_templatesprojectsreactionsspacestasks
All API endpoint commands in the current catalog are namespaced. There are no root API commands such as operately get_me.
API endpoint commands use this shape:
operately <namespace> <command> [flags]Examples:
operately people get_me
operately projects list --include-space
operately projects get --id p1 --include-space
operately tasks list --project-id p1Utility commands are separate from API endpoints:
operately auth <login|signup|join|create-company|profiles|status|whoami|logout> [flags]
operately --version
operately help [namespace] [command]# General help
operately --help
operately help
# Namespace help
operately projects --help
operately help projects
# Command help
operately projects create --help
operately help projects create
# Auth help
operately auth --help
operately help auth loginThe CLI resolves credentials in this order:
- Per-command flags
- Environment variables
- Saved profile values
operately auth login --token <token>
operately auth status
operately auth whoamiProfiles are stored in ~/.operately/config.json.
Use --base-url when talking to a non-default environment:
# Production
operately auth login --token op_live_xxx
# Staging
operately auth login --token op_staging_xxx --profile staging --base-url https://staging.operately.com
# Local development
operately auth login --token op_local_xxx --profile local --base-url http://localhost:4000If no base URL is configured, the CLI defaults to:
https://app.operately.com
export OPERATELY_API_TOKEN=op_live_xxx
export OPERATELY_BASE_URL=https://app.operately.com
export OPERATELY_PROFILE=default
operately people get_meoperately people get_me --token <token>
operately people get_me --profile staging
operately people get_me --base-url https://staging.operately.comFlags map from API field names to kebab-case:
# project_id -> --project-id
operately projects update_name --project-id p1 --name "New Name"Booleans:
operately projects get --id p1 --include-space
operately projects get --id p1 --include-space=trueNulls:
operately goals update_due_date --goal-id g1 --due-date nullArrays:
operately notifications mark_many_as_read --ids n1 --ids n2Repeated flags are the canonical form. For compatibility with scripts and agents, list flags also accept a JSON array string:
operately notifications mark_many_as_read --ids '["n1","n2"]'Nested objects and lists use dot-index notation:
operately projects update_task_statuses \
--project-id p1 \
--task-statuses.0.id todo \
--task-statuses.0.label "To Do" \
--task-statuses.0.color gray \
--task-statuses.0.index 0 \
--task-statuses.0.value todo \
--task-statuses.0.closed false \
--task-statuses.1.id done \
--task-statuses.1.label "Done" \
--task-statuses.1.color green \
--task-statuses.1.index 1 \
--task-statuses.1.value done \
--task-statuses.1.closed trueMany fields shown as <markdown> in --help accept markdown text directly:
operately documents create_document \
--space-id s1 \
--name "Guide" \
--content "# Getting Started\n\nWelcome to the team."Prefer --<field>-file for multiline markdown content:
operately documents create_document \
--space-id s1 \
--name "Guide" \
--content-file ./guide.mdThe same markdown fields also accept a file path via --<field>-file:
operately projects update_description \
--project-id p1 \
--description-file ./roadmap.mdMarkdown files can contain GitHub-style pipe tables:
| Milestone | Status |
| --- | --- |
| **Launch** | Ready |
| Review | First pass<br>Final pass |Use the same --content-file or --description-file flags. Tables support inline formatting,
links, escaped pipes (\|), and <br> cell breaks. Short rows are padded; excess cells cause
an input error. Alignment markers are accepted but not stored. Exporting a headerless web
table adds an empty header row, which remains when imported. Mentions retain their @label
text; Markdown does not carry person IDs. Images in cells become links with their labels.
Table input requires CLI 1.10.0 or later.
Contextual dates let you pass either an exact day or a broader period.
For year, quarter, and month values, the CLI resolves the value to a real date:
- no suffix: use the end of the period
^: use the start of the periodnull: clear the date
Examples:
2026-06-30-> exact day2026-> December 31, 20262026^-> January 1, 20262026/q2-> June 30, 20262026/q2^-> April 1, 20262026/06-> June 30, 20262026/06^-> June 1, 2026
Example command:
operately tasks create \
--type project \
--id p1 \
--name "Design mockups" \
--assignee-ids person1 \
--assignee-ids person2 \
--due-date 2026-06-30For API endpoint commands:
# Pretty JSON (default)
operately people get_me
# Pretty JSON (explicit alias)
operately people get_me --json
# Compact JSON
operately people get_me --compact
# Write JSON to a file
operately projects get --id p1 --output ./project.json
# Print request details while executing
operately people get_me --verbose# People
operately people get_me
# Companies
operately companies get_work_map
# Spaces
operately spaces list --include-members
operately spaces create --name "Engineering" --mission "Build great products" --company-permissions 10 --public-permissions 0
# Projects
operately projects list --include-space --include-milestones
operately projects get --id p1 --include-space
operately projects create \
--space-id s1 \
--name "Q2 Product Roadmap" \
--anonymous-access-level 0 \
--company-access-level 10 \
--space-access-level 70
# Goals
operately goals list
operately goals create \
--space-id s1 \
--name "Revenue Goal" \
--anonymous-access-level 0 \
--company-access-level 10 \
--space-access-level 70
# Tasks
operately tasks list --project-id p1
operately tasks create \
--type project \
--id p1 \
--name "Design mockups" \
--assignee-ids person1 \
--assignee-ids person2 \
--due-date 2026-06-30
# Docs & Files
operately documents list_contents --space-id s1
operately documents create_document --space-id s1 --name "Guide" --content "# Guide"
operately documents create_link --space-id s1 --name "Handbook" --url "https://example.com" --type other
operately documents create_file --space-id s1 --file ./report.pdfDocs & Files commands scope a hub with exactly one of --space-id, --project-id, or --goal-id. For folder listing, --folder-id alone is enough.
Many create and update commands have additional required fields. Use --help on the specific command before scripting it.
0- Success1-auth logouthad nothing to clear for the selected profile2- CLI usage, validation, or help error3- Missing authentication token/config4- API 4xx error, including authentication failures5- API 5xx, network, or fatal error
For the full generated command list, see docs/commands.md.
Generate an API token in Operately, then use it with:
operately auth login --token <your-token>Apache-2.0
