@sharge/cli
v0.1.1
Published
`sharge` is the CLI for the Sharge open platform.
Readme
sharge
sharge is the CLI for the Sharge open platform.
It is built for agent and automation workflows: stable output envelopes, explicit exit codes, no interactive prompts, and a machine-readable schema registry.
Install the CLI
Install the npm package globally:
npm install -g @sharge/cliThen confirm the binary is available:
sharge versionInstall the skills
Install the Sharge skills package with:
npx skills add sharge/cliThis adds the sharge skills so an agent can discover the CLI usage patterns for core commands, notes, and calendar workflows.
Authentication
Set your API key before running commands:
export SHARGE_API_KEY="lms-..."You can also pass credentials explicitly with --api-key.
Quick start
sharge auth status --output json
sharge doctor --output json
sharge schema --output json
sharge notes list --limit 10 --output json
sharge calendar months --year 2026 --month 4 --output jsonCLI overview
Current command groups:
sharge versionsharge auth statussharge doctorsharge schema [command]sharge notes list|get|create|update|deletesharge calendar monthssharge calendar events list|create|update|delete
Useful global flags:
--api-key <key>: overrideSHARGE_API_KEY--base-url <url>: override the API base URL--timeout <duration>: request timeout such as30s--retry auto|off: retry policy--debug: write debug logs tostderr--dry-run: preview write commands without sending the request--timezone <tz>: timezone for time-sensitive requests--fields <fields>: select a subset of returned fields--params <json>: pass inline JSON,@file, or-for stdin-o, --output json|ndjson|text: choose output format
Notes examples
sharge notes list --search meeting --fields id,content --output json
sharge notes get 123 --output json
sharge notes create --content "Buy milk" --dry-run --output json
sharge notes update 123 --content "Updated text" --output json
sharge notes delete 123 --dry-run --output jsonCalendar examples
sharge calendar months --year 2026 --month 4 --timezone Asia/Shanghai --output json
sharge calendar events list --start 2026-04-20T00:00:00+08:00 --end 2026-04-20T23:59:59+08:00 --output json
sharge calendar events create --title Standup --start 2026-04-20T09:00:00+08:00 --rrule 'FREQ=DAILY;COUNT=5' --output json
sharge calendar events update 42 --action instance --instance-id u_123_1713574800 --title "Shifted standup" --output json
sharge calendar events delete 42 --scope future --instance-id u_123_1713574800 --dry-run --output jsonOutput model
sharge writes command results to stdout.
- On a TTY, the default format is
text - Outside a TTY, the default format is
json - Use
--outputto forcejson,ndjson, ortext
Successful responses return structured data. Failed responses return a structured error with an exit code suitable for automation.
Exit codes
0: success1: unknown error2: invalid input or unsupported invocation3: not found4: unauthorized or permission denied5: conflict6: rate limited7: timeout or network failure8: server error
