@sokko/cli
v0.1.2
Published
πͺ The Sokko CLI β migrate your local agent setup (secrets, memory, files) into a Sokko-hosted runtime.
Maintainers
Readme
πͺ sokko
The Sokko CLI. Bring your local agent setup β secrets, memory, and config/workspace files β into a Sokko-hosted runtime in one command.
πͺ sokko migrate
π₯ secrets 12 vars from .env
π§ memory 8 items
π¦ files 34 files Β· 1.2 MB
β
your agent is fully bakedInstall
npm i -g sokko
# or run without installing
npx sokko --helpRequires Node 18+.
Quick start
sokko login # paste your API key (or --key / $SOKKO_API_KEY)
sokko instances ls # see your agents
sokko migrate # pick an agent (or create one) and migrate your local dirAuth & config
Credentials are stored at ~/.config/sokko/config.json (respects $XDG_CONFIG_HOME),
mode 0600, shape { apiUrl, apiKey }.
apiUrldefaults tohttps://sokko.ai; override with--api-urlor$SOKKO_API_URL.apiKeyfrom--keyor$SOKKO_API_KEYoverrides the stored value.
Every request sends Authorization: Bearer <apiKey> (and x-api-key).
Commands
| Command | What it does |
| --- | --- |
| sokko login | Validate and store an API key. |
| sokko logout | Remove stored credentials. |
| sokko whoami | Show the signed-in org and role. |
| sokko instances ls | List your agents (name Β· runtime Β· status Β· size). |
| sokko instances create | Create a new agent (interactive). |
| sokko migrate | Migrate a local agent dir into an instance. |
sokko instances create
sokko instances create [--runtime <r>] [--name <n>] [--byok | --sokko-credits]
[--provider <p>] [--model <id>] [--api-key <k>]
[--region us|eu] [--memory] [--subscribe-memory monthly|annual] [--yes]- Runtime:
openclaw|hermes|paperclip|opensre. - Name β an auto-derived, server-valid slug (
^[a-z0-9]+(?:-[a-z0-9]+)*$). - Credentials:
- BYOK (
--byok): requires--api-keyand--provider(e.g.anthropic,openai,openrouter). - Sokko credits (
--sokko-credits): Sokko-managed model β requires--model.
- BYOK (
- Size is plan-derived (the server ignores any size in the body). The CLI shows it read-only after creation; change tiers in the dashboard.
--memoryenables the Sokko Memory add-on (paid; may prompt an upsell if not subscribed).
sokko migrate
sokko migrate [--instance <id>] [--runtime <r>] [--path <dir>] [--dry-run] [--yes]
[--on-conflict skip|replace] [--only secrets,memory,files] [--create]
[--subscribe-memory monthly|annual]- Resolve-or-create the target. Without
--instance, pick from a list (plusβ Create a new agentβ¦);--createor no agents β create flow. - Detect the local dir for the instance's runtime:
openclaw β ~/.openclaw,hermes β ~/.hermes,paperclip β ~/.paperclip,opensre β ~/.opensre. Override with--path. (These default paths are best-guess β confirm against each runtime's own docs.) - Three lanes:
- π₯ secrets β the root
.envβ secrets import (default--on-conflict skip). - π§ memory β
MEMORY.md/USER.md/IDENTITY.mdand everything undermemory/β Sokko Memory. - π¦ files β everything else β a tar.gz bundle uploaded to object storage.
- π₯ secrets β the root
- Ignore rules (files lane only): skips
*.pem,*.key,id_rsa*,*token*,*secret*,.git/,node_modules/, caches, and oversized files. Honors a.sokkoignore(gitignore syntax) at the dir root..envis never ignored. --dry-runpreviews counts and the file manifest with zero network writes.
Memory upsell
If you have memory files but no Sokko Memory add-on, migrate pitches it rather than
silently skipping. Enabling it is cost-incurring, so it always needs an explicit
confirm (or --subscribe-memory monthly|annual) β never auto-accepted by --yes. If
you're not an owner or have no base plan, the CLI prints a dashboard link and continues,
reporting memory as skipped.
CI / non-interactive
Honors NO_COLOR and non-TTY, degrading to plain logs. For unattended runs pass
--yes --instance <id> (and --key / $SOKKO_API_KEY).
Develop
pnpm install # inside cli/
pnpm run build # bundles to dist/cli.js
pnpm test # vitest
pnpm typecheck # tsc --noEmit
node dist/cli.js --help