# Running

Run Ginkgo suites with the ginkgo CLI, run, -r, -p, --dry-run, watch, build...

- Repository: https://github.com/onsi/ginkgo (9071 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-10-09
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add onsi/ginkgo --skill running -g -a claude-code -y`
Codex: `npx skills add onsi/ginkgo --skill running -g -a codex -y`
Cursor: `npx skills add onsi/ginkgo --skill running -g -a cursor -y`
Gemini CLI: `npx skills add onsi/ginkgo --skill running -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add onsi/ginkgo`

## Description

Run Ginkgo suites with the ginkgo CLI, run, -r, -p, --dry-run, watch, build (precompiled .test binaries), generate, outline, unfocus, labels, version; spec randomization (--randomize-all/--randomize-suites/--seed); running multiple suites (--keep-going/--skip-package/--compilers); previewing (--dry-run, PreviewSpecs); and parameterizing a suite via env vars or init()-registered flags after -- plus GinkgoConfiguration() overrides. Use when running suites locally, precompiling, watching for changes, or parameterizing a run from the command line. For a CI configuration see ginkgo:ci.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Running Ginkgo

How to drive the suite once it's wired up (`ginkgo:setup`). For a production CI configuration, see `ginkgo:ci`. Docs: <https://onsi.github.io/ginkgo/#ginkgo-cli-overview>.

## The CLI surface

`ginkgo` is the recommended runner, **you can run suites with `go test`, but only the CLI does parallelism and profile aggregation**, and a few `go test` flags (e.g. `-count=N`, use `--repeat=N`) are unsupported. `ginkgo` is shorthand for `ginkgo run`; it passes through nearly all `go test`/`go build` flags.

```bash
ginkgo                                  # run the suite in the current directory
ginkgo path/to/suite path/to/other      # run several named suites
ginkgo -r                               # recurse the tree, run every suite found (== ginkgo ./...)
ginkgo -p                               # run in parallel (→ ginkgo:parallelism)
ginkgo -v --dry-run                     # build the tree and print what WOULD run, without running
ginkgo <GINKGO-FLAGS> <PACKAGES> -- <PASS-THROUGHS>   # the full grammar
```

**Ginkgo flags must come before the package list; suite-bound args go after `--`.** Subcommands:

| Command | Does |
|---|---|
| `ginkgo build path/...` | Precompile each suite to a `package.test` binary (accepts a subset of `run` flags, compile-time only) |
| `ginkgo watch -r -p` | Re-run suites when they or their dependencies change (`-depth` tunes dependency monitoring) |
| `ginkgo bootstrap` / `ginkgo generate <subject>` | Scaffold a suite / a spec file (→ `ginkgo:setup`); both take `--template`/`--template-data` |
| `ginkgo outline <file>` | Static (AST-parsed) spec outline as `csv`/`indent`/`json`, no compile needed |
| `ginkgo unfocus` | Strip all programmatic `F`-focus from the tree (→ `ginkgo:filtering`) |
| `ginkgo labels` | List the `Label`s used in a suite (naive parse) |
| `ginkgo version` | Print the CLI version |

The rest: https://github.com/onsi/ginkgo/blob/HEAD/plugins/ginkgo/skills/running/SKILL.md
