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"
Update an installed CLI with:Understand the authentication contexts#
Sharkly uses separate credentials for separate purposes.| Context | Credential | Command | Purpose |
|---|
| Human CLI access | Personal access token beginning with shk_ | sharkly login --token | Authenticates organization and resource commands in the selected profile. |
| Computer registration | One-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 execution | Scoped execution credential supplied by Sharkly | No manual login | Lets an active Agent run call the command families allowed for its execution context. |
| Local inspection | Local configuration, health endpoint, or log files | Commands such as sharkly config show, sharkly computer status, and sharkly computer logs | Reads 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#
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