# Commands

Interactive @leftsize commands for remediation guidance, issue management, and false positive reporting.

You can comment `@leftsize <command>` on any issue LeftSize created. LeftSize answers with a comment, usually within a few seconds.

- Only the first `@leftsize` command in a comment runs.
- Commands run when the comment is posted. Editing an existing comment doesn't run it again.
- Anyone who can comment on the issue can use commands. Comments from bots are ignored.
- An unknown command, or `@leftsize` on its own, returns the list of commands.

## Guidance commands

These give more detail about the finding in the issue.

### `@leftsize explain`

Explains why the resources were flagged and what the finding means.

### `@leftsize howto`

Step-by-step instructions to fix the finding. Alias: `@leftsize how-to`

### `@leftsize impact`

The cost, performance or security impact of the finding.

### `@leftsize alternatives`

Other ways to address the finding besides the main recommendation. Alias: `@leftsize options`

### `@leftsize script <type>`

A ready-to-use remediation script. Supported types:

| Type | Description |
|------|-------------|
| `azure-cli` | Azure CLI commands (default) |
| `aws-cli` | AWS CLI commands |
| `powershell` | PowerShell commands |
| `terraform` | Terraform configuration |

Example: `@leftsize script terraform`

Without a type you get `azure-cli`, also on AWS issues, so use `@leftsize script aws-cli` for AWS findings.

### `@leftsize prompt`

A ready-made prompt to paste into ChatGPT, GitHub Copilot or Claude for help with the fix.

## Issue management commands

These control what happens to the issue.

### `@leftsize snooze <duration>`

Closes the issue for a while. After the snooze period, the next scan that still finds the problem reopens the issue and comments that the snooze expired. If the problem is gone by then, the issue stays closed.

The duration is a number followed by a unit:

| Unit | Example | Meaning |
|------|---------|---------|
| `d` | `14d` | days |
| `w` | `2w` | weeks |
| `m` | `3m` | months (30 days each) |
| `y` | `1y` | years |

Default: `14d`. Snoozed issues are closed as "completed".

Example: `@leftsize snooze 3m`

### `@leftsize ignore <reason>`

Closes the issue as "not planned" for good. LeftSize won't reopen it or open a new issue for this rule and scope, including for resources that show up there later. The scope is the resource group (Azure) or the account and region (AWS).

Add a reason so your team knows why the finding was dismissed. Both of these work:

- `@leftsize ignore This is a shared dev environment, cost is accepted`
- `@leftsize ignore reason="This is a shared dev environment, cost is accepted"`

### `@leftsize wrong <reason>`

Reports a false positive. It closes the issue as "not planned", just like `ignore`, and records the finding as a false positive so the rule can be improved.

Aliases: `@leftsize false-positive`, `@leftsize fp`

Example: `@leftsize wrong This VM handles batch jobs that run on weekends`

If you'd like us to follow up, also email [support@leftsize.com](mailto:support@leftsize.com) with what the rule got wrong.

### `@leftsize feedback <message>`

Records feedback about the finding. The issue stays open.

Example: `@leftsize feedback The savings estimate seems too high for this resource type`

### Closing an issue yourself

When you've fixed the resources, close the issue. LeftSize doesn't close issues on its own, and it won't reopen an issue you closed.

## Plans

Commands work the same on every plan. On the Free plan, LeftSize only opens issues for cost optimization rules, so the other rules have no issues to comment on.

## Safety

LeftSize only reads. Commands that would change infrastructure (`stop`, `delete`, `terminate`, `deallocate`, `release`, `resize`, `scale`, `schedule`, `tag`) are blocked. LeftSize replies that it doesn't make infrastructure changes.
