> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codebeaver.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Reference

> All of the commands of the CodeBeaver CLI interface

There are 3 main commands:

* `codebeaver`: Without any command, runs both unit and E2E tests if defined in codebeaver.yml
* `codebeaver unit`: Generates and runs unit tests for a specific file
* `codebeaver e2e`: Runs end-to-end tests defined in codebeaver.yml

## Command Options

### Global Options

* `-v, --verbose`: Enable verbose logging output
* `--version`: Display CodeBeaver version number

### Unit Test Command

```bash theme={null}
codebeaver unit --file <file_path> [--template <template_name>] [--max-files-to-test <number>] [--verbose]
```

* `--file`: (Required) Path to the file to analyze
* `--template`: (Optional) Testing framework template to use (e.g., pytest, jest, vitest). If not specified, uses template from codebeaver.yml
* `--max-files-to-test`: (Optional) Maximum number of files to generate unit tests for (default: 10)
* `-v, --verbose`: (Optional) Enable verbose logging output

### E2E Test Command

```bash theme={null}
codebeaver e2e [--config <config_file>] [--verbose]
```

* `--config`: (Optional) Path to the YAML configuration file (defaults to codebeaver.yml)
* `-v, --verbose`: (Optional) Enable verbose logging output

## Environment Variables

* `OPENAI_API_KEY`: (Required) Your OpenAI API key
* `CHROME_INSTANCE_PATH`: Path to your Chrome instance. Defaults to `/Applications/Google Chrome.app/Contents/MacOS/Google Chrome`
