@qodalis/vue-cli 2.0.0-beta.2 → 2.0.0-beta.21
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 +230 -12
- package/dist/index.d.mts +354 -0
- package/dist/index.d.ts +354 -0
- package/dist/index.js +653 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +658 -0
- package/dist/index.mjs.map +1 -0
- package/dist/package.json +52 -0
- package/dist/styles.css +8 -0
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -21,6 +21,17 @@
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
+
## Try It Online
|
|
25
|
+
|
|
26
|
+
| Framework | StackBlitz | CodeSandbox | Gitpod |
|
|
27
|
+
|-----------|------------|-------------|--------|
|
|
28
|
+
| **Angular** | [](https://stackblitz.com/github/qodalis-solutions/qodalis-cli-angular-example) | [](https://codesandbox.io/p/github/qodalis-solutions/qodalis-cli-angular-example) | [](https://gitpod.io/#https://github.com/qodalis-solutions/qodalis-cli-angular-example) |
|
|
29
|
+
| **React** | [](https://stackblitz.com/github/qodalis-solutions/qodalis-cli-react-example) | [](https://codesandbox.io/p/github/qodalis-solutions/qodalis-cli-react-example) | [](https://gitpod.io/#https://github.com/qodalis-solutions/qodalis-cli-react-example) |
|
|
30
|
+
| **Vue** | [](https://stackblitz.com/github/qodalis-solutions/qodalis-cli-vue-example) | [](https://codesandbox.io/p/github/qodalis-solutions/qodalis-cli-vue-example) | [](https://gitpod.io/#https://github.com/qodalis-solutions/qodalis-cli-vue-example) |
|
|
31
|
+
| **Vanilla** | [](https://stackblitz.com/github/qodalis-solutions/qodalis-cli-vanilla-example) | [](https://codesandbox.io/p/github/qodalis-solutions/qodalis-cli-vanilla-example) | [](https://gitpod.io/#https://github.com/qodalis-solutions/qodalis-cli-vanilla-example) |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
24
35
|

|
|
25
36
|
|
|
26
37
|
## Packages
|
|
@@ -55,7 +66,7 @@ Add styles to `angular.json`:
|
|
|
55
66
|
```json
|
|
56
67
|
{
|
|
57
68
|
"styles": [
|
|
58
|
-
"node_modules/@qodalis/angular-cli/src/assets/styles.
|
|
69
|
+
"node_modules/@qodalis/angular-cli/src/assets/styles.css"
|
|
59
70
|
]
|
|
60
71
|
}
|
|
61
72
|
```
|
|
@@ -75,6 +86,7 @@ npm install @qodalis/react-cli
|
|
|
75
86
|
```
|
|
76
87
|
|
|
77
88
|
```tsx
|
|
89
|
+
import '@qodalis/react-cli/styles.css';
|
|
78
90
|
import { Cli } from '@qodalis/react-cli';
|
|
79
91
|
|
|
80
92
|
function App() {
|
|
@@ -90,6 +102,7 @@ npm install @qodalis/vue-cli
|
|
|
90
102
|
|
|
91
103
|
```vue
|
|
92
104
|
<script setup lang="ts">
|
|
105
|
+
import '@qodalis/vue-cli/styles.css';
|
|
93
106
|
import { Cli } from '@qodalis/vue-cli';
|
|
94
107
|
</script>
|
|
95
108
|
|
|
@@ -123,7 +136,7 @@ const options = {
|
|
|
123
136
|
| `help` | `man` | Show all commands or help for a specific command |
|
|
124
137
|
| `version` | `ver` | Display CLI version and documentation link |
|
|
125
138
|
| `hotkeys` | `shortcuts`, `keys` | Show keyboard shortcuts |
|
|
126
|
-
| `history` | `hist` | Browse and clear command history |
|
|
139
|
+
| `history` | `hist` | Browse and clear your command history (per user with the users plugin) |
|
|
127
140
|
| `theme` | `themes` | Apply, customize, and save terminal themes (interactive selection with live preview) |
|
|
128
141
|
| `feedback` | `support` | Report bugs or request features on GitHub |
|
|
129
142
|
| `pkg` | `packages` | Install, update, remove, and browse packages |
|
|
@@ -192,19 +205,60 @@ pkg source set unpkg # Set package source directly
|
|
|
192
205
|
|
|
193
206
|
### Available Packages
|
|
194
207
|
|
|
208
|
+
#### Utility Plugins
|
|
209
|
+
|
|
195
210
|
| Package | Command | Description |
|
|
196
211
|
|---------|---------|-------------|
|
|
212
|
+
| [@qodalis/cli-data-explorer](https://www.npmjs.com/package/@qodalis/cli-data-explorer) | `data-explorer` | Interactive query console for SQL, MongoDB, Redis, Elasticsearch |
|
|
197
213
|
| [@qodalis/cli-guid](https://www.npmjs.com/package/@qodalis/cli-guid) | `guid` | Generate and validate UUIDs |
|
|
198
|
-
| [@qodalis/cli-string](https://www.npmjs.com/package/@qodalis/cli-string) | `string` | String manipulation (case, trim, reverse, slug, wc, etc.) |
|
|
199
|
-
| [@qodalis/cli-curl](https://www.npmjs.com/package/@qodalis/cli-curl) | `curl` | HTTP requests (GET, POST, PUT, DELETE) |
|
|
200
|
-
| [@qodalis/cli-todo](https://www.npmjs.com/package/@qodalis/cli-todo) | `todo` | Task management |
|
|
201
214
|
| [@qodalis/cli-regex](https://www.npmjs.com/package/@qodalis/cli-regex) | `regex` | Regular expression testing |
|
|
202
215
|
| [@qodalis/cli-qr](https://www.npmjs.com/package/@qodalis/cli-qr) | `qr` | QR code generation |
|
|
203
216
|
| [@qodalis/cli-speed-test](https://www.npmjs.com/package/@qodalis/cli-speed-test) | `speed-test` | Internet speed test |
|
|
204
|
-
| [@qodalis/cli-
|
|
217
|
+
| [@qodalis/cli-curl](https://www.npmjs.com/package/@qodalis/cli-curl) | `curl` | HTTP requests (GET, POST, PUT, DELETE) |
|
|
218
|
+
| [@qodalis/cli-password-generator](https://www.npmjs.com/package/@qodalis/cli-password-generator) | `generate-password` | Password generation |
|
|
219
|
+
| [@qodalis/cli-string](https://www.npmjs.com/package/@qodalis/cli-string) | `string` | String manipulation (case, trim, reverse, slug, wc, etc.) |
|
|
220
|
+
| [@qodalis/cli-todo](https://www.npmjs.com/package/@qodalis/cli-todo) | `todo` | Task management |
|
|
205
221
|
| [@qodalis/cli-browser-storage](https://www.npmjs.com/package/@qodalis/cli-browser-storage) | `local-storage`, `cookies` | Browser storage operations |
|
|
206
222
|
| [@qodalis/cli-text-to-image](https://www.npmjs.com/package/@qodalis/cli-text-to-image) | `text-to-image` | Generate images from text |
|
|
207
|
-
| [@qodalis/cli-
|
|
223
|
+
| [@qodalis/cli-files](https://www.npmjs.com/package/@qodalis/cli-files) | `ls`, `cat`, `nano`, `mkdir`, `touch`, `rm` | Virtual filesystem |
|
|
224
|
+
| [@qodalis/cli-yesno](https://www.npmjs.com/package/@qodalis/cli-yesno) | `yesno` | Interactive yes/no confirmation prompts |
|
|
225
|
+
| [@qodalis/cli-server-logs](https://www.npmjs.com/package/@qodalis/cli-server-logs) | `server logs` | Live server log streaming with level filtering |
|
|
226
|
+
| [@qodalis/cli-server-jobs](https://www.npmjs.com/package/@qodalis/cli-server-jobs) | `server jobs` | Manage server-side background jobs |
|
|
227
|
+
| [@qodalis/cli-users](https://www.npmjs.com/package/@qodalis/cli-users) | `whoami`, `adduser`, `login` | User management and authentication |
|
|
228
|
+
| [@qodalis/cli-chart](https://www.npmjs.com/package/@qodalis/cli-chart) | `chart` | Render bar, line, and sparkline charts |
|
|
229
|
+
| [@qodalis/cli-cron](https://www.npmjs.com/package/@qodalis/cli-cron) | `cron` | Schedule and manage recurring commands |
|
|
230
|
+
| [@qodalis/cli-csv](https://www.npmjs.com/package/@qodalis/cli-csv) | `csv` | Parse, filter, sort, and convert CSV data |
|
|
231
|
+
| [@qodalis/cli-markdown](https://www.npmjs.com/package/@qodalis/cli-markdown) | `md` | Render Markdown content in the terminal |
|
|
232
|
+
| [@qodalis/cli-encode](https://www.npmjs.com/package/@qodalis/cli-encode) | `base64`, `url`, `hex`, `html` | Encode/decode Base64, URL, hex, HTML entities |
|
|
233
|
+
| [@qodalis/cli-scp](https://www.npmjs.com/package/@qodalis/cli-scp) | `scp` | Secure copy — transfer files between local and remote |
|
|
234
|
+
| [@qodalis/cli-wget](https://www.npmjs.com/package/@qodalis/cli-wget) | `wget` | Download files from URLs |
|
|
235
|
+
| [@qodalis/cli-stopwatch](https://www.npmjs.com/package/@qodalis/cli-stopwatch) | `stopwatch` | Interactive stopwatch and countdown timer |
|
|
236
|
+
|
|
237
|
+
#### Game Plugins
|
|
238
|
+
|
|
239
|
+
| Package | Command | Description |
|
|
240
|
+
|---------|---------|-------------|
|
|
241
|
+
| [@qodalis/cli-snake](https://www.npmjs.com/package/@qodalis/cli-snake) | `snake` | Classic Snake game |
|
|
242
|
+
| [@qodalis/cli-tetris](https://www.npmjs.com/package/@qodalis/cli-tetris) | `tetris` | Tetris |
|
|
243
|
+
| [@qodalis/cli-2048](https://www.npmjs.com/package/@qodalis/cli-2048) | `2048` | 2048 sliding puzzle |
|
|
244
|
+
| [@qodalis/cli-minesweeper](https://www.npmjs.com/package/@qodalis/cli-minesweeper) | `minesweeper` | Minesweeper |
|
|
245
|
+
| [@qodalis/cli-wordle](https://www.npmjs.com/package/@qodalis/cli-wordle) | `wordle` | Wordle word game |
|
|
246
|
+
| [@qodalis/cli-sudoku](https://www.npmjs.com/package/@qodalis/cli-sudoku) | `sudoku` | Sudoku puzzle |
|
|
247
|
+
|
|
248
|
+
#### Language Packs
|
|
249
|
+
|
|
250
|
+
| Package | Language |
|
|
251
|
+
|---------|----------|
|
|
252
|
+
| [@qodalis/cli-lang-es](https://www.npmjs.com/package/@qodalis/cli-lang-es) | Spanish |
|
|
253
|
+
| [@qodalis/cli-lang-fr](https://www.npmjs.com/package/@qodalis/cli-lang-fr) | French |
|
|
254
|
+
| [@qodalis/cli-lang-de](https://www.npmjs.com/package/@qodalis/cli-lang-de) | German |
|
|
255
|
+
| [@qodalis/cli-lang-it](https://www.npmjs.com/package/@qodalis/cli-lang-it) | Italian |
|
|
256
|
+
| [@qodalis/cli-lang-pt](https://www.npmjs.com/package/@qodalis/cli-lang-pt) | Portuguese |
|
|
257
|
+
| [@qodalis/cli-lang-ro](https://www.npmjs.com/package/@qodalis/cli-lang-ro) | Romanian |
|
|
258
|
+
| [@qodalis/cli-lang-ru](https://www.npmjs.com/package/@qodalis/cli-lang-ru) | Russian |
|
|
259
|
+
| [@qodalis/cli-lang-zh](https://www.npmjs.com/package/@qodalis/cli-lang-zh) | Chinese |
|
|
260
|
+
| [@qodalis/cli-lang-ja](https://www.npmjs.com/package/@qodalis/cli-lang-ja) | Japanese |
|
|
261
|
+
| [@qodalis/cli-lang-ko](https://www.npmjs.com/package/@qodalis/cli-lang-ko) | Korean |
|
|
208
262
|
|
|
209
263
|
Any npm package with UMD support can also be loaded:
|
|
210
264
|
|
|
@@ -213,6 +267,90 @@ pkg add lodash
|
|
|
213
267
|
eval _.map([1, 2, 3], n => n * 2)
|
|
214
268
|
```
|
|
215
269
|
|
|
270
|
+
## Server Integration
|
|
271
|
+
|
|
272
|
+
Connect the frontend terminal to a backend server for server-side command execution, interactive shell sessions, filesystem access, and event streaming. Three official backend implementations are available:
|
|
273
|
+
|
|
274
|
+
| Server | Package | Port | Tech Stack |
|
|
275
|
+
|--------|---------|------|------------|
|
|
276
|
+
| **.NET** | [Qodalis.Cli](https://www.nuget.org/packages/Qodalis.Cli) | 8046 | ASP.NET Core, .NET 8 |
|
|
277
|
+
| **Node.js** | [@qodalis/cli-server](https://www.npmjs.com/package/@qodalis/cli-server) | 8047 | Express, TypeScript, node-pty |
|
|
278
|
+
| **Python** | [qodalis-cli-server](https://pypi.org/project/qodalis-cli-server/) | 8048 | FastAPI, uvicorn |
|
|
279
|
+
|
|
280
|
+
All three implement the same API surface:
|
|
281
|
+
|
|
282
|
+
| Endpoint | Method | Purpose |
|
|
283
|
+
|----------|--------|---------|
|
|
284
|
+
| `/api/cli/versions` | GET | Version discovery |
|
|
285
|
+
| `/api/v1/cli/commands` | GET | List registered command processors |
|
|
286
|
+
| `/api/v1/cli/execute` | POST | Execute a CLI command |
|
|
287
|
+
| `/api/v1/cli/execute/stream` | POST | Execute with SSE streaming output |
|
|
288
|
+
| `/ws/v1/cli/events` | WS | Server-push event streaming |
|
|
289
|
+
| `/ws/v1/cli/shell` | WS | Interactive PTY shell session |
|
|
290
|
+
| `/api/cli/fs/*` | Various | Filesystem operations (ls, cat, upload, download, mkdir, rm) |
|
|
291
|
+
| `/api/qcli/mcp` | POST | MCP endpoint for AI clients (opt-in) |
|
|
292
|
+
|
|
293
|
+
### Connecting to a Server
|
|
294
|
+
|
|
295
|
+
```typescript
|
|
296
|
+
import { CliOptions } from '@qodalis/cli-core';
|
|
297
|
+
|
|
298
|
+
const options: CliOptions = {
|
|
299
|
+
servers: [
|
|
300
|
+
{ name: 'node', url: 'http://localhost:8047' },
|
|
301
|
+
{ name: 'dotnet', url: 'http://localhost:8046' },
|
|
302
|
+
{ name: 'python', url: 'http://localhost:8048' },
|
|
303
|
+
],
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
// Angular: <cli [options]="options" />
|
|
307
|
+
// React: <Cli options={options} />
|
|
308
|
+
// Vue: <Cli :options="options" />
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### SSE Streaming Execution
|
|
312
|
+
|
|
313
|
+
The frontend automatically uses SSE streaming when the server supports it, with transparent fallback to the legacy POST endpoint. Streaming processors emit output chunks as they execute rather than buffering the full response.
|
|
314
|
+
|
|
315
|
+
### Resilience
|
|
316
|
+
|
|
317
|
+
The frontend includes built-in resilience features:
|
|
318
|
+
|
|
319
|
+
- **WebSocket auto-reconnect** with exponential backoff (up to 5 attempts, max 30s delay)
|
|
320
|
+
- **Periodic health checks** for disconnected servers (30s interval)
|
|
321
|
+
- **HTTP retry** on transient fetch failures (1 retry with 1s delay)
|
|
322
|
+
- **Configurable request timeout** per server (default 30s)
|
|
323
|
+
|
|
324
|
+
### MCP
|
|
325
|
+
|
|
326
|
+
Each server can expose the whole system to AI clients such as Claude Code over the [Model Context Protocol](https://modelcontextprotocol.io) at `POST /api/qcli/mcp` (opt-in): CLI commands, the filesystem API, the data explorer, jobs and plugin-contributed tools, each with the caller's permissions. It works with or without the users plugin, whose `token create` command issues the API tokens MCP clients sign in with:
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
# direct HTTP
|
|
330
|
+
claude mcp add --transport http qcli http://localhost:8047/api/qcli/mcp --header "Authorization: Bearer <token>"
|
|
331
|
+
# or the local stdio proxy @qodalis/mcp-cli (token or user/password, read-only mode, tool filters)
|
|
332
|
+
claude mcp add qcli -e QCLI_URL=http://localhost:8047 -e QCLI_TOKEN=<token> -- npx -y @qodalis/mcp-cli
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
See [MCP endpoint](https://cli.qodalis.com/docs/server-integration#mcp-endpoint) for enabling it, the tools and permissions, and client setup.
|
|
336
|
+
|
|
337
|
+
### Server Plugins
|
|
338
|
+
|
|
339
|
+
| Plugin | Servers | Description |
|
|
340
|
+
|--------|---------|-------------|
|
|
341
|
+
| **Background Jobs** | .NET, Node.js, Python | Scheduled and recurring job execution with cron/interval support |
|
|
342
|
+
| **Admin Dashboard** | .NET, Node.js | React-based web UI for server management — commands, jobs, plugins, logs, filesystem, events, and an embedded terminal |
|
|
343
|
+
| **AWS Cloud** | .NET, Python | S3, EC2, Lambda, DynamoDB, IAM, ECS, SQS, SNS, CloudWatch with multi-profile credential management |
|
|
344
|
+
| **Data Explorer** | .NET, Node.js, Python | SQL, MongoDB, Redis, Elasticsearch, and custom data source providers |
|
|
345
|
+
|
|
346
|
+
### Docker
|
|
347
|
+
|
|
348
|
+
Run all three servers with Docker Compose from the [workspace root](https://github.com/qodalis-solutions/cli-workspace):
|
|
349
|
+
|
|
350
|
+
```bash
|
|
351
|
+
docker compose up --build
|
|
352
|
+
```
|
|
353
|
+
|
|
216
354
|
## Creating a CLI Plugin
|
|
217
355
|
|
|
218
356
|
### Quick Start
|
|
@@ -256,7 +394,7 @@ The tool auto-detects whether you're inside the `web-cli` monorepo:
|
|
|
256
394
|
In monorepo mode, the tool also:
|
|
257
395
|
- Creates `project.json` (Nx build + test targets)
|
|
258
396
|
- Creates `tsconfig.spec.json` (Karma/Jasmine test config)
|
|
259
|
-
- Updates `tsconfig.base.json` with the path alias `@qodalis/cli-<name>`
|
|
397
|
+
- Updates `tsconfig.base.json` with the path alias `@qodalis/cli-<name>` -> `dist/<name>`
|
|
260
398
|
|
|
261
399
|
### Generated Project Structure
|
|
262
400
|
|
|
@@ -522,6 +660,81 @@ import { weatherModule } from '@qodalis/cli-weather';
|
|
|
522
660
|
</template>
|
|
523
661
|
```
|
|
524
662
|
|
|
663
|
+
## Data Explorer
|
|
664
|
+
|
|
665
|
+
The `@qodalis/cli-data-explorer` plugin adds an interactive, full-screen REPL for querying data sources (SQL, MongoDB, Redis, Elasticsearch, and custom providers) directly from the terminal.
|
|
666
|
+
|
|
667
|
+
### Setup
|
|
668
|
+
|
|
669
|
+
Install and register the plugin, then configure backend servers:
|
|
670
|
+
|
|
671
|
+
```typescript
|
|
672
|
+
import { dataExplorerModule } from '@qodalis/cli-data-explorer';
|
|
673
|
+
|
|
674
|
+
// Add to your modules array
|
|
675
|
+
const modules = [dataExplorerModule, /* ... other modules */];
|
|
676
|
+
|
|
677
|
+
// Configure at least one server with data explorer providers
|
|
678
|
+
const options: CliOptions = {
|
|
679
|
+
servers: [
|
|
680
|
+
{ name: 'node', url: 'http://localhost:8047' },
|
|
681
|
+
{ name: 'dotnet', url: 'http://localhost:8046' },
|
|
682
|
+
{ name: 'python', url: 'http://localhost:8048' },
|
|
683
|
+
],
|
|
684
|
+
};
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
Or install at runtime without a rebuild:
|
|
688
|
+
|
|
689
|
+
```bash
|
|
690
|
+
pkg add data-explorer
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
### Usage
|
|
694
|
+
|
|
695
|
+
```bash
|
|
696
|
+
data-explorer
|
|
697
|
+
```
|
|
698
|
+
|
|
699
|
+
Select a server and data source, then enter the full-screen REPL:
|
|
700
|
+
|
|
701
|
+
```
|
|
702
|
+
data-explorer> SELECT * FROM users WHERE active = true;
|
|
703
|
+
|
|
704
|
+
3 rows (12ms)
|
|
705
|
+
┌────┬───────┬──────────────┐
|
|
706
|
+
│ id │ name │ email │
|
|
707
|
+
├────┼───────┼──────────────┤
|
|
708
|
+
│ 1 │ Alice │ alice@ex.com │
|
|
709
|
+
│ 2 │ Bob │ bob@ex.com │
|
|
710
|
+
│ 3 │ Carol │ carol@ex.com │
|
|
711
|
+
└────┴───────┴──────────────┘
|
|
712
|
+
|
|
713
|
+
data-explorer> \format json
|
|
714
|
+
Output format set to: json
|
|
715
|
+
|
|
716
|
+
data-explorer> db.users.find({"age": {"$gt": 25}})
|
|
717
|
+
[
|
|
718
|
+
{ "_id": "abc", "name": "Alice", "age": 30 },
|
|
719
|
+
{ "_id": "def", "name": "Bob", "age": 28 }
|
|
720
|
+
]
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
### REPL Commands
|
|
724
|
+
|
|
725
|
+
| Command | Description |
|
|
726
|
+
|---------|-------------|
|
|
727
|
+
| `\format <table\|json\|csv\|raw>` | Switch output format |
|
|
728
|
+
| `\schema` | Show database schema (tables, columns, types) |
|
|
729
|
+
| `\templates` | List available query templates |
|
|
730
|
+
| `\use <name>` | Load a template query |
|
|
731
|
+
| `\history` | Show query history |
|
|
732
|
+
| `\clear` | Clear screen |
|
|
733
|
+
| `\help` | Show all commands |
|
|
734
|
+
| `\quit` / `\q` | Exit |
|
|
735
|
+
|
|
736
|
+
Use **Up/Down arrows** for history navigation, **Escape** or **Ctrl+C** to exit.
|
|
737
|
+
|
|
525
738
|
## Extending with Inline Commands
|
|
526
739
|
|
|
527
740
|
For quick one-off commands without creating a full plugin, implement `ICliCommandProcessor` directly in your app:
|
|
@@ -581,16 +794,21 @@ await engine.start();
|
|
|
581
794
|
## Features
|
|
582
795
|
|
|
583
796
|
- **Multi-framework** — Angular, React, Vue, or vanilla JS
|
|
797
|
+
- **38 official plugins** — 24 utility, 6 games, 10 language packs
|
|
584
798
|
- **Command chaining** with `&&`, `||`, `|`, and `>>` operators
|
|
585
|
-
- **Command history** with arrow key navigation
|
|
586
|
-
- **Tab-like completions** and keyboard shortcuts (`Ctrl+C`, `Ctrl+L`, `Escape`)
|
|
587
|
-
- **
|
|
799
|
+
- **Command history** with arrow key navigation, per user when the users plugin is used (like `~/.bash_history`)
|
|
800
|
+
- **Tab-like completions** and readline keyboard shortcuts (`Ctrl+C`, `Ctrl+L`, `Escape`, `Ctrl+A/E`, `Ctrl+U/K/W/Y`, Home/End; `hotkeys` lists them)
|
|
801
|
+
- **29 built-in themes** with custom color support
|
|
802
|
+
- **Tabs & split panes** — multiple terminals in tabs with horizontal splitting
|
|
588
803
|
- **User sessions** with multi-user support
|
|
589
804
|
- **State persistence** across sessions
|
|
590
805
|
- **Interactive prompts** with live preview (select menus with real-time feedback)
|
|
591
|
-
- **Full-screen mode API** for rich TUI commands
|
|
806
|
+
- **Full-screen mode API** for rich TUI commands (games, editors, pagers)
|
|
592
807
|
- **Progress bars, spinners, and text animations**
|
|
593
808
|
- **Runtime package installation** from npm
|
|
809
|
+
- **Server integration** with SSE streaming, auto-reconnect, and health checks
|
|
810
|
+
- **Admin dashboard** for server management (React SPA)
|
|
811
|
+
- **Data explorer** for SQL, MongoDB, Redis, and Elasticsearch
|
|
594
812
|
|
|
595
813
|
## Contributing
|
|
596
814
|
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { PropType, VNode, InjectionKey, Ref } from 'vue';
|
|
3
|
+
import { ICliModule, ICliCommandProcessor, CliEngineSnapshot, CliPanelConfig, CliPanelPosition } from '@qodalis/cli-core';
|
|
4
|
+
import { CliEngineOptions, CliEngine, CreateCliEngineConfig } from '@qodalis/cli';
|
|
5
|
+
export { CliEngine, CliEngineOptions } from '@qodalis/cli';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Props accepted by the Vue `Cli` component.
|
|
9
|
+
*/
|
|
10
|
+
interface CliProps {
|
|
11
|
+
modules?: ICliModule[];
|
|
12
|
+
processors?: ICliCommandProcessor[];
|
|
13
|
+
options?: CliEngineOptions;
|
|
14
|
+
services?: Record<string, any>;
|
|
15
|
+
snapshot?: CliEngineSnapshot;
|
|
16
|
+
style?: Record<string, string>;
|
|
17
|
+
class?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const Cli: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
20
|
+
modules: {
|
|
21
|
+
type: PropType<ICliModule[]>;
|
|
22
|
+
default: undefined;
|
|
23
|
+
};
|
|
24
|
+
processors: {
|
|
25
|
+
type: PropType<ICliCommandProcessor[]>;
|
|
26
|
+
default: undefined;
|
|
27
|
+
};
|
|
28
|
+
options: {
|
|
29
|
+
type: PropType<CliEngineOptions>;
|
|
30
|
+
default: undefined;
|
|
31
|
+
};
|
|
32
|
+
services: {
|
|
33
|
+
type: PropType<Record<string, any>>;
|
|
34
|
+
default: undefined;
|
|
35
|
+
};
|
|
36
|
+
snapshot: {
|
|
37
|
+
type: PropType<CliEngineSnapshot>;
|
|
38
|
+
default: undefined;
|
|
39
|
+
};
|
|
40
|
+
style: {
|
|
41
|
+
type: PropType<Record<string, string>>;
|
|
42
|
+
default: undefined;
|
|
43
|
+
};
|
|
44
|
+
class: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: undefined;
|
|
47
|
+
};
|
|
48
|
+
}>, (() => null) | (() => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
}>), {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "ready"[], "ready", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
51
|
+
modules: {
|
|
52
|
+
type: PropType<ICliModule[]>;
|
|
53
|
+
default: undefined;
|
|
54
|
+
};
|
|
55
|
+
processors: {
|
|
56
|
+
type: PropType<ICliCommandProcessor[]>;
|
|
57
|
+
default: undefined;
|
|
58
|
+
};
|
|
59
|
+
options: {
|
|
60
|
+
type: PropType<CliEngineOptions>;
|
|
61
|
+
default: undefined;
|
|
62
|
+
};
|
|
63
|
+
services: {
|
|
64
|
+
type: PropType<Record<string, any>>;
|
|
65
|
+
default: undefined;
|
|
66
|
+
};
|
|
67
|
+
snapshot: {
|
|
68
|
+
type: PropType<CliEngineSnapshot>;
|
|
69
|
+
default: undefined;
|
|
70
|
+
};
|
|
71
|
+
style: {
|
|
72
|
+
type: PropType<Record<string, string>>;
|
|
73
|
+
default: undefined;
|
|
74
|
+
};
|
|
75
|
+
class: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
default: undefined;
|
|
78
|
+
};
|
|
79
|
+
}>> & Readonly<{
|
|
80
|
+
onReady?: ((...args: any[]) => any) | undefined;
|
|
81
|
+
}>, {
|
|
82
|
+
modules: ICliModule[];
|
|
83
|
+
processors: ICliCommandProcessor[];
|
|
84
|
+
options: CliEngineOptions;
|
|
85
|
+
services: Record<string, any>;
|
|
86
|
+
snapshot: CliEngineSnapshot;
|
|
87
|
+
style: Record<string, string>;
|
|
88
|
+
class: string;
|
|
89
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
90
|
+
|
|
91
|
+
interface CliPanelOptions extends CliEngineOptions, CliPanelConfig {
|
|
92
|
+
}
|
|
93
|
+
declare const CliPanel: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
94
|
+
options: {
|
|
95
|
+
type: PropType<CliPanelOptions>;
|
|
96
|
+
default: undefined;
|
|
97
|
+
};
|
|
98
|
+
modules: {
|
|
99
|
+
type: PropType<ICliModule[]>;
|
|
100
|
+
default: undefined;
|
|
101
|
+
};
|
|
102
|
+
processors: {
|
|
103
|
+
type: PropType<ICliCommandProcessor[]>;
|
|
104
|
+
default: undefined;
|
|
105
|
+
};
|
|
106
|
+
services: {
|
|
107
|
+
type: PropType<Record<string, any>>;
|
|
108
|
+
default: undefined;
|
|
109
|
+
};
|
|
110
|
+
onClose: {
|
|
111
|
+
type: PropType<() => void>;
|
|
112
|
+
default: undefined;
|
|
113
|
+
};
|
|
114
|
+
collapsed: {
|
|
115
|
+
type: BooleanConstructor;
|
|
116
|
+
default: undefined;
|
|
117
|
+
};
|
|
118
|
+
hidden: {
|
|
119
|
+
type: BooleanConstructor;
|
|
120
|
+
default: undefined;
|
|
121
|
+
};
|
|
122
|
+
maximized: {
|
|
123
|
+
type: BooleanConstructor;
|
|
124
|
+
default: undefined;
|
|
125
|
+
};
|
|
126
|
+
activeTabId: {
|
|
127
|
+
type: NumberConstructor;
|
|
128
|
+
default: undefined;
|
|
129
|
+
};
|
|
130
|
+
position: {
|
|
131
|
+
type: PropType<CliPanelPosition>;
|
|
132
|
+
default: undefined;
|
|
133
|
+
};
|
|
134
|
+
height: {
|
|
135
|
+
type: NumberConstructor;
|
|
136
|
+
default: undefined;
|
|
137
|
+
};
|
|
138
|
+
width: {
|
|
139
|
+
type: NumberConstructor;
|
|
140
|
+
default: undefined;
|
|
141
|
+
};
|
|
142
|
+
style: {
|
|
143
|
+
type: PropType<Record<string, string>>;
|
|
144
|
+
default: undefined;
|
|
145
|
+
};
|
|
146
|
+
class: {
|
|
147
|
+
type: StringConstructor;
|
|
148
|
+
default: undefined;
|
|
149
|
+
};
|
|
150
|
+
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
151
|
+
[key: string]: any;
|
|
152
|
+
}> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("close" | "update:collapsed" | "update:hidden" | "update:maximized" | "update:activeTabId" | "update:position" | "update:height" | "update:width" | "tab-added" | "tab-closed" | "pane-split" | "pane-closed")[], "close" | "update:collapsed" | "update:hidden" | "update:maximized" | "update:activeTabId" | "update:position" | "update:height" | "update:width" | "tab-added" | "tab-closed" | "pane-split" | "pane-closed", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
153
|
+
options: {
|
|
154
|
+
type: PropType<CliPanelOptions>;
|
|
155
|
+
default: undefined;
|
|
156
|
+
};
|
|
157
|
+
modules: {
|
|
158
|
+
type: PropType<ICliModule[]>;
|
|
159
|
+
default: undefined;
|
|
160
|
+
};
|
|
161
|
+
processors: {
|
|
162
|
+
type: PropType<ICliCommandProcessor[]>;
|
|
163
|
+
default: undefined;
|
|
164
|
+
};
|
|
165
|
+
services: {
|
|
166
|
+
type: PropType<Record<string, any>>;
|
|
167
|
+
default: undefined;
|
|
168
|
+
};
|
|
169
|
+
onClose: {
|
|
170
|
+
type: PropType<() => void>;
|
|
171
|
+
default: undefined;
|
|
172
|
+
};
|
|
173
|
+
collapsed: {
|
|
174
|
+
type: BooleanConstructor;
|
|
175
|
+
default: undefined;
|
|
176
|
+
};
|
|
177
|
+
hidden: {
|
|
178
|
+
type: BooleanConstructor;
|
|
179
|
+
default: undefined;
|
|
180
|
+
};
|
|
181
|
+
maximized: {
|
|
182
|
+
type: BooleanConstructor;
|
|
183
|
+
default: undefined;
|
|
184
|
+
};
|
|
185
|
+
activeTabId: {
|
|
186
|
+
type: NumberConstructor;
|
|
187
|
+
default: undefined;
|
|
188
|
+
};
|
|
189
|
+
position: {
|
|
190
|
+
type: PropType<CliPanelPosition>;
|
|
191
|
+
default: undefined;
|
|
192
|
+
};
|
|
193
|
+
height: {
|
|
194
|
+
type: NumberConstructor;
|
|
195
|
+
default: undefined;
|
|
196
|
+
};
|
|
197
|
+
width: {
|
|
198
|
+
type: NumberConstructor;
|
|
199
|
+
default: undefined;
|
|
200
|
+
};
|
|
201
|
+
style: {
|
|
202
|
+
type: PropType<Record<string, string>>;
|
|
203
|
+
default: undefined;
|
|
204
|
+
};
|
|
205
|
+
class: {
|
|
206
|
+
type: StringConstructor;
|
|
207
|
+
default: undefined;
|
|
208
|
+
};
|
|
209
|
+
}>> & Readonly<{
|
|
210
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
211
|
+
"onUpdate:collapsed"?: ((...args: any[]) => any) | undefined;
|
|
212
|
+
"onUpdate:hidden"?: ((...args: any[]) => any) | undefined;
|
|
213
|
+
"onUpdate:maximized"?: ((...args: any[]) => any) | undefined;
|
|
214
|
+
"onUpdate:activeTabId"?: ((...args: any[]) => any) | undefined;
|
|
215
|
+
"onUpdate:position"?: ((...args: any[]) => any) | undefined;
|
|
216
|
+
"onUpdate:height"?: ((...args: any[]) => any) | undefined;
|
|
217
|
+
"onUpdate:width"?: ((...args: any[]) => any) | undefined;
|
|
218
|
+
"onTab-added"?: ((...args: any[]) => any) | undefined;
|
|
219
|
+
"onTab-closed"?: ((...args: any[]) => any) | undefined;
|
|
220
|
+
"onPane-split"?: ((...args: any[]) => any) | undefined;
|
|
221
|
+
"onPane-closed"?: ((...args: any[]) => any) | undefined;
|
|
222
|
+
}>, {
|
|
223
|
+
modules: ICliModule[];
|
|
224
|
+
processors: ICliCommandProcessor[];
|
|
225
|
+
options: CliPanelOptions;
|
|
226
|
+
services: Record<string, any>;
|
|
227
|
+
style: Record<string, string>;
|
|
228
|
+
class: string;
|
|
229
|
+
onClose: () => void;
|
|
230
|
+
collapsed: boolean;
|
|
231
|
+
hidden: boolean;
|
|
232
|
+
maximized: boolean;
|
|
233
|
+
activeTabId: number;
|
|
234
|
+
position: CliPanelPosition;
|
|
235
|
+
height: number;
|
|
236
|
+
width: number;
|
|
237
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
238
|
+
|
|
239
|
+
declare const CliProvider: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
240
|
+
modules: {
|
|
241
|
+
type: PropType<ICliModule[]>;
|
|
242
|
+
default: undefined;
|
|
243
|
+
};
|
|
244
|
+
processors: {
|
|
245
|
+
type: PropType<ICliCommandProcessor[]>;
|
|
246
|
+
default: undefined;
|
|
247
|
+
};
|
|
248
|
+
options: {
|
|
249
|
+
type: PropType<CliEngineOptions>;
|
|
250
|
+
default: undefined;
|
|
251
|
+
};
|
|
252
|
+
services: {
|
|
253
|
+
type: PropType<Record<string, any>>;
|
|
254
|
+
default: undefined;
|
|
255
|
+
};
|
|
256
|
+
style: {
|
|
257
|
+
type: PropType<Record<string, string>>;
|
|
258
|
+
default: undefined;
|
|
259
|
+
};
|
|
260
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
261
|
+
[key: string]: any;
|
|
262
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "ready"[], "ready", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
263
|
+
modules: {
|
|
264
|
+
type: PropType<ICliModule[]>;
|
|
265
|
+
default: undefined;
|
|
266
|
+
};
|
|
267
|
+
processors: {
|
|
268
|
+
type: PropType<ICliCommandProcessor[]>;
|
|
269
|
+
default: undefined;
|
|
270
|
+
};
|
|
271
|
+
options: {
|
|
272
|
+
type: PropType<CliEngineOptions>;
|
|
273
|
+
default: undefined;
|
|
274
|
+
};
|
|
275
|
+
services: {
|
|
276
|
+
type: PropType<Record<string, any>>;
|
|
277
|
+
default: undefined;
|
|
278
|
+
};
|
|
279
|
+
style: {
|
|
280
|
+
type: PropType<Record<string, string>>;
|
|
281
|
+
default: undefined;
|
|
282
|
+
};
|
|
283
|
+
}>> & Readonly<{
|
|
284
|
+
onReady?: ((...args: any[]) => any) | undefined;
|
|
285
|
+
}>, {
|
|
286
|
+
modules: ICliModule[];
|
|
287
|
+
processors: ICliCommandProcessor[];
|
|
288
|
+
options: CliEngineOptions;
|
|
289
|
+
services: Record<string, any>;
|
|
290
|
+
style: Record<string, string>;
|
|
291
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
292
|
+
|
|
293
|
+
interface CliConfigValue {
|
|
294
|
+
modules?: ICliModule[];
|
|
295
|
+
processors?: ICliCommandProcessor[];
|
|
296
|
+
options?: CliEngineOptions;
|
|
297
|
+
services?: Record<string, any>;
|
|
298
|
+
}
|
|
299
|
+
declare const CliConfigKey: InjectionKey<CliConfigValue>;
|
|
300
|
+
declare const CliConfigProvider: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
301
|
+
modules: {
|
|
302
|
+
type: PropType<ICliModule[]>;
|
|
303
|
+
default: undefined;
|
|
304
|
+
};
|
|
305
|
+
processors: {
|
|
306
|
+
type: PropType<ICliCommandProcessor[]>;
|
|
307
|
+
default: undefined;
|
|
308
|
+
};
|
|
309
|
+
options: {
|
|
310
|
+
type: PropType<CliEngineOptions>;
|
|
311
|
+
default: undefined;
|
|
312
|
+
};
|
|
313
|
+
services: {
|
|
314
|
+
type: PropType<Record<string, any>>;
|
|
315
|
+
default: undefined;
|
|
316
|
+
};
|
|
317
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
318
|
+
[key: string]: any;
|
|
319
|
+
}>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
320
|
+
modules: {
|
|
321
|
+
type: PropType<ICliModule[]>;
|
|
322
|
+
default: undefined;
|
|
323
|
+
};
|
|
324
|
+
processors: {
|
|
325
|
+
type: PropType<ICliCommandProcessor[]>;
|
|
326
|
+
default: undefined;
|
|
327
|
+
};
|
|
328
|
+
options: {
|
|
329
|
+
type: PropType<CliEngineOptions>;
|
|
330
|
+
default: undefined;
|
|
331
|
+
};
|
|
332
|
+
services: {
|
|
333
|
+
type: PropType<Record<string, any>>;
|
|
334
|
+
default: undefined;
|
|
335
|
+
};
|
|
336
|
+
}>> & Readonly<{}>, {
|
|
337
|
+
modules: ICliModule[];
|
|
338
|
+
processors: ICliCommandProcessor[];
|
|
339
|
+
options: CliEngineOptions;
|
|
340
|
+
services: Record<string, any>;
|
|
341
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
342
|
+
|
|
343
|
+
interface CliContextValue {
|
|
344
|
+
engine: Ref<CliEngine | null>;
|
|
345
|
+
}
|
|
346
|
+
declare const CliInjectionKey: InjectionKey<CliContextValue>;
|
|
347
|
+
|
|
348
|
+
declare function useCli(): CliContextValue;
|
|
349
|
+
|
|
350
|
+
type UseCliEngineConfig = Omit<CreateCliEngineConfig, 'framework'>;
|
|
351
|
+
declare function useCliEngine(containerRef: Ref<HTMLElement | null>, config?: UseCliEngineConfig): Ref<CliEngine | null>;
|
|
352
|
+
|
|
353
|
+
export { Cli, CliConfigKey, CliConfigProvider, CliInjectionKey, CliPanel, CliProvider, useCli, useCliEngine };
|
|
354
|
+
export type { CliConfigValue, CliContextValue, CliPanelOptions, CliProps, UseCliEngineConfig };
|