@adapttable/cli
v3.0.1
Published
Scaffolding and migration CLI for AdaptTable — initialize a table or safely migrate v2 source.
Maintainers
Readme
@adapttable/cli
📖 Documentation · 🚀 Live demo · Get started
The scaffolding CLI for AdaptTable. One command detects your UI kit, picks your package manager, writes a starter table, and tells you exactly what to install.
npx @adapttable/cli initAdaptTable — detected Mantine.
1. Install the packages:
pnpm add @adapttable/core @adapttable/mantine @mantine/hooks
2. Scaffolded: src/PeopleTable.tsx
3. Render <PeopleTable /> and you're done.Requires Node.js 22.12.0 or newer; packed releases are tested on Node 22.12 and Node 24.
What it does
- Detects your UI kit from
package.json— Mantine, MUI, Chakra, Ant Design, Radix Themes, Base UI, shadcn/ui (viacomponents.json), or Tailwind — falling back to the unstyled adapter. - Detects your package manager from the lockfile (pnpm / yarn / bun / npm) and prints the right install command — it never installs anything itself; you run the command it shows.
- Scaffolds
src/PeopleTable.tsx, a sortable starter table wired to the matching adapter (every optional behavior is one feature import away — see the docs). Pass--forceto overwrite an existing file. - One step it can't do for you: wrap your app in the kit's provider
(
MantineProvider, MUI'sThemeProvider,ChakraProvider, antd'sConfigProvider, Radix'sTheme) if it isn't already — that's the most common first-run failure.
Migrate from v2
npx @adapttable/cli migrate-v3 src
npx @adapttable/cli migrate-v3 src --checkThe command moves the 72 adapter-contract imports to
@adapttable/react/adapter. Changes that need a behavior choice are reported
with their source locations and left untouched. A second run is a no-op.
Programmatic use
The building blocks are exported and pure (easy to test/automate):
import { detectKit, runInit } from "@adapttable/cli";
detectKit({ "@mui/material": "^6" }).kit; // "mui"Features
- Detects your UI kit from
package.json— Mantine, MUI, Chakra, Ant Design, Radix, Base UI, shadcn/ui (viacomponents.json) or Tailwind. - Prints the exact install command for the matching adapter plus the peer packages it needs (run it yourself with your package manager).
- Scaffolds a working table wired to your kit, not a blank file: sortable out of the box, with the full AdaptTable feature set (filtering, selection, editing, grouping, saved views, CSV export, virtualization, …) each one import away.
- Migrates v2 source safely —
migrate-v3moves adapter-contract imports to@adapttable/react/adapterand reports every behavior-dependent change for manual review. - Programmatic API — call it from your own scripts, not only the terminal.
See it work
What npx @adapttable/cli init scaffolds, running.
Row grouping — group rows by a column with per-group subtotals

Inline cell editing — double-click a cell; text, number and select editors

Filtering — type a bound and the table answers as you type

Column management — show, hide, reorder, pin and resize

RTL — the whole table mirrors, not just the text

Documentation
Getting started · Live demo · Comparison vs ag-Grid · MUI X · TanStack
- Data — client vs server tiers · pagination & infinite scroll · URL-synced state
- Interaction — filtering · sorting · selection & bulk actions · row expansion · inline cell editing
- Columns — show/hide · reorder · pin · resize · row grouping & aggregates · CSV export
- More — i18n & RTL · virtualization · customization · API · FAQ

