bandit-cli 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1 +1,74 @@
|
|
|
1
|
-
Bandit
|
|
1
|
+
# Bandit CLI 🤠
|
|
2
|
+
> **The Swiss Army Knife for Backend Developers**
|
|
3
|
+
|
|
4
|
+
`bandit` is an interactive, high-utility terminal workspace helper built for backend developers. Instead of relying on heavy GUI clients or complex shell scripts, `bandit` lets you test APIs, benchmark endpoints, terminate locked ports, validate environment setups, and audit server health directly from your command line.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 🚀 Key Features
|
|
9
|
+
|
|
10
|
+
* **Interactive API Client**: Auto-scans your codebase (Express, Fastify, Hono, NestJS) to find route definitions, maps parameters, takes JSON payloads, prompts for Bearer Auth tokens, and displays pretty-printed HTTP responses.
|
|
11
|
+
* **High-Speed Load Benchmarker**: Benchmark any local or remote HTTP endpoint with configurable concurrency, calculating throughput (RPS), p50-p99 percentiles, and rendering a beautiful ASCII distribution chart.
|
|
12
|
+
* **Port Inspector & Process Killer**: Scans active ports, identifies the PID and process names (e.g. `node.exe`, `postgres.exe`, `ollama.exe`), and lets you terminate locked processes in one click.
|
|
13
|
+
* **Live Server Doctor**: Probes your running server for security headers, CORS wildcards, stack trace/error leakage, and payload crash handling.
|
|
14
|
+
* **Environment Variable Auditor**: Compares active `.env` files against `.env.example` to flag missing keys, empty values, and placeholder defaults before you boot.
|
|
15
|
+
* **Static Project Auditor**: Evaluates package setup, file organization, safety configs, and dependency scopes.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 📦 Installation
|
|
20
|
+
|
|
21
|
+
Install globally via npm:
|
|
22
|
+
```bash
|
|
23
|
+
npm install -g bandit-cli
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or run instantly using `npx`:
|
|
27
|
+
```bash
|
|
28
|
+
npx bandit-cli <command>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 🛠️ Usage & Commands
|
|
34
|
+
|
|
35
|
+
### 1. Interactive API Playfield
|
|
36
|
+
Find and test routes in your codebase:
|
|
37
|
+
```bash
|
|
38
|
+
bandit api
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 2. Endpoint Benchmarking
|
|
42
|
+
Run a concurrent load test on an endpoint:
|
|
43
|
+
```bash
|
|
44
|
+
bandit bench http://localhost:3000/api/users --connections 10 --requests 200
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 3. Ports Inspector
|
|
48
|
+
List processes listening on local ports and terminate them:
|
|
49
|
+
```bash
|
|
50
|
+
bandit ports
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 4. Active Server Diagnostics
|
|
54
|
+
Audit a running server's security headers and vulnerabilities:
|
|
55
|
+
```bash
|
|
56
|
+
bandit doctor http://localhost:3000
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 5. Environment variable check
|
|
60
|
+
Validate local environment configurations:
|
|
61
|
+
```bash
|
|
62
|
+
bandit env
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 6. Static Project Audit
|
|
66
|
+
Audit files, directory structure, and dependencies:
|
|
67
|
+
```bash
|
|
68
|
+
bandit audit
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 🎨 Under the Hood
|
|
74
|
+
Built with TypeScript, [Commander](https://github.com/tj/commander.js), and [@clack/prompts](https://github.com/natemoo-re/clack) for a modern, fluid interactive terminal interface.
|