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