1. cli
Sharkly docs
  • Welcome to Sharkly
  • Quickstart
  • agent-and-computer
    • Agents
    • Chat with an Agent
    • Agent task execution
    • Comments and replies
    • Inbox
    • Repositories
    • Skills
    • Crews
    • Computers
  • task
    • Task types
    • Task statuses
    • Task relations
    • Task labels
    • Task subscriptions
  • integration
    • Jira integration
    • Slack integration
  • space
    • Spaces
    • People
    • Tasks
    • Projects
    • Automations
    • Views
    • Sprints
  • cli
    • Sharkly CLI
    • Personal access tokens
  1. cli

Sharkly CLI

The Sharkly CLI lets people, agents, and scripts work with Sharkly from a terminal. Use it to manage organization resources, register a computer for agent execution, inspect the local service, and automate repeatable workflows.

Install the CLI#

On macOS or Linux, run the official installer:
On Windows, run the official PowerShell installer:
powershell -NoProfile -ExecutionPolicy Bypass -Command "`$p = Join-Path `$env:TEMP 'sharkly_install.ps1'; Invoke-WebRequest 'https://file-assets.sharkly.ai/download/install.ps1' -UseBasicParsing -OutFile `$p; & `$p"
Verify the installation:
Update an installed CLI with:

Understand the authentication contexts#

Sharkly uses separate credentials for separate purposes.
ContextCredentialCommandPurpose
Human CLI accessPersonal access token beginning with shk_sharkly login --tokenAuthenticates organization and resource commands in the selected profile.
Computer registrationOne-time install token beginning with sit_sharkly computer register --install-token sit_...Registers a computer and creates the independent session used by the local service.
Agent executionScoped execution credential supplied by SharklyNo manual loginLets an active Agent run call the command families allowed for its execution context.
Local inspectionLocal configuration, health endpoint, or log filesCommands such as sharkly config show, sharkly computer status, and sharkly computer logsReads local state without turning a personal access token into a local-service identity.
A personal access token does not register a computer. An install token does not create a human CLI login. Keep these paths separate when diagnosing authentication or local-service problems.

Log in for human CLI access#

Create a personal access token in Settings → Personal access tokens, then use the prompt-based login flow:
The CLI validates the token, saves it in the current profile, discovers the organizations available to the user, and sets a default organization when the profile does not already have one.
Check the current profile's authentication:
Remove the saved token from the current profile:
auth logout changes only local profile state. It does not revoke the token on the server. See Personal access tokens for creation, safe storage, rotation, and revocation.

Register a computer and use the local service#

The Computers screen provides a registration command containing a one-time sit_ install token. The token expires after 30 minutes and cannot be reused.
Registration writes the independent local-service session and normally restarts the local service. It does not use or modify the personal access token stored in a human profile.
Use the user-facing computer commands for routine checks:
The daemon namespace exposes advanced local-service process operations:
daemon cleanup is a dry run unless --confirm is present. Prefer computer status and computer logs for routine diagnosis; use daemon when you specifically need process lifecycle, disk reporting, or cleanup controls.

Configure endpoints and organization context#

The Sharkly cloud defaults are:
App: https://app.sharkly.ai
API: https://api.sharkly.ai
Inspect the active profile configuration:
The supported configuration keys are case-sensitive camelCase values:
For a one-off command, prefer explicit global flags instead of changing saved state:

Use profiles correctly#

A profile isolates human CLI configuration, including the saved personal access token, endpoint settings, and default organization.
Each Sharkly product and release channel has one local-service lifecycle. Named human profiles do not create additional local-service instances, and explicit --profile selection is not supported for local-service lifecycle, status, or log commands.

Select an organization#

List organizations available to the authenticated user:
Set the current profile's default organization by ID, slug, or accepted ID prefix:
For scripts, prefer --organization-id so the target is visible in the command and does not depend on saved profile state.

Use structured output in scripts#

List commands usually default to tables. Detail and mutation commands often default to JSON, but scripts should request JSON explicitly instead of depending on a default.
Useful global controls include:
--color never to disable color.
--quiet to suppress non-error status text.
--debug to add diagnostics on standard error.
For robust shell scripts, use strict error handling and preserve pipeline failures:
CLI exit status is 0 for success, 1 for command, validation, authentication, or remote API errors, and 2 for transient local-service or network conditions.

Handle multiline content safely#

Use files or standard input for multiline text, non-ASCII text, or content where backslashes must be preserved.
The short --body form decodes supported escape sequences. Prefer --body-file or --body-stdin when exact content matters.

High-value resource commands#

Tasks and comments#

Agent runs#

Use run log --since when polling so the script retrieves only messages after the last processed sequence.

Projects, Agents, Skills, and automations#

Computers and runtimes#

Discover the installed command contract#

Use runtime help for the exact flags supported by the installed version:
The CLI also exposes its registry and curated scenarios:
Modified at 2026-08-04 04:02:55
Previous
Sprints
Next
Personal access tokens
Built with