@arbitrat/cli
v1.0.1
Published
Arbitrat workspace CLI. Opinionated generators for Arbitrat engineers.
Readme
@arbitrat/cli
arbi is the Arbitrat workspace generator. One command, a few prompts, and a project that already looks like we meant it — TypeScript, Infisical, git hooks, and add-ons instead of a kitchen-sink template.
We are opinionated on purpose. If you wanted a buffet, create-next-app and @nestjs/cli are excellent. This is the house tasting menu.
Who we are: arbitrat.org
Install
Node.js 20+.
npm install -g @arbitrat/cli
# or
pnpm add -g @arbitrat/cliConfirm it landed:
arbi -vWhat arbi does
There is one command today, and that is enough:
arbi create workspace
# or skip the name prompt
arbi create workspace my-appThe wizard asks, in order:
- Name — directory and package name
- Stack — Next.js or NestJS
- If Next.js: CSS (Tailwind or CSS Modules, not both), then whether to add a NestJS API
- Add-ons for each app you are generating (Space toggles, Enter confirms; none is a valid answer)
It refuses to write into a directory that already exists. That is a feature, not a lack of ambition.
What you get
Every generated project includes:
- Strict TypeScript
- Infisical-wrapped npm/pnpm scripts (
INFISICAL_TOKENin.env, never committed) - Husky (
pre-commit,commit-msg,post-merge) plus Prettier / lint-staged - A small, real starting point — not an empty folder with a README that says “TODO”
Next.js only
A standalone Next.js app (npm) with the Arbitrat overlay: App Router, src/modules for business logic, app/api handlers, shared UI/hooks, and docs under docs/.
CSS is Tailwind or CSS Modules. Pick one. Mixing them is how teams invent a third style system by accident.
Add-ons
| Add-on | What it adds |
| --- | --- |
| Theming | Dark / light / system via next-themes |
| Jest | Jest + Next.js test harness |
| Docker | Production Dockerfile with Next standalone output |
| Prisma | Prisma + Postgres, used from feature-module repositories |
| Redis | Redis client in lib/, used from feature modules |
| Internationalization | App Router i18n with next-intl (app/[locale]/; API stays in app/api/) |
| Sentry | @sentry/nextjs instrumentation |
Next.js + NestJS
When you confirm a Nest backend, arbi creates a pnpm workspace:
apps/web Next.js UI (port 3000)
apps/api NestJS HTTP API (port 3001)
packages/contracts Shared TypeScript typesPrisma and Redis are offered on the API only. Persistence does not live in Next.js when Nest is in the room — we already had that meeting.
Root scripts include dev:web, dev:api, start:web, start:api, plus build / typecheck / lint filters.
NestJS only
A standalone NestJS service (npm) with the same Infisical and hook baseline. Default HTTP port is 3001.
Add-ons
| Add-on | What it adds |
| --- | --- |
| Jest | Jest + ts-jest (the Nest CLI already ships a test setup; this keeps ours explicit) |
| Prisma | Prisma + Postgres, PrismaModule, repositories |
| Redis | Redis service |
| Docker | Production Dockerfile |
| Sentry | @sentry/node |
After generation
Put INFISICAL_TOKEN in .env (or apps/web/.env and apps/api/.env in a workspace). Then:
| Kind | Dev | Prod (after build) |
| --- | --- | --- |
| Next.js only | npm run dev | npm start |
| Next.js + NestJS | pnpm dev:web and pnpm dev:api | pnpm start:web and pnpm start:api |
| NestJS only | npm run start:dev | npm start |
That is the current capacity of arbi. If a prompt is not in the wizard, it is not a secret flag — it is not built yet.
