# Sign in and sync

Everything in Dryv works without an account. Sign in when you want to:

- sync a project's [tasks](/docs/guides/tasks) to your account and see them in the web app;
- [publish packs](/docs/guides/publishing) or use private packs;
- use the [Playground](/docs/guides/playground);
- connect an [MCP client](/docs/guides/mcp);
- download or export your data.

## Sign in from the CLI

```bash
dryv login
```

The CLI prints a link and a code, and opens your browser. Sign in at [app.dryvcode.com](https://app.dryvcode.com) and approve the code. The CLI waits until you approve.

Check who you are signed in as:

```bash
dryv whoami
```

Sign out, which also revokes the session:

```bash
dryv logout
```

`dryv login`, `logout` and `whoami` use the Dryv Platform API at `https://api.dryvcode.com`. To use another Platform address, pass `--platform <url>` or set `DRYV_PLATFORM_URL`.

The session is stored in your operating system's keychain. Where no keychain is available, the CLI stores it in `~/.config/dryv/platform-session.json`, readable only by you, and tells you so. The CLI hands the session to the [local daemon](/docs/guides/local-daemon#signing-in-and-the-daemon), which keeps it in memory only.

Login options: `--platform <url>`, `--json`, `--events` (print the device code as JSON on standard error, for tools). `--no-input` makes login fail at once, because it always needs a browser approval.

## Turn on task sync

Sync is off for every project until you turn it on.

```bash
dryv login
dryv task sync enable
```

Dryv asks before it uploads anything. In scripts, pass `--yes`. Turning sync on:

1. Creates a task workspace in your account, or links to one you name.
2. Uploads the task workspace and the registered documents.
3. Keeps watching the files and syncs changes a few seconds after you stop editing.

Only [registered files](/docs/guides/tasks#the-registry) are uploaded. Secret-looking files, hidden files and files over 1 MB never are.

Options for `enable`:

| Option | Meaning |
| --- | --- |
| `--workspace-id <id>` | Link to an existing task workspace, for example one you created on another computer. |
| `--project-key <key>` | The key for a new task workspace. Defaults to the folder name. |
| `--name <name>` | The display name for a new task workspace. Defaults to the folder name. |
| `--yes` | Confirm the upload without a prompt. |

## Check and control sync

```bash
dryv task sync status     # on or off, state, workspace id, last sync, conflicts
dryv task sync now        # sync immediately
dryv task sync disable    # stop syncing this project
```

`status` shows one of `disabled`, `idle`, `syncing`, `offline` or `error`.

## Use the same tasks on another computer

1. On the first computer, run `dryv task sync status` and copy the workspace id.
2. On the second computer, clone the project, sign in, and run:

   ```bash
   dryv task sync enable --workspace-id <id>
   ```

Both computers should use the same `tasks:` settings, so commit `dryv.yaml`.

## Conflicts

If a file changed differently on two devices, Dryv keeps your local version and saves the other one next to it as `<name>.conflict-<device>.md`. `dryv task sync status` counts them. Merge the content by hand and delete the conflict copy.

A file you edit while a download is being applied is never overwritten. The incoming version becomes a conflict copy instead.

## Offline

When the network is down, changes queue up and Dryv retries with a growing delay, up to five minutes. When the daemon restarts, it resumes syncing every project that had sync on.

## See your tasks on the web

Open [app.dryvcode.com/tasks](https://app.dryvcode.com/tasks). Task workspaces are listed by organization. You can also open one by id. Each task shows its status, checklist, linked files and comments.

The mobile app is coming soon.

## Troubleshooting

**"Not signed in" or `sync enable` fails.** Run `dryv login`, then `dryv local link status` to check the daemon holds your session. If you restarted the daemon, run any `dryv` command once so the CLI hands the session over again.

**`dryv login` cannot connect.** Check your network. If you set `DRYV_PLATFORM_URL` or `--platform`, check that the address is right, or unset it to use `https://api.dryvcode.com`.

**State is `error`.** Run `dryv task sync status` to read the last error. Errors that retrying cannot fix, such as an archive over 25 MB or a revoked session, are not retried. Fix the cause, then run `dryv task sync now`.

**A file is missing on the other device.** It may not be registered. Run `dryv task registry` on both devices and compare.
