> ## 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.

# Migrating from Other Accounting Software

> Move journal entries and opening balances from freee, MoneyForward, Yayoi, and other accounting tools into lim.

# Migrating from other accounting software

lim can import CSV exports from `freee`, `MoneyForward`, `Yayoi`, `Bugyo`, `QuickBooks`, and `Xero`. For large historical migrations, `lim import` is safer than the browser uploader because it gives you mapping, validation, rollback, and health checks.

## Supported sources

| Source       | Journal CSV | Opening balance               | Recommended path |
| ------------ | ----------- | ----------------------------- | ---------------- |
| freee        | Supported   | freee-style B/S CSV supported | CLI              |
| MoneyForward | Supported   | Separate CSV recommended      | CLI              |
| Yayoi        | Supported   | Separate CSV recommended      | CLI              |
| Bugyo        | Supported   | Separate CSV recommended      | CLI              |
| QuickBooks   | Supported   | Separate CSV recommended      | CLI              |
| Xero         | Supported   | Separate CSV recommended      | CLI              |

<Info>
  The browser preview mainly covers the Japanese journal CSV variants used by `freee` and
  `MoneyForward`. For other sources, prefer the CLI importer.
</Info>

## Before you migrate

* Lock the date range you want to move
* Keep a backup from the source system
* Export journal CSV and, if needed, opening balance or balance sheet CSV separately
* Create the company in lim and confirm the fiscal start date
* Clean up major account-name inconsistencies before import

<Warning>
  A `freee` journal export alone does not fully capture opening balance settings such as capital and
  startup costs. If you migrate from `freee`, export an opening balance or balance sheet CSV as
  well.
</Warning>

## Recommended workflow

<Steps>
  <Step title="Export CSV files from the source system">
    Start with the journal export. If the source keeps opening balances outside normal journals, export a balance file separately.

    * `freee`: export the journal CSV and also export `opening balance` or `balance sheet` CSV when needed.
    * `MoneyForward`: export the journal CSV and keep a separate opening-balance file if you need a clean day-one state.
    * `Yayoi` / `Bugyo` / `QuickBooks` / `Xero`: export journals as CSV from the product's export function.

    lim auto-detects common encodings including `Shift_JIS`. Avoid re-saving the CSV in Excel if possible, because header names and formatting can change.
  </Step>

  <Step title="Validate with a dry run">
    Run validation first.

    ```bash theme={null}
    lim import ./exports/journal.csv --dry-run
    ```

    Check the detected format, entry count, unmapped accounts, and parsing errors before you commit any data.
  </Step>

  <Step title="Resolve unmapped accounts">
    When account names do not match, the CLI lets you map to an existing account, create a new one, or skip those entries.

    ```bash theme={null}
    lim import ./exports/journal.csv
    ```

    Confirmed mappings are saved to `~/.lim/account-mappings/<company-id>.json`, so repeated imports get faster.
  </Step>

  <Step title="Import opening balances">
    Load opening balances separately when you need a clean opening state.

    ```bash theme={null}
    lim import --opening-balance ./exports/balance-sheet.csv
    ```

    freee balance sheet CSV is auto-detected. For other systems, provide a CSV that clearly contains account names plus debit and credit balances.
  </Step>

  <Step title="Verify after import">
    Finish with the health check and a trial balance review.

    ```bash theme={null}
    lim import --health-check
    lim reports tb
    ```

    Compare the imported balances against the source system's ending balances and confirm that debits equal credits.
  </Step>
</Steps>

## Using the browser uploader

If you use the `CSV import` page in the app, you can preview entries before import.

* Entries with unmapped accounts are skipped
* The CLI is better for complex compound entries or larger account cleanup
* Imports are chunked internally for large files

## Useful commands

```bash theme={null}
# Restrict to a date range
lim import ./exports/journal.csv --from 2025-04-01 --to 2026-03-31

# Roll back a previous import batch
lim import --undo <batch-id>
```

<Tip>
  lim uses source metadata to detect duplicates during import. Re-importing the same CSV should skip
  entries that were already loaded.
</Tip>

## Source-specific notes

### freee

* Supports both old and new journal CSV layouts
* Uses `仕訳ID` for stronger duplicate detection when available
* Opening balances should be imported separately from a freee opening-balance or B/S CSV

### MoneyForward

* Auto-detects CSVs that include `取引No` and `MF仕訳タイプ`
* Compound entries are grouped by transaction number

### Yayoi, Bugyo, QuickBooks, and Xero

* Journal CSV import is supported
* Prefer the CLI over the browser preview

## Next steps

<CardGroup cols={2}>
  <Card title="Chart of accounts" icon="list-tree" href="/guides/chart-of-accounts">
    Standardize and clean up accounts after migration.
  </Card>

  <Card title="Bank reconciliation" icon="building-columns" href="/guides/bank-reconciliation">
    Reconcile balances and cash movements.
  </Card>

  <Card title="Financial reports" icon="chart-line" href="/guides/financial-reports">
    Validate with trial balance, P\&L, and balance sheet.
  </Card>

  <Card title="Document management" icon="folder-open" href="/guides/document-management">
    Organize evidence and retention after migration.
  </Card>
</CardGroup>
