Skip to content

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:

bash
# Linux
curl -fsSL https://releases.tongyuan.cc/mogick/install.sh | bash
powershell
# Windows (PowerShell)
iwr https://releases.tongyuan.cc/mogick/install.ps1 -UseBasicParsing | iex

Verify the installation with the following command. If you see the version output, the binary and PATH are configured correctly.

bash
mogick version      # Display the version

Expected output looks similar to:

mogick version  <version>

Sign in ​

Run the following command to sign in via OAuth device code:

bash
mogick setup

Follow the prompts:

  1. The terminal displays an authorization URL and a one-time device code.
  2. Open the URL, enter the code, sign in, and approve access.
  3. After authorization succeeds, Mogick writes the credentials to <config-dir>/auth.json.
  4. 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 ​

bash
cd <your-project>
mogick

Mogick uses the current directory at startup as the workspace. In the TUI, send:

text
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:

bash
mogick run "Please help me analyze this code"

Essential controls ​

OperationFunction
EnterSend message
Shift+Enter / Alt+Enter / Ctrl+JEnter newline; Ctrl+Enter depends on terminal support
EscRequest cancellation while running; an active panel handles it first
Ctrl+CPress twice to quit; a copyable input selection takes priority
Shift+TabSwitch Plan / Agent mode
Ctrl+POpen the command palette
/modelsView 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.