| Crates.io | chimera-cli |
| lib.rs | chimera-cli |
| version | 0.6.9 |
| created_at | 2025-06-27 07:16:58.732716+00 |
| updated_at | 2025-07-24 11:28:54.171827+00 |
| description | A Mock API for every need and more |
| homepage | https://github.com/ams003010/chimera |
| repository | https://github.com/ams003010/chimera |
| max_upload_size | |
| id | 1728268 |
| size | 157,861 |

Chimera is a blazing-fast, configurable JSON server built with Axum. It allows you to serve JSON files as APIs with full CRUD support, sorting, pagination, simulated latency, and route-based retrieval. Ideal for prototyping, mock APIs, or rapid development.
Now with automatic data generation, null value simulation, long path support, form submission, and CORS control, Chimera helps you mock realistic and dynamic API responses effortlessly.
jsoncsvHTTPWebsockets/api/v2/data are supported.POST form submissions at /submit-form.chimera.cors file.--quiet flag.cargo install chimera-cli
Download and run directly:
# Download the latest release
Invoke-WebRequest -Uri "https://github.com/AMS003010/Chimera/releases/latest/download/chimera-windows.exe.zip" -OutFile "chimera-windows.zip"
# Extract the zip file
Expand-Archive -Path "chimera-windows.zip" -DestinationPath "."
# Rename the binary
Rename-Item chimera-windows.exe chimera-cli.exe
# Run chimera
.\chimera-cli.exe --path data.json
# Download and extract the latest Linux binary
curl -sL https://github.com/AMS003010/Chimera/releases/latest/download/chimera-linux.zip -o chimera-linux.zip
unzip chimera-linux.zip
chmod +x chimera-linux
mv chimera-linux chimera-cli
./chimera-linux --path data.json
# Download the latest .deb package
curl -s https://api.github.com/repos/AMS003010/Chimera/releases/latest | jq -r '.assets[] | select(.name | endswith("_amd64.deb")) | .browser_download_url' | xargs wget
# Install the package
sudo dpkg -i chimera-cli_*_amd64.deb
# Run chimera (now available system-wide)
chimera-cli --path data.json
# Download and extract the latest macOS binary
curl -sL https://github.com/AMS003010/Chimera/releases/latest/download/chimera-macos.zip -o chimera-macos.zip
unzip chimera-macos.zip
chmod +x chimera-macos
mv chimera-macos chimera-cli
./chimera-cli --path data.json
git clone https://github.com/AMS003010/Chimera.git
cd Chimera
cargo install --path .
chimera-cli --path data.json
Here's all the available CLI commands (Websocket mode)
chimera-cli.exe --path .\data.json websocket: Start the Chimera Websocket server with data from data.json at default port 8080
chimera-cli.exe --path .\data.csv websocket: Start the Chimera Websocket server with schema from data.csv at default port 8080
chimera-cli.exe --path .\data.json websocket --port 4000: Start the Chimera server at port 4000
chimera-cli.exe --path .\data.json websocket --sort products desc id: Sort records in /products route by id in desc order
chimera-cli.exe --path .\data.json websocket --page 3: Start server with the records paginated with a factor 3
chimera-cli.exe --path .\schema.json websocket -X: Enable automatic data generation using schema from schema.json
chimera-cli.exe --path .\data.json websocket --cors: Enable CORS and allow only domains from chimera.cors file
chimera-cli.exe --path --quiet .\data.json websocket: Disable runtime logs
[!NOTE] Use multiple arguments together for more diverse control
| Endpoint | Description |
|---|---|
/{route} |
Establish a connection |
| Message | format | Behaviour |
|---|---|---|
| * (any text) | text | Echo back the message |
{"action": "connections"} |
json | Get all active connections |
{"action": "refresh"} |
json | Get data |
With the -X flag, Chimera can generate data on the fly using a schema JSON structure like:
{
"routes": [
{
"path":"api/v2/data",
"no_of_entries": 2,
"schema": {
"id": "id",
"created_on": "date",
"mssg": "lorem"
},
"null_percentage": 0
},
{
"path":"products",
"no_of_entries": 700,
"schema": {
"id": "id",
"rsnd": "integer",
"name": "name",
"probability": "boolean",
"date": "datetime",
"desc": "lorem"
},
"null_percentage": 0
},
{
"path":"api/products",
"no_of_entries": 70,
"schema": {
"id": "id",
"rsnd": "integer",
"name": "name",
"probability": "boolean",
"date": "datetime",
"desc": "lorem"
},
"null_percentage": 0
}
]
}
Pass this JSON file as an argument to --path
path: Name of the route
no_of_entries: Number of mock entries to generate
schema: Define fields and their data type
name: Random nameid: Random numberinteger: Random numberdate: Date in DD-MM-YYYY formatdatetime: Date in DD-MM-YYYYTHH:MM:SS formatlorem: Random textstring: Random wordboolean: Random boolean valuenull_percentage: Percentage of fields and rows to be randomly set as null
data.csv)path,no_of_entries,null_percentage,schema
api/v2/data,200,0,"{""id"":""id"",""created_on"":""date"",""mssg"":""lorem""}"
products,700,90,"{""id"":""id"",""rsnd"":""integer"",""name"":""name"",""probability"":""boolean"",""date"":""datetime"",""desc"":""lorem""}"
api/products,300,0,"{""id"":""id"",""rsnd"":""integer"",""name"":""name"",""probability"":""boolean"",""date"":""datetime"",""desc"":""lorem""}"
data.json){
"data":[
{
"id":1,
"created_on":"25-03-24",
"mssg":"Why spiders? Why couldnโt it be โfollow the butterfliesโ?"
},
{
"id":2,
"created_on":"02-11-24",
"mssg":"He can run faster than Severus Snape confronted with shampoo."
}
],
"api/products": [
{
"id":80,
"name": "veritaserum"
},
{
"id":40,
"name": "polyjuice potion"
},
{
"id":60,
"name": "felix felicis"
}
]
}
schema.json){
"routes": [
{
"path":"api/v2/data",
"no_of_entries": 2,
"schema": {
"id": "id",
"created_on": "date",
"mssg": "lorem"
},
"null_percentage": 0
},
{
"path":"products",
"no_of_entries": 700,
"schema": {
"id": "id",
"rsnd": "integer",
"name": "name",
"probability": "boolean",
"date": "datetime",
"desc": "lorem"
},
"null_percentage": 0
},
{
"path":"api/products",
"no_of_entries": 70,
"schema": {
"id": "id",
"rsnd": "integer",
"name": "name",
"probability": "boolean",
"date": "datetime",
"desc": "lorem"
},
"null_percentage": 0
}
]
}
Here's all the available CLI commands (HTTP mode)
chimera-cli.exe --path .\data.json http: Start the Chimera HTTP server with data from data.json at default port 8080
chimera-cli.exe --path .\data.csv http: Start the Chimera HTTP server with schema from data.csv at default port 8080
chimera-cli.exe --path .\data.json http --port 4000: Start the Chimera server at port 4000
chimera-cli.exe --path .\data.json http --sort products desc id: Sort records in /products route by id in desc order
chimera-cli.exe --path .\data.json http --page 3: Start server with the records paginated with a factor 3
chimera-cli.exe --path .\data.json http --latency 100: Simulate latency of 100 ms
chimera-cli.exe --path .\schema.json http -X: Enable automatic data generation using schema from schema.json
chimera-cli.exe --path .\data.json http --cors: Enable CORS and allow only domains from chimera.cors file
chimera-cli.exe --path --quiet .\data.json http: Disable runtime logs
[!NOTE] Use multiple arguments together for more diverse control
To enable CORS, create a file named chimera.cors in the same directory as the binary with allowed domain(s):
http://localhost:3000
https://example.com
https://api.example.com
https://*.example.org
http://127.0.0.1:8080
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Health check |
GET |
/{route} |
Retrieve all data under a route |
GET |
/{route}/{id} |
Retrieve a specific record by ID |
POST |
/{route} |
Add a record under a route |
DELETE |
/{route} |
Delete all records under a route |
DELETE |
/{route}/{id} |
Delete a specific record by ID |
PUT |
/{route}/{id} |
Replace a specific record by ID |
PATCH |
/{route}/{id} |
Partially update a specific record by ID |
POST |
/submit-form |
Handle form submissions (URL-encoded) |
With the -X flag, Chimera can generate data on the fly using a schema JSON structure like:
{
"routes": [
{
"path":"api/v2/data",
"no_of_entries": 2,
"schema": {
"id": "id",
"created_on": "date",
"mssg": "lorem"
},
"null_percentage": 0
},
{
"path":"products",
"no_of_entries": 700,
"schema": {
"id": "id",
"rsnd": "integer",
"name": "name",
"probability": "boolean",
"date": "datetime",
"desc": "lorem"
},
"null_percentage": 0
},
{
"path":"api/products",
"no_of_entries": 70,
"schema": {
"id": "id",
"rsnd": "integer",
"name": "name",
"probability": "boolean",
"date": "datetime",
"desc": "lorem"
},
"null_percentage": 0
}
]
}
Pass this JSON file as an argument to --path
path: Name of the route
no_of_entries: Number of mock entries to generate
schema: Define fields and their data type
name: Random nameid: Random numberinteger: Random numberdate: Date in DD-MM-YYYY formatdatetime: Date in DD-MM-YYYYTHH:MM:SS formatlorem: Random textstring: Random wordboolean: Random boolean valuenull_percentage: Percentage of fields and rows to be randomly set as null
data.csv)path,no_of_entries,null_percentage,schema
api/v2/data,200,0,"{""id"":""id"",""created_on"":""date"",""mssg"":""lorem""}"
products,700,90,"{""id"":""id"",""rsnd"":""integer"",""name"":""name"",""probability"":""boolean"",""date"":""datetime"",""desc"":""lorem""}"
api/products,300,0,"{""id"":""id"",""rsnd"":""integer"",""name"":""name"",""probability"":""boolean"",""date"":""datetime"",""desc"":""lorem""}"
data.json){
"data":[
{
"id":1,
"created_on":"25-03-24",
"mssg":"Why spiders? Why couldnโt it be โfollow the butterfliesโ?"
},
{
"id":2,
"created_on":"02-11-24",
"mssg":"He can run faster than Severus Snape confronted with shampoo."
}
],
"api/products": [
{
"id":80,
"name": "veritaserum"
},
{
"id":40,
"name": "polyjuice potion"
},
{
"id":60,
"name": "felix felicis"
}
]
}
schema.json){
"routes": [
{
"path":"api/v2/data",
"no_of_entries": 2,
"schema": {
"id": "id",
"created_on": "date",
"mssg": "lorem"
},
"null_percentage": 0
},
{
"path":"products",
"no_of_entries": 700,
"schema": {
"id": "id",
"rsnd": "integer",
"name": "name",
"probability": "boolean",
"date": "datetime",
"desc": "lorem"
},
"null_percentage": 0
},
{
"path":"api/products",
"no_of_entries": 70,
"schema": {
"id": "id",
"rsnd": "integer",
"name": "name",
"probability": "boolean",
"date": "datetime",
"desc": "lorem"
},
"null_percentage": 0
}
]
}
This project is maintained by @AMS003010.
This project is licensed under the MIT License. See the LICENSE file for details.