@adapttable/cli
v0.1.0
Published
Scaffolding CLI for AdaptTable — `npx @adapttable/cli init` detects your UI kit (Mantine, MUI, Chakra, Ant Design, Tailwind) and sets up a data table.
Maintainers
Readme
@adapttable/cli
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.What it does
- Detects your UI kit from
package.json— Mantine, MUI, Chakra, Ant Design, or Tailwind (→ the unstyled adapter), falling back to unstyled. - Detects your package manager from the lockfile (pnpm / yarn / bun / npm) and prints the right install command.
- Scaffolds
src/PeopleTable.tsx, a ready-to-render starter using the matching adapter. Pass--forceto overwrite an existing file.
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"License
MIT © Orwa Mahmoud
