Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,35 @@ Scan stdin for hardcoded secrets

---

### `sonar config`

Configure CLI settings

#### `sonar config telemetry`

Configure telemetry settings

**Options:**

| Option | Type | Required | Description | Default |
| ------------ | ------- | -------- | ------------------------------------------------ | ------- |
| `--enabled` | boolean | No | Enable collection of anonymous usage statistics | - |
| `--disabled` | boolean | No | Disable collection of anonymous usage statistics | - |

**Examples:**

```bash
sonar config telemetry --enabled
```
Enable collection of anonymous usage statistics

```bash
sonar config telemetry --disabled
```
Disable collection of anonymous usage statistics

---

## Option Types

- `string` — text value (e.g. `--server https://sonarcloud.io`)
Expand Down
1 change: 1 addition & 0 deletions docs/state-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The state file persists configuration across CLI invocations and stores:
- **Installed Hooks**: Pre/Post tool use and session start hooks for agent interactions
- **Installed Skills**: Custom Claude Code skills
- **Tool Metadata**: Installed external tools like sonar-secrets binary
- **Telemetry data**: Anonymous usage statistics

## Location

Expand Down
23 changes: 23 additions & 0 deletions spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -281,3 +281,26 @@ commands:

- command: cat .env | sonar analyze secrets --stdin
description: Scan stdin for hardcoded secrets

# Configure CLI
- name: config
description: Configure CLI settings
subcommands:
- name: telemetry
description: Configure telemetry settings
handler: ./src/commands/config.ts
options:
- name: enabled
type: boolean
description: Enable collection of anonymous usage statistics

- name: disabled
type: boolean
description: Disable collection of anonymous usage statistics

examples:
- command: sonar config telemetry --enabled
description: Enable collection of anonymous usage statistics

- command: sonar config telemetry --disabled
description: Disable collection of anonymous usage statistics
Loading
Loading