CLI Tools
NEWGet started in seconds with our interactive CLI. Create new projects, generate TypeScript types, scaffold extensions, and manage your database — all without leaving your terminal.
From Zero to Backend in Seconds
The Baasix CLI eliminates the tedious parts of project setup so you can focus on building features.
One command creates a fully configured Baasix project with all the structure you need. Interactive prompts guide you through options without requiring you to remember flags or arguments. Need TypeScript types for your frontend? One command. Creating a new hook or endpoint? The CLI scaffolds the boilerplate for you.
- Interactive project creation with `npx baasix init`
- Auto-generate TypeScript types from your live schema
- Scaffold hooks, endpoints, and scheduled tasks instantly
- Database introspection to import existing tables
- Environment file templates with all required variables
- Built-in upgrade command to update to latest version
Essential Commands
Create a new project
npx baasix init my-projectInteractive setup walks you through database config, authentication options, and initial structure.
Generate TypeScript types
npx baasix types --url http://localhost:3000Creates type definitions for all your collections, ready to use with the SDK.
Create an extension
npx baasix create hook --name validateOrderScaffolds a hook, endpoint, or scheduled task with the right structure and exports.
CLI Capabilities
Project Scaffolding
Create complete Baasix projects with proper folder structure, config files, and initial extensions ready to customize.
Type Generation
Generate TypeScript types from your live Baasix instance. Keep frontend and backend perfectly in sync.
Extension Templates
Scaffold hooks, endpoints, and scheduled tasks with the correct file structure and TypeScript types.
Database Tools
Introspect existing databases, export schemas, and manage migrations through the CLI.
Version Management
Check for updates and upgrade to the latest Baasix version with automatic migration guidance.
Dev Server
Start your Baasix server in development mode with hot reloading and detailed logging.
CLI FAQ
Do I need to install the CLI globally?
No! Use `npx baasix` to run commands without global installation. Or add it to your project's devDependencies for consistent versioning.
How do I keep generated types up to date?
Run the types command whenever your schema changes, or add it to a npm script that runs before your build. Some developers run it as a pre-commit hook.
Can I customize the scaffolded templates?
Yes! The CLI looks for templates in your project's `.baasix/templates` folder first. Create custom templates and the CLI will use those instead of defaults.
Does the CLI work with CI/CD pipelines?
Absolutely. Use the `--yes` flag to skip interactive prompts and run commands non-interactively in CI environments.
Ready to build faster?
Join developers who are shipping production-ready backends in hours, not weeks.