-
Notifications
You must be signed in to change notification settings - Fork 0
CLI
The CLI is a separate accshift program you run from a terminal instead of the desktop app. It does the same things (list accounts, switch accounts) but from scripts, automation tools, or AI agents. The GUI and the CLI share the same accounts and settings, so changes in one show up in the other.
If you only use the desktop app, you can skip this page.
- Trigger an account switch from a script or a hotkey tool.
- Pull the list of accounts into another program.
- Run accshift on a machine without a GUI session.
Windows (recommended): install the desktop app. The installer places accshift.exe next to the app and adds that folder to your user PATH, so accshift works in any terminal opened after the install. Uninstalling removes the PATH entry again. A standalone accshift-cli_<version>_x64.exe is also attached to each release if you want the CLI without the app; rename it to accshift.exe and put it anywhere on your PATH.
Linux: the deb/rpm packages install the CLI to /usr/bin alongside the app. A standalone accshift-cli_<version>_linux_x86_64 binary is also attached to each release. Building from source (pnpm tauri build) produces target/release/accshift.
macOS: the app bundle ships the CLI inside Accshift.app/Contents/MacOS/accshift. Symlink it onto your PATH:
ln -s "/Applications/Accshift.app/Contents/MacOS/accshift" /usr/local/bin/accshiftA standalone accshift-cli_<version>_macos_aarch64 binary is also attached to each release. Building from source produces target/release/accshift.
If the app's Settings > General > Integrations > CLI toggle is off, every list/switch command exits with code 7 and cli_disabled. Turn the toggle back on in the app to re-enable it.
accshift platforms # list platforms this build supports
accshift list <platform> # list accounts for a platform
accshift list <platform> --folder <name> # filter by folder
accshift switch <platform> <account-id> # sign in as that account<platform> is one of the names printed by accshift platforms (for example steam, riot, epic).
--online | --invisible # Steam start mode
--graceful | --force # shutdown mode
--admin | --no-admin # relaunch with admin rights
--launch-options "<string>" # Steam launch optionsIf you do not pass a flag, the CLI falls back to whatever you set in the GUI for that option. Pass --launch-options "" if you want to override the GUI value with an empty string for one run.
The CLI auto-picks the format:
- Running in a terminal: a readable table.
- Output piped into another program or a file: a JSON envelope.
You can force JSON anywhere with --json. Errors always go to stderr, so the stdout stream stays clean for scripts.
{
"schema": "accshift.v1",
"ok": true,
"command": "list",
"data": {
"platform": "steam",
"folder": null,
"accounts": [],
"current": null
}
}{
"schema": "accshift.v1",
"ok": false,
"command": "switch",
"error": {
"code": "lock_contended",
"message": "Another accshift instance is running. Retry once it finishes, or close the GUI."
}
}The CLI sets a non-zero exit code on failure so scripts can branch on it:
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Generic error |
| 2 | Platform not available on this OS or build |
| 3 | Unknown account |
| 4 | Another accshift process is already busy (see "Concurrency" below) |
| 5 | I/O error (paths, permissions) |
| 6 | PIN missing, unavailable, or incorrect |
| 7 | CLI disabled in Settings |
List Steam accounts as a table:
$ accshift list steam
ACCOUNT NAME STEAM ID
* alice Alice 76561198000000001
bob Bob the Builder 76561198000000002
carol carol_gg 76561198000000003
3 accounts. * = currently signed in
Switch to an account with Steam-specific overrides:
accshift switch steam bob --invisible --force --launch-options "-tcp -no-cef-sandbox"Get strict JSON for a script:
accshift --json list steam | jq '.data.accounts[].account_name'You can have the GUI and the CLI running at the same time. To stop them from stepping on each other, mutating commands (such as switch) take a short-lived lock. If another instance is already mid-operation, the second one exits with code 4 after a 2-second wait. Try again once the first one finishes.
--folder <name> matches the folder name as shown in the GUI sidebar. Matching is case-insensitive and includes nested subfolders. Without the flag, all accounts are listed.
The CLI does not change GUI settings. For per-platform paths, API keys, or other options, set them once in the desktop app; the CLI picks them up automatically.
The desktop app also registers the accshift:// URL scheme, which covers the same scripting use case without a terminal:
accshift://switch/<platform>/<account>
<account> matches the account id first, then a unique username, then a unique
display name (case-insensitive). Ambiguous labels are rejected instead of
selecting an arbitrary account. Examples:
accshift://switch/steam/76561198000000002
accshift://switch/steam/bob
accshift://switch/riot/main%20smurf
Open one of these from a browser, a Stream Deck "Website" action, AutoHotkey's Run, or start / xdg-open in a script, and the app switches to that account (launching the app first if it is not running). URL-encode special characters (%20 for spaces).
Differences from the CLI:
- The deep link drives the GUI, so you get the same toasts and visual feedback as a manual switch.
- No output or exit code; for scripts that need to check the result, use the CLI.
- Can be turned off in Settings > General > Integrations.
- Links are ignored while the app is PIN-locked.
The installer or app bundle registers the scheme. On Windows and Linux the app
also attempts current-user registration on startup, which covers development
and portable builds. macOS registration comes from the bundle's Info.plist.