CLI Reference
Commands match the kashvi Cobra CLI. Install the binary with go install (see below).
Install
go install github.com/shashiranjanraj/kashvi/cmd/kashvi@latestVersion
kashvi version
Print the framework version (same string as app.Version).
kashvi version
# → Kashvi Framework v1.x.xServer & routes
In project mode these delegate to your app (same as go run . serve, etc.). Your app.Run() also accepts: serve, start, run, migrate, seed, route:list, version.
kashvi run · kashvi serve · kashvi start
Start the HTTP server (and gRPC alongside HTTP per your app config). Aliases are equivalent.
kashvi serve
# → delegates to: go run . servekashvi route:list
Print all named routes in a sorted table (delegates to your project).
kashvi route:list
METHOD PATH NAME
------ ---- ----
DELETE /api/posts/{id} posts.destroy
GET /api/health health
GET /api/posts posts.index
GET /api/posts/{id} posts.show
POST /api/posts posts.store
PUT /api/posts/{id} posts.updatekashvi build (framework clone only)
Compiles the sample server in the framework repo to ./kashvi via go build -o kashvi ./cmd/server. For your own project, use go build -o myapp . or your CI pipeline.
kashvi grpc:serve (framework clone only)
Start only the gRPC server (health + reflection) using framework config. HTTP apps normally start gRPC with serve.
kashvi grpc:serveDatabase
kashvi migrate
Run all pending migrations (delegates to your project).
kashvi migratekashvi migrate:rollback
Rollback the last batch of migrations.
kashvi migrate:status
Show which migrations have been applied.
kashvi seed
Run registered seeders.
kashvi seedWorkers & scheduler
kashvi queue:work
Start queue workers (-w / --workers flag, default 5).
kashvi queue:work
kashvi queue:work -w 10kashvi schedule:run
Run the task scheduler until SIGINT/SIGTERM.
kashvi schedule:runNew project
kashvi new [ProjectName]
Creates a directory, runs go mod init, pulls Kashvi, and scaffolds main.go, app/routes/api.go, api_test.go, and .env files.
kashvi new myproject
cd myproject
kashvi serveScaffold commands
Generators use embedded text/template stubs. They do not overwrite existing files. Override templates by placing files under .kashvi/stubs/ (same names as in the framework: model.stub, dto.stub, repository.stub, controller.stub, resource_controller.stub, service.stub, migration.stub, seeder.stub, test_scenario.stub).
kashvi make:resource [Name] (alias: make:crud)
Full CRUD stack in one command: model, DTOs, repository, controller, service, migration, seeder, test scenarios.
kashvi make:resource Post
kashvi make:crud Product --authorize --cacheFlags:
--authorize— adds auth middleware placeholders in the printed route snippet and stubs.--cache— adds cache-related placeholders in generated controller code.
Typical output paths for Product:
app/models/product.goapp/dto/product_dto.go(CreateProductRequest,UpdateProductRequest, …)app/repositories/product.goapp/controllers/product_controller.goapp/services/product_service.godatabase/migrations/TIMESTAMP_create_products_table.godatabase/seeders/product_seeder.gotestdata/product_scenarios.json
kashvi make:dto [Name]
Request/response DTOs only — app/dto/<name>_dto.go.
kashvi make:dto Orderkashvi make:repository [Name]
Repository embedding repository.Base[T] — app/repositories/<name>.go.
kashvi make:model [Name]
kashvi make:model Commentkashvi make:controller [Name]
kashvi make:controller Commentkashvi make:service [Name]
kashvi make:service Billingkashvi make:migration [name]
Creates database/migrations/<timestamp>_<slug>.go.
kashvi make:seeder [Name]
Creates database/seeders/<lower>_seeder.go (name lowercased).
Discoverability
kashvi --help
kashvi make:resource --help