Skip to content

Core Commands

Sauf provides a series of core commands to help you manage and operate your command-line application efficiently. Below is a list of the core commands that Sauf supports:

Start Development Server

  • dev: Start the application in development mode.
    • -p, --port <port>: Specify the port the application will listen on (default is 3000).
    • -h, --host <host>: Specify the host the application will listen on (default is localhost).
sh
$ npx sauf dev
sh
$ pnpx sauf dev
sh
$ yarn sauf dev
sh
$ bunx sauf dev

Build Application

  • build: Compile the application for production environment.
    • -p, --platform <platform>: Specify the build platform (e.g., node, deno).
sh
$ npx sauf build
sh
$ pnpx sauf build
sh
$ yarn sauf build
sh
$ bunx sauf build

Sync Database

  • db:init: Initialize the database.
sh
$ npx sauf db:init
sh
$ pnpx sauf db:init
sh
$ yarn sauf db:init
sh
$ bunx sauf db:init

Seeding Database

  • db:seed: Add sample data to the database.
sh
$ npx sauf db:seed
sh
$ pnpx sauf db:seed
sh
$ yarn sauf db:seed
sh
$ bunx sauf db:seed

List Registered Routes

  • route:list: Display the list of routes registered in your application.
sh
$ npx sauf route:list
sh
$ pnpx sauf route:list
sh
$ yarn sauf route:list
sh
$ bunx sauf route:list