@blockyfy/stg-cli 0.4.0
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 +57 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3987 -0
- package/dist/index.js.map +1 -0
- package/package.json +56 -0
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# @blockyfy/stg-cli (Pretest CLI)
|
|
2
|
+
|
|
3
|
+
AI firewall CLI that mutates proprietary code identifiers before sending to LLM APIs. Your code hits AI naked — Pretest fixes that.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @blockyfy/stg-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quickstart
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Initialize config in your project
|
|
15
|
+
pretest init
|
|
16
|
+
|
|
17
|
+
# Start the proxy (default port 9339)
|
|
18
|
+
pretest start
|
|
19
|
+
|
|
20
|
+
# Point your AI tools at the proxy
|
|
21
|
+
export ANTHROPIC_BASE_URL=http://localhost:9339
|
|
22
|
+
export OPENAI_BASE_URL=http://localhost:9339/v1
|
|
23
|
+
|
|
24
|
+
# Scan a file for identifiers and secrets
|
|
25
|
+
pretest scan src/
|
|
26
|
+
|
|
27
|
+
# Mutate a file and print to stdout
|
|
28
|
+
pretest mutate src/app.ts
|
|
29
|
+
|
|
30
|
+
# Reverse mutations using stored map
|
|
31
|
+
pretest reverse mutated-output.ts
|
|
32
|
+
|
|
33
|
+
# View audit log
|
|
34
|
+
pretest audit --json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Commands
|
|
38
|
+
|
|
39
|
+
| Command | Description |
|
|
40
|
+
|---------|-------------|
|
|
41
|
+
| `pretest init` | Scan cwd, create .pretest/ config |
|
|
42
|
+
| `pretest start` | Start proxy on :9339 |
|
|
43
|
+
| `pretest scan <file\|dir>` | Scan for identifiers + secrets |
|
|
44
|
+
| `pretest mutate <file>` | Redact scanner hits (secrets/PII), then mutate identifiers; print to stdout |
|
|
45
|
+
| `pretest reverse <file>` | Reverse using stored map |
|
|
46
|
+
| `pretest audit` | Print audit log |
|
|
47
|
+
| `pretest version` | Print version |
|
|
48
|
+
|
|
49
|
+
## Exit Codes
|
|
50
|
+
|
|
51
|
+
- `0` -- Success
|
|
52
|
+
- `1` -- Error
|
|
53
|
+
- `2` -- Secrets found
|
|
54
|
+
|
|
55
|
+
## Learn More
|
|
56
|
+
|
|
57
|
+
Package page and release notes: [https://www.npmjs.com/package/@blockyfy/stg-cli](https://www.npmjs.com/package/@blockyfy/stg-cli).
|
package/dist/index.d.ts
ADDED