New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

postcli-dev

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcli-dev - npm Package Compare versions

Comparing version
1.0.0
to
1.0.1
+5
-5
package.json
{
"name": "postcli-dev",
"version": "1.0.0",
"version": "1.0.1",
"description": "PostCLI - Terminal API Request Tester",
"homepage": "https://github.com/Souvik-Dutta12/DevGuruCLI#readme",
"homepage": "https://github.com/Souvik-Dutta12/postCLI#readme",
"bugs": {
"url": "https://github.com/Souvik-Dutta12/DevGuruCLI/issues"
"url": "https://github.com/Souvik-Dutta12/postCLI/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Souvik-Dutta12/DevGuruCLI.git"
"url": "git+https://github.com/Souvik-Dutta12/postCLI.git"
},

@@ -18,3 +18,3 @@ "keywords": [

],
"license": "ISC",
"license": "MIT",
"author": "Souvik Dutta",

@@ -21,0 +21,0 @@ "type": "module",

+37
-207

@@ -1,200 +0,34 @@

��# PostCLI - Terminal API Request Tester
��# =؀� PostCLI-dev
## Project Overview
**`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`**.
**PostCLI** is a lightweight, advanced CLI tool for testing APIs directly from the terminal, providing an interactive and visually appealing experience inspired by Postman. It supports GET, POST, PUT, DELETE requests, environment management, workflow chaining, history tracking, and response formatting.
---
## Tech Stack
## (' Key Features
**Core:**
- 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
* Node.js (runtime)
* Commander.js (multi-command CLI)
* Axios (HTTP requests)
* Chalk (Postman-themed color styling)
* Ora (spinners for requests)
* Inquirer.js (interactive prompts)
* Boxen (boxed messages in terminal)
* Conf (store endpoints, envs, workflows)
---
**Advanced Features / Extras:**
## �&� Installation
* Listr2 (workflow task lists)
* Figlet (ASCII art banners)
* cli-table3 (formatted tables)
* Node-cache / Lowdb (offline request history)
* JSON-Beautify / Pretty-Print (format JSON responses)
Install **PostCLI-dev** globally from npm:
**Color Palette (Postman-inspired):**
| Element | Color |
| ----------------------- | -------------------- |
| GET Request | #00A2FF (blue) |
| POST Request | #FF6C37 (orange) |
| PUT Request | #FFCA36 (yellow) |
| DELETE Request | #FF3B30 (red) |
| Response Status 2xx | #4CAF50 (green) |
| Response Status 4xx/5xx | #FF3B30 (red) |
| Info / Logs | #CCCCCC (light grey) |
| Background / Box | #1E1E1E (dark grey) |
```bash
npm install -g postcli-dev
```
---
Once installed, run:
## File Structure
```
postcli/
%% bin/
% %% postcli.js # CLI entry point
%% src/
% %% commands/
% % %% get.js
% % %% post.js
% % %% put.js
% % %% delete.js
% % %% save.js
% % %% list.js
% % %% remove.js
% % %% env.js
% % %% workflow.js
% % %% history.js
% % %% stats.js
% %% utils/
% % %% requestHandler.js
% % %% logger.js
% % %% formatJson.js
% % %% colors.js
% % %% spinner.js
% %% config/
% %% conf.js # store saved endpoints, envs, workflows
%% package.json
%% README.md
postcli
```
to launch the CLI.
---
## Expanded Phased Roadmap
### Phase 0: Project Setup & CLI Scaffolding
**Goal:** Prepare the project structure, CLI entry, and dependencies.
* Initialize Node.js project.
* Set up ES Modules.
* Install dependencies.
* Create CLI entry with `#!/usr/bin/env node`.
* Set up Commander.js with basic version and help.
* Add ASCII banner with Figlet.
* Establish modular file structure.
### Phase 1: Core Request Commands
**Goal:** Implement GET, POST, PUT, DELETE requests.
* Commands: `get`, `post`, `put`, `delete`.
* Axios for requests.
* Ora spinners during request execution.
* JSON response formatting.
* Color-coded methods and status codes.
* Error handling with Boxen.
### Phase 2: Endpoint & Environment Management
**Goal:** Save endpoints and environment variables for reuse.
* Commands: `save`, `list`, `remove`, `env set/get/list`.
* Conf for persistent storage.
* Display in formatted tables (cli-table3).
* Support dynamic environment variables.
### Phase 3: History & Response Management
**Goal:** Track all API requests and save responses.
* Commands: `history`, `history use`, `response save`, `clear`.
* Store timestamp, URL, method, body, status code.
* Color-coded table display.
* Reuse previous requests.
* Export responses as JSON.
### Phase 4: Workflow Creation & Chaining
**Goal:** Chain multiple requests for complex API workflows.
* Commands: `workflow create`, `workflow save`, `workflow run`.
* Interactive workflow builder (Inquirer.js).
* Sequential execution with Listr2.
* Real-time response logs for each step.
* Support dynamic dependencies between requests.
### Phase 5: Stats, Logs & Terminal UX
**Goal:** Polish terminal visuals and provide analytics.
* Commands: `stats`, `logs`, `clear`.
* Boxen and cli-table3 for display.
* JSON response enhancements: color-coded and indented.
* Consistent Postman-themed colors.
* Interactive selection menus for endpoints/workflows.
### Phase 6: Final Testing & Release
**Goal:** Ensure stability, optimization, and release readiness.
* Test all commands in multiple scenarios.
* Validate edge cases.
* Optimize spinners and JSON formatting.
* Complete README with examples.
* Publish CLI locally with `npm link` and globally with `npm publish`.
---
## CLI Commands (e"10)
1. `postcli get <url>`  Make GET request
2. `postcli post <url>`  Make POST request
3. `postcli put <url>`  Make PUT request
4. `postcli delete <url>`  Make DELETE request
5. `postcli save <name> <url>`  Save endpoint
6. `postcli list`  List saved endpoints
7. `postcli remove <name>`  Remove endpoint
8. `postcli env set <key> <value>`  Set environment variable
9. `postcli env get <key>`  Get environment variable
10. `postcli env list`  List environment variables
11. `postcli workflow create`  Create a chained request workflow
12. `postcli workflow run <file>`  Run saved workflow
13. `postcli workflow save <name>`  Save workflow
14. `postcli history`  Show request history
15. `postcli history use <id>`  Reuse a request from history
16. `postcli response save <name>`  Save response to file
17. `postcli stats`  Show request statistics
18. `postcli logs`  Show detailed logs
19. `postcli clear`  Clear history/logs
---
## Features & Highlights
* Supports GET, POST, PUT, DELETE requests
* Save common endpoints and environment variables
* JSON response formatting with Postman-themed colors
* Workflow creation and chaining for complex API testing
* History tracking and reusable requests
* Terminal UX: spinners, ASCII banners, Boxen boxes, tables
* Interactive CLI prompts with Inquirer.js
---
## Goals
* Deliver a full-featured, Postman-like experience entirely in terminal.
* Maintain a visually appealing, color-coded interface.
* Provide advanced workflow chaining and request management for developers.
* Build a professional portfolio project demonstrating CLI development, Node.js, and API handling.
# PostCLI Documentation

@@ -204,4 +38,2 @@

---
## HTTP Requests

@@ -263,28 +95,26 @@

| `postcli history clear` | Clear all stored request history. |
| `postcli replay src/responses/auth/login.json` | Replay the req . |
### Example Usage
| `postcli response save <index>` | Save the response using history index. |
| `postcli replay src/responses/auth/login.json` | Replay the response. |
```bash
# View history
postcli history
# Reuse the first request
postcli history use 0
### Stats and logs Commands
| Command | Description |
|---------|-------------|
| `postcli stats` | Show Stats |
| `postcli logs` | Show Logs |
| `postcli clear` | Clear all stored request history and stats. |
# Clear all history
postcli history clear
# Save response of the first request
postcli response save 0 first_response
# Replay the req .
postcli replay src/responses/auth/login.json
| Option | Description |
| ------------------- | ------------------------------------------------- |
| `--help` | Show help and available commands |
| `--version` | Display the current CLI version |
---
## Data Input for POST, PUT, PATCH
# Conclusion
- Supports text fields, JSON objects, arrays, and file uploads.
- File prefix: `file:`
Example:
```bash
postcli POST {{BASEURL}}/upload
`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! =؀�