@mistweaverco/kulala-cli 0.1.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/LICENSE +21 -0
- package/README.md +152 -0
- package/dist/cli.cjs +4095 -0
- package/dist/install-backend.cjs +180 -0
- package/package.json +38 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025+ mistweaverco
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
![kulala-cli Logo][logo]
|
|
4
|
+
|
|
5
|
+
# kulala-cli
|
|
6
|
+
|
|
7
|
+
[![npm][badge-npm]][link-npm]
|
|
8
|
+
[![latest release][badge-github]][link-github]
|
|
9
|
+
[![Discord][badge-discord]][discord]
|
|
10
|
+
|
|
11
|
+
[Install](#install) •
|
|
12
|
+
[Usage](#usage)
|
|
13
|
+
|
|
14
|
+
<p></p>
|
|
15
|
+
|
|
16
|
+
A fully-featured 🤏 HTTP/GraphQL/gRPC/Websocket-client 🐼
|
|
17
|
+
interface 🖥️ for your command-line ❤️,
|
|
18
|
+
that supports the Jetbrains .http spec (with full scripting support).
|
|
19
|
+
|
|
20
|
+
<p></p>
|
|
21
|
+
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
You can install kulala-cli globally using `npm`, `bun`, `yarn` or `pnpm`:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
npm install -g @mistweaverco/kulala-cli
|
|
30
|
+
bun add -g @mistweaverco/kulala-cli
|
|
31
|
+
yarn global add @mistweaverco/kulala-cli
|
|
32
|
+
pnpm add -g @mistweaverco/kulala-cli
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
You can also run it directly without installation using
|
|
36
|
+
|
|
37
|
+
`npx`, `bunx`, `yarn dlx` or `pnpx`:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
npx @mistweaverco/kulala-cli run --report file.http
|
|
41
|
+
bunx @mistweaverco/kulala-cli run --report file.http
|
|
42
|
+
yarn dlx @mistweaverco/kulala-cli run --report file.http
|
|
43
|
+
pnpx @mistweaverco/kulala-cli run --report file.http
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
On install, kulala-cli downloads a matching
|
|
47
|
+
[kulala-core](https://github.com/mistweaverco/kulala-core)
|
|
48
|
+
binary automatically.
|
|
49
|
+
|
|
50
|
+
If install scripts are disabled
|
|
51
|
+
(for example `npm install --ignore-scripts`),
|
|
52
|
+
the binary is downloaded on first use instead.
|
|
53
|
+
|
|
54
|
+
To use your own kulala-core binary, set `KULALA_CORE_PATH`:
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
export KULALA_CORE_PATH=/path/to/kulala-core
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Usage
|
|
61
|
+
|
|
62
|
+
Run a `.http` file and print human-readable output:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
kulala run file.http
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Run a `.http` file and print the raw kulala-core JSON output:
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
kulala run --json file.http
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Run a `.http` file and print a report:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
kulala run --report file.http
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Run all files in a directory and print a report:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
kulala run --report ./requests
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Run all files in a directory (in random order) and print a report:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
kulala run --report --shuffle ./requests
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Only print output when a request fails:
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
kulala run --quiet ./requests
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Select an environment for variable resolution:
|
|
99
|
+
|
|
100
|
+
```sh
|
|
101
|
+
kulala run --report --env=production file.http
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Run a single request by block name (`###` name):
|
|
105
|
+
|
|
106
|
+
```sh
|
|
107
|
+
kulala run file.http --name MyRequest
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Run the request at a cursor location (1-based line and column, same as kulala.nvim):
|
|
111
|
+
|
|
112
|
+
```sh
|
|
113
|
+
kulala run file.http --line 17
|
|
114
|
+
kulala run file.http --line 19 --column 1
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
When using `--name`, `--line`,
|
|
118
|
+
or `--column`, `<path>` must be a single `.http` or
|
|
119
|
+
`.rest` file.
|
|
120
|
+
|
|
121
|
+
### Exit behaviour
|
|
122
|
+
|
|
123
|
+
kulala-cli exits with code `1` when any request fails. Execution stops after the
|
|
124
|
+
first failing request within a file, and remaining files in a directory are not run.
|
|
125
|
+
|
|
126
|
+
Success is determined by kulala-core's `success` flag, so operators such as
|
|
127
|
+
`// @kulala-expect-status-code` are respected (for example, an expected `404` is
|
|
128
|
+
treated as a pass).
|
|
129
|
+
|
|
130
|
+
### Development
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
pnpm install
|
|
134
|
+
pnpm run build
|
|
135
|
+
pnpm run lint
|
|
136
|
+
node dist/cli.cjs --help
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
To use a locally built kulala-core binary during development:
|
|
140
|
+
|
|
141
|
+
```sh
|
|
142
|
+
export KULALA_CORE_PATH=/path/to/kulala-core/dist/kulala-core
|
|
143
|
+
node dist/cli.cjs run file.http
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
[logo]: https://raw.githubusercontent.com/mistweaverco/kulala-cli/main/assets/logo.svg
|
|
147
|
+
[discord]: https://mistweaverco.com/discord
|
|
148
|
+
[badge-discord]: https://mistweaverco.com/assets/badges/discord.svg
|
|
149
|
+
[badge-github]: https://img.shields.io/github/v/release/mistweaverco/kulala-cli?style=for-the-badge
|
|
150
|
+
[link-github]: https://github.com/mistweaverco/kulala-cli/releases/latest
|
|
151
|
+
[badge-npm]: https://img.shields.io/npm/v/@mistweaverco/kulala-cli?style=for-the-badge
|
|
152
|
+
[link-npm]: https://www.npmjs.com/package/@mistweaverco/kulala-cli
|