---
url: https://docs.mochiexec.io/reference/cli/mochi_sync.md
description: Refresh workspace cache and discover new executables.
---

# mochi sync

Refresh workspace cache and discover new executables.

## Synopsis

Refresh the workspace cache and discover new executables. Use --git to also pull latest changes for all git-sourced workspaces before syncing. Use --force with --git to discard local changes and hard reset to the remote.

```shell
mochi sync [flags]
```

## Examples

```shell
mochi sync               # rescan all workspaces for new executables
mochi sync --git         # pull all git-sourced workspaces, then rescan
mochi sync --git --force # hard-reset git workspaces before rescan
```

## Options

| Flag | Type | Description |
|------|------|-------------|
| `--force` |  | Force update by discarding local changes (hard reset to remote) |
| `-g, --git` |  | Pull latest changes for all git-sourced workspaces before syncing |
| `-h, --help` |  | help for sync |
| `-o, --output` | `string` | Output format. One of: yaml, json, or tui. |

## Options inherited from parent commands

| Flag | Type | Description |
|------|------|-------------|
| `-L, --log-level` | `string` | Log verbosity level (debug, info, fatal) (default "info") |
| `--sync` |  | Sync flow cache and workspaces |

## See also

* [mochi](mochi.md) — Run and organize your development tasks
