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

# upstack history

> Inspect or re-run previously executed queries. Every query run is logged locally.

Every query run is logged locally to `~/.upstack_history/`. The CLI doesn't send history anywhere — it's purely a convenience for you.

## Usage

```bash theme={null}
upstack history                # last 20 entries
upstack history --show <id>    # inspect a single entry
upstack history --rerun <id>   # re-run a previous query
upstack history --clear        # delete all entries
```

## Flags

| Flag           | Description                                                                                           |
| -------------- | ----------------------------------------------------------------------------------------------------- |
| `--show <id>`  | Print the full parameters and result for one history entry.                                           |
| `--rerun <id>` | Re-run a previous query with the same parameters. Useful for "what did yesterday look like, exactly?" |
| `--clear`      | Delete all history entries. No confirmation.                                                          |
| `--limit <n>`  | Number of recent entries to list. Default `20`.                                                       |
