Install and start your first session
This page covers the shortest path to a successful first session. For PATH issues, permission errors, Windows file locks, and other failure cases, see Troubleshoot installation and startup.
Install Mogick
Run the one-liner for your platform:
# Linux
curl -fsSL https://releases.tongyuan.cc/mogick/install.sh | bash# Windows (PowerShell)
iwr https://releases.tongyuan.cc/mogick/install.ps1 -UseBasicParsing | iexVerify the installation with the following command. If you see the version output, the binary and PATH are configured correctly.
mogick version # Display the versionExpected output looks similar to:
mogick version <version>Sign in
Run the following command to sign in via OAuth device code:
mogick setupFollow the prompts:
- The terminal displays an authorization URL and a one-time device code.
- Open the URL, enter the code, sign in, and approve access.
- After authorization succeeds, Mogick writes the credentials to
<config-dir>/auth.json. - Setup adds the official provider and fills missing default/lightweight model settings. It preserves existing providers and explicit model choices, and saves configuration when initialization or missing fields require it.
Authorization time depends on the browser and network. The CLI attempts to refresh expired access tokens; if credentials are revoked or refresh fails, run mogick setup again.
If setup fails, see Troubleshoot authentication.
Start in a project
cd <your-project>
mogickMogick uses the current directory at startup as the workspace. In the TUI, send:
Explain the structure of this project.If you see a model response, file read, or tool result, installation and authentication are working.
You can also use run for a one-shot prompt:
mogick run "Please help me analyze this code"Essential controls
| Operation | Function |
|---|---|
Enter | Send message |
Shift+Enter / Alt+Enter / Ctrl+J | Enter newline; Ctrl+Enter depends on terminal support |
Esc | Request cancellation while running; an active panel handles it first |
Ctrl+C | Press twice to quit; a copyable input selection takes priority |
Shift+Tab | Switch Plan / Agent mode |
Ctrl+P | Open the command palette |
/models | View or switch models |
Continue with the TUI quickstart. You do not need to learn every command or configuration option immediately; use the command-line reference as needed.
To switch accounts, see Sign out and switch accounts. For screenshots and model reasoning levels, see Files and images and Reasoning effort.
Path placeholders <config-dir> and <db-path> refer to the effective profile/channel paths; see Data directories.