wasper-cli 0.3.0 → 0.3.2
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 +77 -83
- package/dist/cli.js +1829 -833
- package/dist/index.js +72 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,118 +1,112 @@
|
|
|
1
1
|
# wasper-cli
|
|
2
2
|
|
|
3
|
-
A local CLI
|
|
3
|
+
A local CLI daemon + MCP server + API proxy for your OpenAPI specs.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
+
**macOS / Linux**
|
|
7
8
|
```bash
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
curl -fsSL https://studio.stroke.click/install.sh | sh
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
**Windows** — open PowerShell:
|
|
13
|
+
```powershell
|
|
14
|
+
irm https://studio.stroke.click/install.ps1 | iex
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**npm / Bun**
|
|
18
|
+
```bash
|
|
19
|
+
npm install -g wasper-cli
|
|
10
20
|
bun add -g wasper-cli
|
|
11
21
|
```
|
|
12
22
|
|
|
13
23
|
## Quick start
|
|
14
24
|
|
|
15
25
|
```bash
|
|
16
|
-
# Start
|
|
17
|
-
wasper --url https://
|
|
18
|
-
|
|
19
|
-
# Start in background
|
|
20
|
-
wasper --url <spec-url> --background
|
|
26
|
+
# Start daemon in background (returns to your shell immediately)
|
|
27
|
+
wasper up --url https://petstore.swagger.io/v2/swagger.json
|
|
21
28
|
|
|
22
|
-
#
|
|
23
|
-
wasper
|
|
29
|
+
# Run a second instance on a different port
|
|
30
|
+
wasper up --url https://api2.example.com/openapi.json --port 3389
|
|
24
31
|
|
|
25
|
-
# List
|
|
26
|
-
wasper
|
|
32
|
+
# List all running instances
|
|
33
|
+
wasper ps
|
|
27
34
|
|
|
28
|
-
#
|
|
29
|
-
wasper
|
|
35
|
+
# Check status
|
|
36
|
+
wasper status
|
|
30
37
|
|
|
31
|
-
#
|
|
32
|
-
wasper
|
|
38
|
+
# Stop all
|
|
39
|
+
wasper down --all
|
|
33
40
|
```
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## Options
|
|
42
|
+
## Commands
|
|
38
43
|
|
|
44
|
+
### Daemon
|
|
39
45
|
```
|
|
40
|
-
wasper [--url <spec>] [--port
|
|
41
|
-
wasper
|
|
42
|
-
wasper
|
|
43
|
-
wasper
|
|
44
|
-
wasper
|
|
45
|
-
wasper
|
|
46
|
-
wasper use <number|url> Start with a saved spec
|
|
47
|
-
wasper rm <number|url> Remove a spec from history
|
|
48
|
-
|
|
49
|
-
--url, -u OpenAPI spec URL or local file path
|
|
50
|
-
--port Port to listen on (default: 3388, env: WASPER_PORT)
|
|
51
|
-
--host Bind address (default: 0.0.0.0, env: WASPER_HOST)
|
|
52
|
-
--origin Public URL (env: WASPER_ORIGIN) — for self-hosting
|
|
53
|
-
--token Require bearer token on every request (env: WASPER_TOKEN)
|
|
54
|
-
--no-mcp Disable MCP endpoint
|
|
55
|
-
--no-proxy Disable HTTP proxy
|
|
56
|
-
--no-ai Disable AI chat endpoint
|
|
57
|
-
--readonly Block all non-GET upstream requests
|
|
58
|
-
--background,-b Start detached in background
|
|
46
|
+
wasper up [--url <spec>] [--port <port>] Start daemon in background
|
|
47
|
+
wasper down [--port <port>] Stop one instance
|
|
48
|
+
wasper down --all Stop all instances
|
|
49
|
+
wasper ps List all running instances
|
|
50
|
+
wasper status [--port <port>] Status of one or all
|
|
51
|
+
wasper logs [-f] [--port <port>] Tail server logs
|
|
59
52
|
```
|
|
60
53
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
wasper
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
| Basic | Username + password |
|
|
69
|
-
| API Key | Header, query param, or cookie |
|
|
70
|
-
| OAuth2 Client Credentials | Server-side token fetch with caching |
|
|
71
|
-
| OIDC | OpenID Connect discovery |
|
|
72
|
-
| Custom Headers | Any key/value headers |
|
|
73
|
-
|
|
74
|
-
Profiles let you save multiple auth configurations and switch between them with:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
# In the interactive REPL
|
|
78
|
-
/auth use <profile-name>
|
|
54
|
+
### Spec
|
|
55
|
+
```
|
|
56
|
+
wasper spec <url> [--port <port>] Load new spec on running daemon
|
|
57
|
+
wasper reload [--port <port>] Hot-reload current spec
|
|
58
|
+
wasper ls List saved spec history
|
|
59
|
+
wasper use <n|url> [--port <port>] Restart with a saved spec
|
|
60
|
+
wasper rm <n|url> Remove spec from history
|
|
79
61
|
```
|
|
80
62
|
|
|
81
|
-
|
|
63
|
+
### Features (toggle on the running daemon)
|
|
64
|
+
```
|
|
65
|
+
wasper mcp [on|off] [--port <port>]
|
|
66
|
+
wasper proxy [on|off] [--port <port>]
|
|
67
|
+
wasper ai [on|off] [--port <port>]
|
|
68
|
+
wasper readonly [on|off] [--port <port>]
|
|
69
|
+
```
|
|
82
70
|
|
|
83
|
-
|
|
71
|
+
### Auth
|
|
72
|
+
```
|
|
73
|
+
wasper auth List saved auth profiles
|
|
74
|
+
wasper auth use <name> Switch active profile
|
|
75
|
+
wasper auth none Disable auth
|
|
76
|
+
```
|
|
84
77
|
|
|
85
|
-
|
|
86
|
-
|
|
78
|
+
### System service
|
|
79
|
+
```
|
|
80
|
+
wasper service install [--port <port>] [--url <spec>]
|
|
81
|
+
wasper service uninstall
|
|
82
|
+
wasper service start | stop | status | logs
|
|
87
83
|
```
|
|
88
84
|
|
|
89
|
-
|
|
85
|
+
### Other
|
|
86
|
+
```
|
|
87
|
+
wasper update Update to latest version
|
|
88
|
+
wasper help Full command reference
|
|
89
|
+
wasper --version Print version
|
|
90
|
+
```
|
|
90
91
|
|
|
91
|
-
##
|
|
92
|
+
## Options
|
|
92
93
|
|
|
93
|
-
|
|
94
|
+
| Flag | Env var | Default |
|
|
95
|
+
|---|---|---|
|
|
96
|
+
| `--url` | `WASPER_SPEC_URL` | — |
|
|
97
|
+
| `--port` | `WASPER_PORT` | `3388` |
|
|
98
|
+
| `--host` | `WASPER_HOST` | `0.0.0.0` |
|
|
99
|
+
| `--origin` | `WASPER_ORIGIN` | — |
|
|
100
|
+
| `--token` | `WASPER_TOKEN` | — |
|
|
101
|
+
| `--no-mcp` | — | MCP on |
|
|
102
|
+
| `--no-proxy` | — | proxy on |
|
|
103
|
+
| `--no-ai` | — | AI on |
|
|
104
|
+
| `--readonly` | — | off |
|
|
94
105
|
|
|
95
|
-
|
|
106
|
+
## Foreground / REPL mode
|
|
96
107
|
|
|
97
108
|
```bash
|
|
98
|
-
|
|
109
|
+
wasper start --url <spec> # interactive REPL with slash commands
|
|
99
110
|
```
|
|
100
111
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
| Variable | Description |
|
|
104
|
-
|----------|-------------|
|
|
105
|
-
| `WASPER_PORT` | Server port (default: 3388) |
|
|
106
|
-
| `WASPER_HOST` | Bind address (default: 0.0.0.0) |
|
|
107
|
-
| `WASPER_ORIGIN` | Public URL for self-hosted deployments |
|
|
108
|
-
| `WASPER_TOKEN` | Access token gate |
|
|
109
|
-
| `WASPER_SPEC_URL` | Default spec URL |
|
|
110
|
-
| `WASPER_DATA_DIR` | Override data directory (default: ~/.wasper/data) |
|
|
111
|
-
|
|
112
|
-
## Data
|
|
113
|
-
|
|
114
|
-
wasper stores its database at `~/.wasper/data/wasper.db`. This includes request logs, saved specs, auth profiles, and settings. If you have an existing `~/.openapi-agent/data` directory, wasper will use it automatically.
|
|
115
|
-
|
|
116
|
-
## License
|
|
117
|
-
|
|
118
|
-
MIT — see [LICENSE](./LICENSE).
|
|
112
|
+
Press `/` and type: `/mcp on|off` · `/proxy on|off` · `/auth use <role>` · `/token new` · `/tail` · `/help`
|