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

# ubx history

> List all past apply events with timestamps, git SHAs, resource counts, and costs.

`ubx history` lists the history of all applies recorded for the current stack. Records are read from `ubx-history.json` (or `.ubx/history.db` as a legacy SQLite fallback).

## Usage

```bash theme={"theme":"css-variables","languages":{"custom":["/languages/xcl.json"]}}
ubx history [flags]
```

## Flags

| Flag             | Description                                      |
| ---------------- | ------------------------------------------------ |
| `--limit <n>`    | Maximum number of entries to show (default: all) |
| `--format <fmt>` | Output format: `text`, `json`                    |

## Examples

```bash theme={"theme":"css-variables","languages":{"custom":["/languages/xcl.json"]}}
ubx history                    # show all applies
ubx history --limit 10         # last 10 applies
ubx history --format json      # JSON output
```

## Text output

```
  2026-07-07  10:00:01  abc1234  3 created  0 changed  0 destroyed
  2026-07-06  15:30:22  def5678  1 changed  0 created  0 destroyed
  2026-07-05  09:15:44  ghi9012  5 created  0 changed  0 destroyed
```

## JSON output

```json theme={"theme":"css-variables","languages":{"custom":["/languages/xcl.json"]}}
[
  {
    "timestamp": "2026-07-07T10:00:01Z",
    "git_sha": "abc1234",
    "created": 3,
    "changed": 0,
    "destroyed": 0,
    "cost_delta": 0.00
  }
]
```

## Apply record storage

ubx writes an entry to `ubx-history.json` (at the workspace root) after every successful `ubx ship`. The JSON backend is preferred over the legacy SQLite `.ubx/history.db`.

## See also

* [`ubx blame`](/v1/cli/blame) — per-resource change history
* [`ubx rollback`](/v1/cli/rollback) — roll back to a previous apply
