Skip to content

Sharge CLI documentation

sharge is the official command-line client for Sharge Open Platform. It is designed for agents, while keeping login, configuration, and troubleshooting clear for people.

The CLI covers four product areas:

NamespaceProduct
notesAI Live Photo
calendarCalendar
recordingsRecordings
diaryAI Diary

These names describe the products. Executable commands always use the namespaces in the table.

Start here

  • Quick start: install, log in, and read your first data.
  • Agent guide: discover commands, provide input, recover from errors, and execute safely.
  • Authentication: browser login, API keys, scopes, and logout.
  • Configuration: settings, environment variables, base URL, timezone, and logs.
  • JSON contract: envelopes, JSON help, --input, templates, and --jq.
  • Errors and exit codes: stable error types, recovery actions, and unknown outcomes.
  • Downloads: file paths, collisions, overwrites, redirects, and checksums.
  • Command reference: commands, arguments, scopes, schemas, and examples.

Shortest path

Terminal window
# 1. Discover commands
sharge --help
# 2. Select the overseas Open Platform before login
sharge config set base-url https://app.loomos.ai/
# 3. Log in
sharge login
# 4. Check identity
sharge auth status --json
# 5. Read one page of AI Live Photo items
sharge notes list --limit 20 --json

Agents should prefer machine-readable help:

Terminal window
sharge --help --json
sharge notes --help --json
sharge notes list --help --json

Guarantees

  • Text output defaults to Chinese. Structured output requires explicit --json.
  • Text help, JSON help, input schemas, and input templates work offline.
  • Business commands do not log in implicitly or retry requests automatically.
  • List commands read one page per call.
  • Only --input - reads stdin.
  • Write commands support zero-network --dry-run.
  • Delete commands require --yes and do not show an interactive confirmation.
  • JSON success and error responses use stable envelopes.
  • stdout does not mix results with logs, progress, or binary data.
  • API keys cannot be passed as command-line arguments. Local logs are redacted and rotated.

Command overview

sharge
├── login
├── logout
├── version
├── doctor
├── auth status|scopes
├── config show|set|unset
├── logs path|clear
├── notes list|search|get|update|delete|download
├── calendar month|list|search|get|create|update|delete
├── calendar todos set-status
├── recordings list|search|get|download
└── diary list|search|get

The Open API does not support creating AI Live Photo items, so sharge notes create does not exist. The current diary commands expose daily entries only, not weekly or monthly reports.

stdout and stderr

Modestdoutstderr
Plain-text successChinese business resultEmpty
Plain-text failureEmptyChinese error and next action
--json successOne success envelopeEmpty unless --debug is used
--json failureOne error envelopeEmpty unless --debug is used
login --jsonOne final envelopeJSON Lines status events
DownloadPath text or JSON envelopeDebug diagnostics

Example values

Replace placeholder IDs, dates, times, and months with values for your task. lms-REDACTED represents a redacted API key; never put a real key into a command or document.