<!-- Markdown mirror. Canonical: https://empryo.com/docs/recipes/test-and-commit -->

# Test, lint, commit

> Ask Empryo to run your tests, linter, and type checker with the right commands for your project, fix what fails, and commit the result with a clear message.

You do not need to tell Empryo which commands your project uses. It detects your toolchain from the project files and runs the right test, lint, typecheck, and build commands.

## Run your tests

```
> run tests
```

Empryo recognizes many toolchains, including Bun, npm, pnpm, Yarn, Deno, Cargo, Go, Gradle, Maven, .NET, Swift, Dart and Flutter, Elixir (mix), and Zig.

To run only some tests:

```
> run only the auth tests
```

## Lint and fix

```
> lint and fix everything
```

Empryo runs your linter, such as Biome, ESLint, oxlint, Ruff, Clippy, or golangci-lint, with its auto-fix option where the linter has one. The agent then fixes what is left by hand.

## Typecheck

```
> typecheck
```

Empryo runs your project's type checker, for example `tsc --noEmit` for TypeScript or `cargo check` for Rust.

## Commit

Ask in the chat:

```
> commit my changes
```

The agent reads the diff, writes a commit message that describes the change, and commits. If you want to check the message first, say so: "show me the commit message before you commit".

You can also commit yourself: press `Ctrl+G` to open the git menu, or type `/git commit`.

A good habit is to ask for everything in one go:

```
> run the tests and typecheck, fix anything that fails, then commit
```

## Co-author line

To mark commits the agent makes, turn on the co-author line:

```
/git co-author
```

When it is on, commits made by the agent end with:

```text
Co-Authored-By: Empryo <noreply@empryo.com>
```

Run the command again to turn it off. The setting is `coAuthorCommits` in your [configuration](/docs/reference/configuration).

## The `project` tool

All of the above uses the agent's `project` tool. You never have to call it yourself, but this is what your requests turn into:

| You ask | The agent runs |
|---------|----------------|
| "run tests" | `project(action: "test")` |
| "run the auth tests" | `project(action: "test", file: "auth")` |
| "build" | `project(action: "build")` |
| "lint and fix" | `project(action: "lint", fix: true)` |
| "typecheck" | `project(action: "typecheck")` |
| "what packages are in this monorepo?" | `project(action: "list")` |

In a monorepo, the agent runs the command in the package that owns the file it is working on. See the [project tool](/docs/tools/project) for the full list of supported toolchains.
