---
url: https://docs.mochiexec.io/reference/cli/mochi_discover.md
description: Find the tasks already in a workspace and make them runnable
---

# mochi discover

Find the tasks already in a workspace and make them runnable

## Synopsis

Finds the tasks a workspace already defines — Makefile targets, npm scripts, Justfile recipes, Taskfile tasks, Compose services, Dockerfiles, Cargo commands, shell and Python scripts, and GitHub Actions jobs — and makes them executables you can search and run. Nothing is written into the workspace. GitHub Actions jobs are listed for reference and can't run locally.

Scans the current workspace unless you name one. `mochi sync` re-scans every workspace discovered before, so run this to preview a workspace, narrow what it picks up, or scan one for the first time.

```shell
mochi discover [workspace] [flags]
```

## Examples

```shell
mochi discover --dry-run
mochi discover my-project --providers makefile,npm
```

## Options

| Flag | Type | Description |
|------|------|-------------|
| `--dry-run` |  | Show what would be found without changing anything |
| `--force` |  | Scan again even if no files changed since the last scan |
| `-h, --help` |  | help for discover |
| `--only` | `strings` | Only these files, by name (comma-separated) |
| `-o, --output` | `string` | Output format: text or json (default "text") |
| `--providers` | `strings` | Only these providers (comma-separated, e.g. makefile,npm) |

## 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
* [mochi discover status](mochi_discover_status.md) — Show what the last scan found, without scanning again
