Repository navigation
CLI and doctor
English | 简体中文
This page documents the dsh-chatgpt-siwc command and the siwc_discover tool: what each command does, its flags, and what its output means. Everything here works outside the model-call path, and no command ever prints a token.
This section explains where the command comes from and how to call it.
The package declares one executable, dsh-chatgpt-siwc. After a DSH install it lives in the profile's node_modules, so run it from the profile directory with npx:
cd ~/.dsh/profiles/web # or $DSH_HOME/profiles/<name>
npx dsh-chatgpt-siwc helpEvery command accepts --store <path> to use another accounts file and --lang zh|en (also --lang=zh) to choose the output language. Without --lang, the language follows LC_ALL, then LC_MESSAGES, then LANG; a value starting with zh selects Simplified Chinese, anything else English. Only human-readable lines are translated. JSON, error codes, command names, flags, model slugs, and URLs are printed as-is.
On failure the command prints <CODE>: <message> to standard error and exits with status 1. An unknown command or an invalid --lang value prints the usage and exits 1.
This section is the command reference.
| Command | What it does |
|---|---|
login |
Interactive sign-in (see Sign-in and accounts). Reconnects the active account's registration unless told otherwise. Prints the account's public view and whether plan usage was granted. |
status |
Prints the active account's public view (no tokens) and whether plan usage is granted, or not signed in. Run: dsh-chatgpt-siwc login. |
models |
Fetches the catalog, merges it into the stored one by slug, saves it, and prints one line per visible model: slug, display name, and efforts (comma-separated, or -). Uses the default visibility rules. |
logout |
Revokes the refresh token at OpenAI, then clears the local tokens. Says whether the revocation was confirmed. |
doctor |
Prints token-free JSON diagnostics (below). |
discover |
Prints a token-free readiness summary, or the full JSON report with --json (below). |
help, -h, --help
|
Prints the usage. |
Flags by command:
| Flag | Command | Meaning |
|---|---|---|
--no-browser |
login |
Print the authorization URL instead of opening a browser |
--new |
login |
Register a new app instead of reconnecting the active registration |
--name <agent name> |
login |
App name shown at first registration (default DSH SIWC) |
--client-id <oaiapp_…> |
login |
Reconnect a specific stored registration |
--purge |
logout |
Also delete the account record from the accounts file |
--refresh |
discover |
Fetch the live catalog first (only when signed in with plan access) |
--json |
discover |
Print the full JSON report |
--store <path> |
all | Use this accounts file |
--lang zh|en |
all | Output language |
This section explains the diagnostic report and what to look for in it.
doctor is the first thing to run after any install or update. Its output contains no tokens, ID tokens, emails, or names, and is meant to be pasted into an issue. It does include registration client ids (oaiapp_…), which identify the app registration but are not secrets.
npx dsh-chatgpt-siwc doctor| Field | Meaning |
|---|---|
loaded.version, loaded.root
|
The version and directory of the code that is actually running. If these are not what you installed, another copy is shadowing it. |
node, platform
|
Node version and platform-arch
|
dshHomeEnv |
The value of DSH_HOME, or null
|
store |
Accounts file path, whether it exists, its permission mode, and its age in seconds |
lock |
The same facts for accounts.json.lock. A lock that exists while nothing is running points to a stuck writer. |
hostId |
present or absent (the stable installation id in host.json) |
registrations[] |
Per registration: clientId, active, identityVerified, signedIn, planGranted, scopes, savedAt
|
callback |
127.0.0.1, path /auth/callback, preferred port 1455, and whether that port is free right now |
The card's account controller exposes the same report as its diagnose call.
This section covers the readiness report that both people and DSH agents can read.
npx dsh-chatgpt-siwc discover # summary plus one line per model
npx dsh-chatgpt-siwc discover --refresh # refresh the catalog first
npx dsh-chatgpt-siwc discover --json # full reportThe JSON report has six parts:
| Part | Contents |
|---|---|
plugin |
Name, version, provider route, settings namespace, app name, load directory |
auth |
Signed in, plan granted, host id present, accounts file path, number of accounts, active client id, scopes, saved time. No email or name. |
models |
source (live, cache, or none), count, catalog update time, and per model: slug, display name, context window, efforts, imageInput
|
capabilities |
What the request path does today: storeFalse, stream, the affinity header name (session-id), systemPromptUpdate, encrypted reasoning replay, and the input flags textOnlyInput: false, surfaceImageInput: true, fileInput: false, toolResultAttachmentInput: false
|
diagnostics |
Whether the lock is held, the preferred callback port and whether it is free, DSH_HOME
|
summary |
One-line summaries in English and Chinese |
The input flags are computed from the request mapper's supported input types, so they change automatically when image input is wired through.
Inside DSH the same report is available to agents as the tool siwc_discover, registered when DSH provides a tool service. Its arguments are action (all, status, or models; default all), refresh (default false), and lang (en or zh). A call without refresh: true only reads local state and is marked safe to run concurrently. Programmatic users can import discoverSiwc and createSiwcDiscoveryTool from dsh-chatgpt-siwc/discover.
The CLI discover and the tool apply the default visibility rules; the DSH picker additionally honors includeHiddenModels (see Models and catalog).
dsh-chatgpt-siwc
English
- Home
- Install
- Sign-in and accounts
- Configuration
- Models and catalog
- Prompt cache
- Route and compliance
- Architecture
- CLI and doctor
- Troubleshooting
- FAQ
- Changelog
- Contributing
简体中文