# History and Autocomplete

`omnipy` stores redacted command history in SQLite to improve UX and shell completion.

## Stored data

- Table: `command_history`
- Cap: `2000` entries (oldest rows pruned automatically)
- Fields: timestamp, redacted command text, redacted argv JSON, instance, cluster

Sensitive values are redacted using strict patterns (`token`, `secret`, `password`, `key`, `cert`, `auth`, `header`, etc.).

## Config commands

```bash
omnipy config history info
omnipy config history clear
```

## Completion behavior

High-value completions are backed by:

1. Generated CRD catalog and aliases
2. Recent command history suggestions
3. Known cluster defaults/preferences

This is currently focused on common fields like resource type and `--cluster`.
