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

# lim journals

> List, create, reverse, and manage journal entries.

# lim journals

Manage journal entries directly from the CLI. List, inspect, create structured entries, reverse, and delete.

All destructive operations (reverse, delete, update-tax-code) show a preview and require confirmation before executing. Use `--dry-run` for preview-only, `--yes` to skip confirmation (for scripting / AI agents).

## journals list

List journal entries with optional filters.

```bash theme={null}
lim journals list
```

### Filters

| Flag        | Description                                                   | Example                |
| ----------- | ------------------------------------------------------------- | ---------------------- |
| `--from`    | Start date (inclusive, YYYY-MM-DD)                            | `--from 2026-01-01`    |
| `--to`      | End date (inclusive, YYYY-MM-DD)                              | `--to 2026-03-31`      |
| `--status`  | Filter by status: `draft`, `posted`, `reversed`               | `--status draft`       |
| `--search`  | Search memo text                                              | `--search タクシー`        |
| `--limit`   | Max entries to return (default: 50)                           | `--limit 100`          |
| `--page`    | Page number                                                   | `--page 2`             |
| `--source`  | Filter by source: `manual`, `bank_sync`, `invoice`, `expense` | `--source bank_sync`   |
| `--account` | Filter by account code or ID                                  | `--account 5101`       |
| `--sort`    | Sort by: `sequence`, `effectiveDate`, `createdAt`             | `--sort effectiveDate` |

```bash theme={null}
# All draft entries from March
lim journals list --from 2026-03-01 --to 2026-03-31 --status draft

# Last 10 bank-synced entries
lim journals list --source bank_sync --limit 10
```

## journals show

Show full detail for a single journal entry.

```bash theme={null}
lim journals show <seq-or-id>
```

## journals create

Create a journal entry with explicit debit/credit lines. For natural language input, use [`lim add`](/cli/add) instead.

```bash theme={null}
lim journals create \
  --date 2026-03-16 \
  --memo "Office rent March" \
  --debit 7101:100000 \
  --credit 1101:100000
```

| Flag       | Description                                           |
| ---------- | ----------------------------------------------------- |
| `--date`   | Effective date (YYYY-MM-DD)                           |
| `--memo`   | Description / memo                                    |
| `--debit`  | Debit line as `<account-code>:<amount>` (repeatable)  |
| `--credit` | Credit line as `<account-code>:<amount>` (repeatable) |

<Warning>
  Total debits must equal total credits. The command will fail with an error if they don't balance.
</Warning>

## journals edit

Edit a draft journal entry. Only `draft` entries can be edited — posted entries must be reversed and re-created.

```bash theme={null}
# Update date and memo
lim journals edit 42 --date 2026-03-20 --memo "Corrected memo"

# Replace journal lines (both --debit and --credit required)
lim journals edit 42 \
  --debit 7101:120000 \
  --credit 1101:120000

# Update everything at once
lim journals edit 42 \
  --date 2026-03-20 \
  --memo "Corrected entry" \
  --debit 7101:120000 \
  --credit 1101:120000
```

| Flag       | Description                                               |
| ---------- | --------------------------------------------------------- |
| `--date`   | New effective date (YYYY-MM-DD)                           |
| `--memo`   | New description / memo                                    |
| `--debit`  | New debit line as `<account-code>:<amount>` (repeatable)  |
| `--credit` | New credit line as `<account-code>:<amount>` (repeatable) |

<Warning>
  When updating lines, both `--debit` and `--credit` must be provided. Lines are fully replaced, not merged.
  Only draft entries can be edited. For posted entries, use `lim journals reverse` then `lim journals create`.
</Warning>

## journals reverse

Create reversing entries for specific journal entries. Shows a preview and asks for confirmation before executing.

```bash theme={null}
# Reverse specific entries by sequence number
lim journals reverse --id 5
lim journals reverse --id 1 --id 2 --id 3

# Reverse by filter
lim journals reverse --from 2026-03-01 --to 2026-03-31
lim journals reverse --search タクシー

# Preview only (no execution)
lim journals reverse --id 5 --dry-run

# Skip confirmation (for scripting / AI agents)
lim journals reverse --id 5 --yes
```

<Warning>
  You must specify at least one `--id` or filter flag. Running `lim journals reverse` with no arguments will show an error — it will NOT reverse all entries.
</Warning>

| Flag        | Description                                     |
| ----------- | ----------------------------------------------- |
| `--id`      | Entry sequence or ID to reverse (repeatable)    |
| `--from`    | Start date filter (YYYY-MM-DD)                  |
| `--to`      | End date filter (YYYY-MM-DD)                    |
| `--status`  | Filter by status                                |
| `--search`  | Search memo text                                |
| `--source`  | Filter by sourceType                            |
| `--account` | Filter by account ID                            |
| `--dry-run` | Preview what would be reversed without applying |
| `--yes`     | Skip confirmation prompt                        |

## journals delete

Delete draft journal entries. Only `draft` entries can be deleted — posted entries must be reversed instead.

```bash theme={null}
# Delete specific entries
lim journals delete --id 10 --id 11

# Preview what would be deleted
lim journals delete --id 10 --id 11 --dry-run

# Skip confirmation
lim journals delete --id 10 --yes
```

<Warning>
  Deletion is irreversible. Only `draft` entries can be deleted. For posted entries, use `lim journals reverse` instead.
</Warning>

| Flag        | Description                                           |
| ----------- | ----------------------------------------------------- |
| `--id`      | Entry sequence or ID to delete (repeatable, required) |
| `--dry-run` | Show what would be deleted without applying           |
| `--yes`     | Skip confirmation prompt                              |

## journals update-tax-code

Update the tax code for journal lines matching a filter. Useful after a tax code change or correction.

```bash theme={null}
lim journals update-tax-code \
  --from 2026-01-01 \
  --to 2026-03-31 \
  --oldTaxCodeId <uuid> \
  --newTaxCodeId <uuid>
```

| Flag             | Description                             |
| ---------------- | --------------------------------------- |
| `--from`         | Start date filter                       |
| `--to`           | End date filter                         |
| `--account`      | Filter by account ID                    |
| `--search`       | Search memo text                        |
| `--oldTaxCodeId` | Current tax code to replace (required)  |
| `--newTaxCodeId` | New tax code (required)                 |
| `--dry-run`      | Show what would change without applying |
| `--yes`          | Skip confirmation prompt                |
