CLI reference
The nuxt-feathers-zod CLI initializes projects, generates services and checks configuration consistency.
bash
bunx nuxt-feathers-zod --helpMain commands
| Command | Purpose |
|---|---|
doctor | Checks Nuxt configuration, services, manifest and common options. |
init embedded | Configures an application with an embedded Feathers backend. |
init remote | Configures a client application connected to an external Feathers API. |
init starter | Prepares an application base from a preset. |
init templates | Installs service templates. |
add service | Generates a standard Feathers service. |
add file-service | Generates an upload/download service. |
add remote-service | Declares a service consumed from a remote API. |
add custom-service | Generates an adapter-less service with custom methods. |
add middleware | Generates application middleware. |
add server-module | Generates an embedded server module. |
mongo management | Adds MongoDB administration support. |
schema | Inspects or edits a service schema. |
auth service | Adds an authentication-related service. |
templates, plugins, modules, middlewares | Lists or adds entries from module registries. |
Diagnostic
bash
bunx nuxt-feathers-zod doctorRun it after installation, after service generation and before delivery.
Initialize embedded mode
bash
bunx nuxt-feathers-zod init embedded \
--auth \
--database mongodb \
--framework express \
--servicesDir services \
--restPath /feathers \
--websocketPath /socket.ioUseful options:
--authenables the authentication base;--database mongodbprepares MongoDB integration;--framework express|koachooses the embedded server framework;--swaggerenables Swagger documentation when available;--secureDefaultsapplies conservative server options.
Initialize remote mode
bash
bunx nuxt-feathers-zod init remote \
--url https://api.example.com \
--transport socketio \
--auth \
--payloadMode jwtUseful options:
--urlis required;--transport socketio|restdefines the client transport;--payloadMode jwt|keycloakadapts the authentication payload;--tokenField accessToken|access_tokendefines the expected token field.
Generate a service
bash
bunx nuxt-feathers-zod add service articles --adapter mongodb --schema zodUseful options:
--adapter memory|mongodb|custom;--schema none|zod|json;--authfor an authentication-compatible user service;--collection <name>for MongoDB;--idField <field>to define the identifier field.
Service with custom methods
bash
bunx nuxt-feathers-zod add custom-service reports --methods find,run --customMethods runCustom methods should be declared explicitly to keep the client, server and types aligned.
Remote service
bash
bunx nuxt-feathers-zod add remote-service api/ldap-search --methods findThis mode is suited for services exposed by an external backend and consumed from the Nuxt application.
Schemas
bash
bunx nuxt-feathers-zod schema articles --show
bunx nuxt-feathers-zod schema articles --add-field title:string:required
bunx nuxt-feathers-zod schema articles --validateThe schema command helps inspect and maintain schemas without breaking the runtime contract.
Important rule
For business services, prefer:
bash
bunx nuxt-feathers-zod add service <name>Manual folder creation can prevent the scanner from finding the expected exports.
