CLI
Every RapidREST project starts from the same place: a runnable server with a datastore, a config file, and a test harness already wired together, so the first thing you write is a model or a route, not boilerplate. @rapidrest/cli is what generates that starting point, and keeps generating from the same templates afterward, a new model, a new route, Docker support, a login system, whenever the project needs one. It installs as a single binary under two names, the full rapidrest and the shorter rr, both identical:
npm install -g @rapidrest/cli
- Generate Commands -
generate server,generate model,generate route,generate job. - Auth -
generate auth. - Add-ons -
generate docker,generate k8s,generate default-route,generate react,generate react-page,react export. - Dependencies -
dep add,dep install,dep remove,dep upgrade. - Dev Workflow -
dev,start,build,test. - Maintenance -
doctor,upgrade,release.
Every generate command works the same way underneath: run it bare and you're prompted interactively for whatever it needs, or pass flags (or an --answers file, where supported) to skip some or all of those prompts, useful for scripting a project setup or repeating one across a team. Regenerating an add-on you already have (generate docker, generate k8s, generate default-route) with --force is always safe, it rebuilds from your project's current state rather than patching the existing files by hand. A handful of generate commands (server, model, auth, k8s, react) also run your package manager's install automatically afterward, whenever generating actually changed package.json, pass --no-install to skip that and install yourself later.
Every flag below is documented in its long form (--flag-name); most also have a real single-character short flag, called out explicitly where one exists, e.g. -f, --force.