Documentation
Everything you need to know about akuma. Only what's built and works.
What is akuma?
Akuma is a CLI tool that creates mock API servers from a YAML config file. It runs a real HTTP server backed by SQLite, seeds it with example data, and gets out of your way.
You define endpoints and response schemas. Akuma handles the server, the database, and the data.
How it works
- Run
akuma initto create aakuma.ymlconfig file - Define your endpoints and response shapes in the YAML
- Run
akuma startto spin up the server - Hit your endpoints from your frontend or tests
Two types of responses
Each response says which kind it is. There's no guessing. Static responses live under an inline: key and return JSON exactly as you define it. Good for status endpoints, config, or anything that doesn't need a database.
Schema-backed responses use schema: to reference a named data model. Akuma creates SQLite tables, seeds them with example data, and serves real database queries. Models can reference other models to express relationships between data, and write methods (POST/PATCH/DELETE) mutate those tables.
Next steps
- Getting started - Install and run your first mock server
- Static responses - Fixed JSON with
inline: - Data models - Schemas, types, and seeding
- Relationships - Connect your data with foreign keys
- Endpoints - Lists and item lookups
- Mutations - Create, update, and delete with
POST/PATCH/DELETE - Errors - Custom, reusable, per-route error responses
- Commands - All available CLI commands