<!-- https://zerolog.ch/docs/zerocode · Docs / Connect -->
# ZeroLog Code

Use ZeroLog from a terminal to work with your account, workspace files and models.

ZeroLog Code is based on OpenCode and connects the terminal client to your ZeroLog account.

Install ZeroLog Code, then run `zerolog login` and follow the pairing steps in your browser. Once connected, you can work with files in your workspace and use supported models from the terminal.

Install via shell script on Linux and macOS:

```
curl -fsSL https://zerolog.ch/zc/install.sh | sh
```

Or on Windows PowerShell:

```
irm https://zerolog.ch/zc/install.ps1 | iex
```

## Anonymous error reports

Versions of ZeroLog Code that include anonymous error reporting send a report when the client crashes or encounters an error during sign-in, connection or workspace sync. Reports include technical details about the failure and leave out email addresses, IP addresses, account credentials, local home-folder paths and exception messages.

To turn reporting off, set any one of these environment variables before starting ZeroLog Code: `ZEROLOG_TELEMETRIE=0`, `ZEROCODE_TELEMETRIE=0` or `DO_NOT_TRACK=1`.

| Feature | How it works |
| --- | --- |
| Device pairing | Run `zerolog login` and complete the pairing steps in your browser. |
| Workspace synchronization | Sync local changes with your workspace. If a transfer is interrupted, check the sync result and run it again for files that did not finish. |
| Session history | The session history is written to a chat on zerolog.ch, so you can read it there. The agent loop itself runs on your machine; closing the terminal ends the run. |
| Settings | Under Settings, ZeroLog Code you can set the default model for new sessions, switch container sync on or off by default and pick the default target container. The same screen lists your connected devices and lets you revoke access for one. |
| Usage | Runs using ZeroLog models follow your account limits and appear with your other usage. |

ZeroLog Code also supports Android Termux. For the Android app with phone-control features, see the [Android app guide](https://zerolog.ch/docs/app).

## From install to a running session

Mermaid source of the diagram on this page:

```mermaid
%% ZeroLog Code: pairing, local run, what reaches your account. Facts from server/anthropic-shim.js (/cli/v1/*), auth.js pairing, settings/zerocode-panel.tsx.
flowchart TB
  i["1. Install ZeroLog Code"]
  l["2. zerolog login prints<br/>a pairing link"]
  ap["3. You approve the link in your<br/>signed-in browser. The device<br/>gets a token"]
  r["4. Agent loop runs on your machine.<br/>Local tools stay local"]:::hot

  subgraph ZL["Through your ZeroLog account"]
    m["Models: limits and<br/>usage as usual"]
    s["Workspace sync to a<br/>container, if switched on"]
    h["Session history<br/>shows up as a chat"]
  end

  i --> l --> ap --> r
  r --> m
  r --> s
  r --> h

  classDef hot stroke:#8f7ac9
```
