System commands
sharge version
Prints the CLI version without login or network access. --json returns data.version. Repeating it is safe.
sharge versionsharge version --jsonsharge login
sharge login [--scope <scope>...] [--force] [--no-browser] [--timeout <duration>] [--json] [--debug]For overseas use, configure https://app.loomos.ai/ before login. A repeated --scope specifies the complete desired set; without it, login requests all current scopes: quick_notes:read, quick_notes:write, calendar:read, calendar:write, voicemaster:read, and ai_daily:read.
--force rotates the key even if the current one is valid. --no-browser prints the complete URL without opening it. --timeout can shorten local waiting but cannot extend server expiry. With --json, stdout holds one final envelope and stderr has JSON Lines events. A valid settings credential covering the target scopes returns data.changed: false; completed authorization returns changed: true, key metadata, and scopes. Login may open a browser, create a server session, rotate a key, and save settings atomically. It has no --input or --dry-run.
See Authentication.
sharge logout
sharge logoutsharge logout --jsonRemoves active and previous cached keys from settings while preserving installation ID, base URL, timezone, and the server-side key. It does not need --yes. JSON reports whether local credentials were removed. If SHARGE_API_KEY remains set, environmentCredentialActive is true and a warning suggests unsetting the variable.
sharge auth status
sharge auth statussharge auth status --jsonUses the selected valid credential for one status request. JSON combines the local credential source, settings path, redacted prefix, base URL/environment, and server identity: user ID, scopes, authentication type, key metadata, installation/client information, expiry, last use, and server time. The complete key is never returned.
sharge auth scopes
sharge auth scopessharge auth scopes --jsonReads the complete scope catalog and current granted status in one request. Business fields remain in their Open API form.
sharge doctor
sharge doctorsharge doctor --jsonsharge doctor --json --debugChecks the CLI and Node versions, settings directory/permissions/schema, base URL, timezone, redacted key source, log writability, Open Platform connectivity, auth status, and scope catalog. It does not log in, rotate credentials, or modify business data. It may safely repair file permissions. JSON returns healthy and named checks with pass/fail status and possible next actions; required failures cause nonzero exit.
sharge config show
sharge config showsharge config show --jsonWorks offline. JSON reports the resolved base URL/source/environment, timezone/source, redacted key source/prefix, settings path, installation ID, previous credential presence/base URL, and log path. It never returns the full key.
sharge config set
sharge config set <base-url|timezone> <value>sharge config set base-url https://app.loomos.ai/sharge config set timezone America/Los_AngelesWorks offline and writes settings atomically. Changing the base URL may restore a cached credential or clear the active one and require login. There is no config set api-key.
sharge config unset
sharge config unset <base-url|timezone>Removing a settings value exposes the environment variable or built-in default. A resulting URL switch follows the same credential cache rules.
sharge logs path
sharge logs pathsharge logs path --jsonWorks offline without login. JSON returns data.filePath, the absolute path to the current log.
sharge logs clear
sharge logs clear --yessharge logs clear --yes --jsonRemoves the current and rotated logs, but never settings. Missing --yes fails locally. JSON reports cleared and removedFiles.