Command-Line Interface

Along with the Visual Studio Code integration, Kretes also provides a command-line interface. Each command available via the editor can also be exectued from the command-line.

Write kretes (or ks) in a newly generated Kretes project to see all available commands.

Usage: kretes <command> [options]

  kretes new [dir]           Create new project               [aliases: init, n]
  kretes start               Start the application           [aliases: start, s]
  kretes add [pkg]           Add package as project dependency
  kretes install             Install dependencies
  kretes update              Update packages
  kretes upgrade             Upgrade packages
  kretes setup               Setup the development environment
  kretes database [command]  Database operations                   [aliases: db]
  kretes routes              Display routes                         [aliases: r]
  kretes background          Run background processing             [aliases: bg]
  kretes doctor              Run the doctor utility               [aliases: doc]

  -h, --help     Show help                                             [boolean]
  -V, --version  Show version number                                   [boolean]

  kretes new my-project  Create and initialize `my-project` directory
  kretes start           Start the application

for more information, find the documentation at

You need at least one command before moving onn


new - Create a New Project

kretes new generates a project structure for a Kretes application.

start - Start the Application

kretes start starts the application in development mode. This command must be run from the project directory generated by kretes new. The application will be available at localhost:5544.

add - Add the package as project dependency

kretes add adds a package from the NPM registry as the project dependency by modifying package.json. This is a convenience wrapper around pnpm add.

install - Install Dependencies

kretes install installs the application dependencies as specified in package.json. This is a convenience wrapper around pnpm install.

upgrade - Upgrade dependencies

kretes upgrade upgrades the application dependencies. This comamnd checks if there are new versions of packages in the npm registery as defined in package.json. Upgrading changes package.json.

database - Manage the database

kretes database (alias db) provides a set of commands for the database management. The database connection is established based on the database configuration set in config/default.json.

  • kretes database create creates a new database
  • kretes database reset drops the existing database and creates a new, empty one with the same name.
  • kretes database setup creates the database structure (i.e. tables, schemas, etc) as described in db/setup.sql. The database shape must be written using SQL.
  • kretes database seed reads the db/seed.sql and uses its content to seed an exisiting database. The seed must be written using SQL.

Found a mistake?