user@neofetch:~$ curl -I neofetch.dev/api
API Docs
Programmatic access to MOTD generation and discovery. All endpoints return JSON.
GET /php/api.php?action=count
Retrieve the total number of scripts created since the platform launch.
| Parameter | Type | Required |
|---|---|---|
| action | string | Yes (count) |
Live Response
{ "click": "Execute" }
GET /php/api.php?action=list
Get a list of the 20 most recently created public scripts.
| Parameter | Type | Required |
|---|---|---|
| action | string | Yes (list) |
Live Response
{ "click": "Execute" }
POST /php/api.php?action=generate
Generate a new MOTD script. Requires a JSON body and a valid CSRF token header if called from the web UI.
Request Body (JSON)
{
"ascii": "arch",
"theme": "dracula",
"fields": ["os", "kernel", "uptime"],
"separator": "dashes",
"hostname": "user@arch",
"message": "Welcome back!"
}
| Field | Type | Description |
|---|---|---|
| ascii | string | One of: arch, tux, ubuntu, debian, etc. |
| theme | string | One of: dracula, nord, synthwave, etc. |
| layout | string | One of: classic, reversed, stacked, minimal. |
| fields | array | List of info field IDs. |
GET /php/api.php?action=download&id={ID}
Fetch the metadata for a specific script by its ID.
| Parameter | Type | Required |
|---|---|---|
| action | string | Yes (download) |
| id | string | Yes (8-12 alphanumeric chars) |