@outscope/cli
v2.0.1
Published
CLI tool for scaffolding @outscope/nova projects
Downloads
248
Maintainers
Readme
@outscope/cli
CLI for scaffolding and generating Nova 2.0 projects.
Install
pnpm add -g @outscope/cliYou can also use:
npx @outscope/cli create my-appCommands
outscope create [project-name]
osp create [project-name]
outscope generate [type] [name]
osp generate [type] [name]
osp g [type] [name]Templates
nova-api- decorator-based API using@outscope/novanova-fn-api- functional API using@outscope/nova-fnturbo-nova- turborepo with a decorator API app and shared route/schema packagesturbo-nova-fn- turborepo with a functional API app and shared route/schema packages
The CLI keeps the GitHub download flow. Template names resolve to templates/* paths in this repository.
outscope create my-api --template nova-api
outscope create my-workspace --template turbo-novaFor CI or scripted smoke tests:
outscope create my-api --template nova-api --yes --skip-outdated-check --skip-repomix
outscope create my-api --template nova-api --yes --install-dependencies --skip-repomixCode Generation
outscope g feature planetCreates:
src/features/planets/
planet.controller.ts
planet.service.ts
planet.repository.ts
index.ts
src/routes/planet.ts
src/schemas/planet.tsGenerated controllers use Nova 2.0 APIs:
import { Controller, Handle, Public } from "@outscope/nova";
import { planetRoutes } from "@routes/planets";
@Controller()
export class PlanetController {
@Public()
@Handle(planetRoutes.list)
list(input, ctx) {
return planetService.list(input);
}
}Development
pnpm install
pnpm --filter @outscope/cli check-types
pnpm --filter @outscope/cli test
pnpm --filter @outscope/cli build