Installation
Create a new LykosJS application using the official CLI, choose between REST and GraphQL, and get your backend project running in minutes.
Prerequisites
Before creating a LykosJS application, make sure you have Bun installed on your machine. LykosJS uses Bun as its runtime and package manager.
1bun --versionCreate a new project
The recommended way to get started is through the official create-lykosjs CLI. It scaffolds a ready-to-use application with a modular project structure.
1bun create lykosjs my-appReplace my-app with your preferred project name. The CLI will ask you to choose the API style for your application.
🐺 LykosJS — Built for Speed. Designed for Scale.
? Which API are you ready to build with LykosJS? 🐺
❯ REST API — controllers, routes & validation rules
GraphQL — schema-first with resolvers
↑/↓ to move · enter to selectSelect an API style using the arrow keys and press Enter. The CLI generates the corresponding project template.
Choose an API template
LykosJS provides two independent project templates. Choose the one that best fits your application's architecture.
REST API
The REST template provides a modular structure for building HTTP APIs, with controllers, routes, services, validation rules, schemas, and tests.
1bun create lykosjs my-app --template restGraphQL API
The GraphQL template includes a schema-first setup with resolvers, a GraphQL executor, a request handler, and module-based organization.
1bun create lykosjs my-app --template graphqlYou can also use the shorthand flags:
1# Create a REST application2bun create lykosjs my-app --rest3 4# Create a GraphQL application5bun create lykosjs my-app --graphqlProject structure
The CLI generates a modular application structure. The exact files depend on the selected template.

REST project
1my-app/2├── src/3│ ├── launch.ts4│ ├── modules.ts5│ └── modules/6│ └── users/7│ ├── users.controller.ts8│ ├── users.module.ts9│ ├── users.route.ts10│ ├── users.service.ts11│ ├── rules/12│ │ ├── create.ts13│ │ └── update.ts14│ ├── schemas/15│ │ └── user.schema.ts16│ └── tests/17│ ├── users.controller.test.ts18│ └── users.service.test.ts19├── package.json20├── tsconfig.json21├── .prettierrc22└── .gitignoreGraphQL project
1my-app/2├── src/3│ ├── launch.ts4│ ├── modules.ts5│ ├── graphql/6│ │ ├── graphql.executor.ts7│ │ ├── graphql.handler.ts8│ │ ├── graphql.resolvers.ts9│ │ └── graphql.schema.ts10│ └── modules/11│ └── users/12│ ├── users.module.ts13│ ├── users.resolver.ts14│ ├── users.service.ts15│ ├── graphql-schema/16│ │ └── users.graphql17│ └── tests/18│ ├── users.resolver.test.ts19│ └── users.service.test.ts20└── package.jsonInstall dependencies
Navigate to your newly created project directory and install its dependencies.
1cd my-app2bun installRun the application
Start your development server using the script provided by the generated project.
1bun run devThe generated application listens on port 4000. Open your browser or API client and visit:
1http://localhost:4000Install LykosJS in an existing project
If you already have a Bun project, you can install the framework package directly instead of using the CLI.
1bun init2bun add lykosjsImport the Lykos class from the lykosjs package to create your application.
1import { Lykos } from "lykosjs";2 3const app = new Lykos();4 5app.GET("/", async (ctx, reply) => {6 return reply.send("Welcome to LykosJS 🐺");7});8 9app.listen(4000, () => {10 console.log("LykosJS is running at http://localhost:4000");11});