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

# Auto-Close Configuration

> Detailed configuration for automatic issue closure

# Auto-Close Configuration

The `auto_close` section in your `simili.yaml` controls how and when confirmed duplicates are automatically closed.

## Configuration Options

```yaml theme={null}
auto_close:
  grace_period_hours: number       # Hours after labeling before auto-close (default: 72)
  dry_run: boolean                 # If true, log actions without executing (default: false)
```

### `grace_period_hours`

* **Type:** Number
* **Default:** `72`
* **Description:** The number of hours Simili Bot will wait after applying the `potential-duplicate` label before it is allowed to close the issue. This allows time for human maintainers or the issue author to override the bot's decision.

### `dry_run`

* **Type:** Boolean
* **Default:** `false`
* **Description:** When set to `true`, the `simili auto-close` command will log its intentions but will not actually close any issues or post any comments on GitHub.

***

## Deployment in GitHub Actions

The auto-close feature is typically run on a schedule (cron job).

```yaml theme={null}
name: Simili Auto-Close Duplicates
on:
  schedule:
    - cron: '0 */6 * * *'  # Run every 6 hours
jobs:
  auto-close:
    runs-on: ubuntu-latest
    steps:
      - uses: similigh/simili-bot@v0.2.0
        with:
          command: "auto-close"
          config_path: ".github/simili.yaml"
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
```

***

## CLI Overrides

When running `simili auto-close` via the CLI, you can override the configuration file:

* `--grace-period-minutes`: Set a grace period in minutes (useful for testing).
* `--dry-run`: Force dry-run mode regardless of config file settings.

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Auto-Close Guide" href="/guides/auto-close" icon="book-open">
    Learn how human activity detection works.
  </Card>

  <Card title="CLI Reference" href="/reference/cli/auto-close-command" icon="code">
    Full CLI command reference.
  </Card>
</CardGroup>
