postcli-dev
v1.0.2
Published
PostCLI - Terminal API Request Tester
Readme
🚀 PostCLI-dev
PostCLI is a lightweight yet powerful Postman-like CLI tool for testing APIs directly from your terminal. It supports all major HTTP methods (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS), environment management, endpoint saving, workflow chaining, and history tracking — all with a modern, colorful, and interactive terminal UI.
✨ Key Features
- Full HTTP support: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
- Save and reuse endpoints easily
- Manage environment variables dynamically (
{{VAR}}syntax) - Track request history and reuse previous calls
- Save responses for later replay
- Beautiful terminal UX with ASCII banners, colors, and interactive prompts
- 100% Node.js-powered — fast and cross-platform
⚙️ Installation
Install PostCLI-dev globally from npm:
npm install -g postcli-devOnce installed, run:
postclito launch the CLI.
PostCLI Documentation
PostCLI is a powerful CLI tool to send HTTP requests, manage endpoints, and handle environment variables similar to Postman.
HTTP Requests
| Command | Description | Example |
|---------|-------------|---------|
| GET | Send a GET request to a URL or saved endpoint | postcli GET https://jsonplaceholder.typicode.com/posts/1 postcli GET {{BASEURL}}/posts/1 |
| POST | Send a POST request with JSON, objects, arrays, or file uploads | postcli POST https://jsonplaceholder.typicode.com/posts postcli POST {{BASEURL}}/posts |
| PUT | Send a PUT request with JSON, objects, arrays, or file uploads | postcli PUT https://jsonplaceholder.typicode.com/posts/1 postcli PUT {{BASEURL}}/posts/1 |
| PATCH | Send a PATCH request with JSON, objects, arrays, or file uploads | postcli PATCH https://jsonplaceholder.typicode.com/posts/1 postcli PATCH {{BASEURL}}/posts/1 |
| DELETE | Send a DELETE request | postcli DELETE https://jsonplaceholder.typicode.com/posts/1 postcli DELETE {{BASEURL}}/posts/1 |
| HEAD | Send a HEAD request to get headers only | postcli HEAD https://jsonplaceholder.typicode.com/posts postcli HEAD {{BASEURL}}/posts |
| OPTIONS | Send an OPTIONS request | postcli OPTIONS https://jsonplaceholder.typicode.com/posts postcli OPTIONS {{BASEURL}}/posts |
Endpoint Management
You can save, list, and remove named endpoints for reuse.
| Command | Description | Example |
|---------|-------------|---------|
| save | Save an endpoint with a friendly name and HTTP method | postcli save getPosts GET {{BASEURL}}/posts |
| list | List all saved endpoints | postcli list |
| remove | Remove a saved endpoint by name | postcli remove getPosts |
Saved endpoints now store both the method and the URL.
Environment Variables
Manage dynamic environment variables with easy {{VAR}} substitution.
| Command | Description | Example |
|---------|-------------|---------|
| env set | Set or update an environment variable | postcli env set BASEURL https://jsonplaceholder.typicode.com |
| env get | Get value of a variable | postcli env get BASEURL |
| env list | List all environment variables | postcli env list |
| env remove | Remove an environment variable | postcli env remove BASEURL |
You can use environment variables in any request URL:
Example:postcli GET {{BASEURL}}/posts/1
🕒 PostCLI History & Response Commands
This document lists all commands related to history tracking and response management in PostCLI.
History Commands
| Command | Description |
|---------|-------------|
| postcli history | View all API request history in a color-coded table. |
| postcli history use <index> | Reuse a previous request by its index in the history. |
| postcli history clear | Clear all stored request history. |
| postcli response save <index> | Save the response using history index. |
| postcli replay src/responses/auth/login.json | Replay the response. |
Stats and logs Commands
| Command | Description |
|---------|-------------|
| postcli stats | Show Stats |
| postcli logs | Show Logs |
| postcli clear | Clear all stored request history and stats. |
| Option | Description |
| ------------------- | ------------------------------------------------- |
| --help | Show help and available commands |
| --version | Display the current CLI version |
Conclusion
postcli-dev is more than just a CLI — it’s your personal assistant for managing and publishing markdown content seamlessly. Whether you're a blogger, developer, or tech writer, postcli-dev simplifies your workflow with automation, clean design, and speed.
It’s built with developers in mind — minimal setup, maximum productivity. So, get started today and bring your words to life straight from the terminal! 🚀
