---
url: https://docs.mochiexec.io/guides/search-and-favorites.md
description: >-
  Find any executable across every workspace with usage-ranked search, star the
  ones you use most, and see run statistics per workspace.
---

# Search, Favorites & Stats

Mochi learns what you actually run. Search ranks by it, favorites pin it, and stats show
it back to you.

## Search

```sh
mochi search            # your favorites and most recent executables
mochi search deploy     # ranked matches across every workspace
```

Results are ranked by how well the name matches, whether it's a favorite, and how often
and how recently it has run. The desktop's `⌘K` palette uses the same search.

| Flag | Effect |
|---|---|
| `-n, --limit` | Maximum results (default 20) |
| `-o json` | Machine-readable output |

## Favorites

Favorites sort first and show up on the desktop home screen. They're shared between the CLI
and the desktop app.

```sh
mochi favorite add --workspace my-project
mochi favorite add --executable "build my-project/app:image"
mochi favorite list
mochi favorite remove --executable "build my-project/app:image"
```

To reorder favorites, drag them in the desktop app.

## Stats

```sh
mochi stats               # every workspace
mochi stats my-project    # one workspace
```

Shows total runs, success rates, and the busiest executables. `-n` sets how many top
executables to list, and `-o json` gives machine-readable output. A run you stopped
(Ctrl-C, or **Stop** in the desktop app) counts as canceled rather than failed, and
stays out of success rates and average durations.

flow docs: [History & logs](https://flowexec.io/guides/execution-history)

Every run is a flow execution, and flow keeps the logs. `mochi logs` works exactly like
`flow logs`.
