Neo Client is a lightweight and colorful HTTP command-line client written in Rust.
It lets you send GET, POST, PUT, and DELETE requests directly from your terminal — perfect for testing APIs without needing external tools like Postman or curl.
- Supports GET, POST, PUT, and DELETE
- Simple CLI interface built with
clap - Colorized output with
colored - JSON pretty-printing via
serde_json - Lightweight and fast — built from scratch using TCP sockets
- Graceful fallback for non-JSON responses
git clone https://github.com/yourusername/neo_client.git
cd neo_clientcargo build --release./target/release/neo_client --helpneo_client [OPTIONS]| Flag | Description | Default | Example |
|---|---|---|---|
-u, --url |
Target host (without http://) |
— | 127.0.0.1 |
-m, --method |
HTTP method (GET, POST, PUT, DELETE) |
GET |
POST |
-p, --port |
Server port | 80 |
8000 |
-r, --route |
API route or endpoint | / |
/api/users |
-b, --body |
JSON body for POST/PUT |
— | '{"name":"nader"}' |
neo_client --url 127.0.0.1 -p 8000 -m GET -r /apiOutput:
Connected to the server!
Response Headers:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Response Body:
{
"status": "success",
"data": {
"name": "nader"
}
}
neo_client --url 127.0.0.1 -p 8000 -m POST -r /api/users -b '{"name":"nader"}'neo_client --url 127.0.0.1 -p 8000 -m PUT -r /api/users/1 -b '{"name":"updated name"}'neo_client --url 127.0.0.1 -p 8000 -m DELETE -r /api/users/1-
The CLI parses arguments using
clap -
Opens a raw TCP connection with
TcpStream -
Builds the HTTP request manually:
METHOD /route HTTP/1.1 Host: example.com Content-Type: application/json Content-Length: N -
Sends it through the socket
-
Reads the response and:
- Splits headers and body
- Pretty-prints JSON responses
- Colors headers (blue) and JSON (green)
| Crate | Purpose |
|---|---|
clap |
CLI argument parsing |
colored |
Terminal color formatting |
serde_json |
JSON parsing and formatting |
This project is licensed under the MIT License — free to use, modify, and distribute.
- Support for HTTPS (via
rustls) - File upload support (
multipart/form-data) - Save and load request profiles
- Response time and latency metrics
- Pretty colorized JSON keys and values
- Support for Auth headers (Bearer, Basic)
✅ Simple ✅ Fast ✅ Educational
A perfect project to understand how HTTP works under the hood — without any heavy dependencies.