> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://mammoth.io/docs/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# mammoth history

> All 4 mammoth history commands with examples, arguments and confirmation flags: List the writes made from this machine, undo them, and resume a stopped run.

> Generated from mammoth-cli 2.4.2, released 2026-11-02: `mammoth schema list`, `mammoth capability list` and the CLI's own `--help`. Do not edit by hand; run `npm run docs:capabilities`.

List the writes made from this machine, undo them, and resume a stopped run. 4 commands.

Every command also takes the [global flags](https://mammoth.io/docs/build/cli/global-flags/) (`--output`, `--yes`, `--confirm`, `--dry-run`, `--input`, `--profile`, ...), which are not repeated below. `--input` takes a JSON or YAML document of the input fields; `mammoth schema get COMMAND_ID` prints a command's full input schema.

**Confirmation.** Commands marked `--yes --confirm TARGET` or `--yes` always need those flags, even at a terminal: they never prompt. Commands marked "`--yes` or prompt" ask at an interactive terminal (table output, no `--no-input`) and otherwise need `--yes`. `--dry-run` skips confirmation and sends nothing.

## Summary

| Command | What it does | Effect | Confirmation |
|---|---|---|---|
| [`history list`](#mammoth-history-list) | List the journaled writes, newest first; filter with 'limit', 'undoable_only'. | Read | — |
| [`history resume`](#mammoth-history-resume) | Go on with a stopped run (by its group) from its first unfinished line. Prompt or '--yes'. | High impact | `--yes` or prompt |
| [`history show`](#mammoth-history-show) | Show one write (by inv) or every write of one run (by group), with their undo lines. | Read | — |
| [`history undo`](#mammoth-history-undo) | Undo one write (by inv) or a whole run (by group), newest first. Prompt or '--yes'. | High impact | `--yes` or prompt |

## history commands

### mammoth history list

List the journaled writes, newest first; filter with 'limit', 'undoable_only'.

```bash
mammoth history list --input '{"undoable_only": true}'
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `limit` | `--input` field | no | `20` | `int` |  |
| `undoable_only` | `--input` field | no | `false` | `bool` |  |

- **Effect:** Read, scope `profile` · **Confirmation:** none
- **Preconditions:** Lists writes made from this machine only. Not available embedded.
- **Id:** `history.list` · **Result:** `HistoryListResult`

### mammoth history resume

Go on with a stopped run (by its group) from its first unfinished line. Prompt or '--yes'.

```bash
mammoth history resume 97b9ee41d15d --yes
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `ID` | positional | yes | — | `str` | The group of the mammoth run or recipe run that stopped (from 'history list'). |
| `from_line` | `--input` field | no | — | `int` |  |

- **Effect:** High impact, scope `profile` · **Confirmation:** `--yes`, or answer the prompt at an interactive terminal
- **Preconditions:** Resumes a mammoth run or recipe run started on this machine with the journal on. A named result larger than 256 KB is not kept, so a later line that reads it fails. Refuses when a write's outcome is unknown until from_line names where to start. Not available embedded.
- **Id:** `history.resume` · **Result:** `HistoryResumeResult`

### mammoth history show

Show one write (by inv) or every write of one run (by group), with their undo lines.

```bash
mammoth history show 97b9ee41d15d
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `ID` | positional | yes | — | `str` | The write's inv, or the group of a whole mammoth run (from 'history list'). |

- **Effect:** Read, scope `profile` · **Confirmation:** none
- **Preconditions:** Not available embedded.
- **Id:** `history.show` · **Result:** `HistoryShowResult`

### mammoth history undo

Undo one write (by inv) or a whole run (by group), newest first. Prompt or '--yes'.

```bash
mammoth history undo 97b9ee41d15d --yes
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `ID` | positional | yes | — | `str` | The write's inv, or the group of a whole mammoth run (from 'history list'). |
| `force` | `--input` field | no | `false` | `bool` |  |

- **Effect:** High impact, scope `profile` · **Confirmation:** `--yes`, or answer the prompt at an interactive terminal
- **Preconditions:** Undoes pipeline edits (back to the version before), objects a write created (to the trash) and moves to the trash (restored). Permanent deletes and external effects (exports, sends) cannot be undone and are reported. Not available embedded.
- **Id:** `history.undo` · **Result:** `HistoryUndoResult`

---
Source: https://mammoth.io/docs/build/cli/history.md · Updated: 2026-11-02
