Go from zero to a running Ooneex application — install the CLI, scaffold the project, and build your first resource with the CLI or an AI prompt.
This guide takes you from an empty machine to a working Ooneex application with its first domain. You install the CLI, scaffold the project, then build a Movie resource — a module, an entity, a repository, and a controller.You can build that resource in two ways: by running the CLI commands yourself, or by handing a single detailed prompt to your AI agent. Both produce the same result.
Install @ooneex/cli globally with Bun. It exposes two interchangeable binaries, ooneex and its short alias oo.
bun add -g @ooneex/cli
2
Verify
Confirm the CLI is available:
ooneex help
Prefer not to install globally? Run any command through bunx instead, for
example bunx @ooneex/cli@latest app:create. See
Installation for Zsh completions and more.
This creates the app and shared modules, the entrypoint, the shared database, roles, Docker files, and config, then installs all dependencies. You are also offered optional CI/CD files for GitHub, GitLab, or Bitbucket.Move into the project and start it:
cd movie-appooneex app:start
app:start brings up the Docker services defined by the app module, then runs every api, microservice, and spa module concurrently — api and microservice modules serve their entrypoint with hot reload, while spa modules run their dev server.
The environment file is generated at modules/shared/.env.yml. Edit it to
point at your database, Redis, and other services before starting.
Pass a type flag to narrow what runs. A bare flag keeps every module of that type; --<type>=a,b keeps only the named ones. Flags combine, so you can start several types at once.
ooneex app:start --api # only the api modulesooneex app:start --microservice # only the microservice modulesooneex app:start --spa # only the spa modulesooneex app:start --microservice=billing,payments # only the named microservicesooneex app:start --api --spa # the api and spa modules together
The shared Docker stack still comes up first regardless of the flags — they only narrow which modules are run.When you’re done, stop the app:
ooneex app:stop
app:stop brings down the app module’s shared Docker stack with docker compose down. The running module processes — spa dev servers and hot-reloaded entrypoints — stop when you interrupt the app:start process with Ctrl+C. A type flag narrows the stop to the named modules that ship their own docker-compose.yml:
ooneex app:stop --microservice=billing # bring down a microservice's own Docker stack
app:create generates a Bun workspace organized around modules. Every module under modules/<name>/ owns its own controllers, services, repositories, entities, and config — a self-contained vertical slice of your domain.
With the app scaffolded, build the Movie domain. Choose the path that fits how you work — the CLI walks you through each artifact, while the AI prompt produces the whole slice in one pass.
AI prompt
CLI commands
Your project ships AI skills for every create command. Initialize them once, then give your agent a single prompt and it drives the module:create, entity:create, repository:create, and controller:create skills for you.Initialize the skills for your agent:
Claude
Codex
ooneex claude:init
ooneex codex:init
Then copy this prompt into your agent:
Build a complete `Movie` domain in my Ooneex application using theOoneex CLI create skills. Follow the project's module conventions andgenerate the matching tests for every artifact.1. Module - Create a `movie` module and register it into the `app` destination.2. Entity — `Movie`, mapped to the `movies` table, with these columns: - `title` varchar(255), required, indexed - `slug` varchar(255), required, unique - `description` text, nullable - `releaseYear` int, required - `durationMin` int, nullable (runtime in minutes) - `rating` numeric(3,1), nullable (0.0–10.0) - `genre` varchar(50), nullable - `isPublished` boolean, default false Keep the generated audit columns (id, timestamps, soft delete).3. Repository — `Movie` - Keep the generated CRUD methods. - Enable the `q` text search in `find` to match on `title`. - Add `findBySlug(slug: string)` returning a single movie or null.4. Controllers under `/movies`, each thin, validated, and restricted to `ROLE_USER`: - `MovieList` GET /movies list with pagination + `q` search - `MovieRead` GET /movies/:id fetch one by id - `MovieCreate` POST /movies validate the payload, persist - `MovieUpdate` PUT /movies/:id partial update - `MovieDelete` DELETE /movies/:id soft deleteWire payload, params, query, and response validation on each route, keepthe controllers delegating to the repository, and run the formatter,linter, and tests when done.
The agent scaffolds each artifact with the CLI, fills in the columns, methods, routes, and validation, and writes the tests — producing the same module structure shown in the CLI tab.
Run the create commands in order. Each one scaffolds the class plus a mirrored test file and registers it into the module.
1
Create the module
Generates modules/movie/ and registers it into AppModule (and its entities into SharedModule).
Generates an HTTP controller, registers it in the module’s controllers array, and configures the route. Repeat with different names, paths, and methods for each endpoint.