zammy 1.2.1 → 1.3.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 +322 -239
- package/assets/zammy.gif +0 -0
- package/dist/index.js +2418 -200
- package/package.json +9 -2
- package/packages/plugins/docker/README.md +141 -0
- package/packages/plugins/docker/dist/index.d.ts +46 -0
- package/packages/plugins/docker/dist/index.d.ts.map +1 -0
- package/packages/plugins/docker/dist/index.js +402 -0
- package/packages/plugins/docker/dist/index.js.map +1 -0
- package/packages/plugins/docker/package.json +28 -0
- package/packages/plugins/docker/zammy-plugin.json +16 -0
- package/packages/plugins/faker/README.md +65 -0
- package/packages/plugins/faker/dist/index.d.ts +43 -0
- package/packages/plugins/faker/dist/index.d.ts.map +1 -0
- package/packages/plugins/faker/dist/index.js +349 -0
- package/packages/plugins/faker/dist/index.js.map +1 -0
- package/packages/plugins/faker/package.json +28 -0
- package/packages/plugins/faker/zammy-plugin.json +14 -0
- package/packages/plugins/network/README.md +126 -0
- package/packages/plugins/network/dist/index.d.ts +45 -0
- package/packages/plugins/network/dist/index.d.ts.map +1 -0
- package/packages/plugins/network/dist/index.js +406 -0
- package/packages/plugins/network/dist/index.js.map +1 -0
- package/packages/plugins/network/package.json +28 -0
- package/packages/plugins/network/zammy-plugin.json +17 -0
- package/packages/plugins/port/README.md +74 -0
- package/packages/plugins/port/dist/index.d.ts +47 -0
- package/packages/plugins/port/dist/index.d.ts.map +1 -0
- package/packages/plugins/port/dist/index.js +331 -0
- package/packages/plugins/port/dist/index.js.map +1 -0
- package/packages/plugins/port/package.json +28 -0
- package/packages/plugins/port/zammy-plugin.json +16 -0
package/README.md
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
# Zammy CLI
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**Stop juggling 14 dev tools. Zammy has them all — plus a friendly purple slime.**
|
|
6
6
|
|
|
7
|
-
[](https://github.com/aayushadhikari7/zammy-cli/actions/workflows/test.yml)
|
|
8
7
|
[](https://www.npmjs.com/package/zammy)
|
|
8
|
+
[](https://www.npmjs.com/package/zammy)
|
|
9
|
+
[](https://github.com/aayushadhikari7/zammy-cli/actions/workflows/test.yml)
|
|
9
10
|
[](https://opensource.org/licenses/MIT)
|
|
10
|
-
[](https://nodejs.org/)
|
|
11
|
-
[](https://www.typescriptlang.org/)
|
|
12
11
|
|
|
13
12
|
```
|
|
14
13
|
███████╗ █████╗ ███╗ ███╗███╗ ███╗██╗ ██╗
|
|
@@ -19,99 +18,126 @@
|
|
|
19
18
|
╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝
|
|
20
19
|
```
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-

|
|
21
|
+
An all-in-one CLI that combines dev utilities, productivity tools, and a mascot that actually cares about you.
|
|
25
22
|
|
|
26
|
-
[
|
|
23
|
+
[Why Zammy?](#why-zammy) • [Install](#installation) • [Commands](#commands) • [Plugins](#plugin-system) • [Contributing](#contributing)
|
|
27
24
|
|
|
28
25
|
</div>
|
|
29
26
|
|
|
30
27
|
---
|
|
31
28
|
|
|
32
|
-
##
|
|
33
|
-
|
|
34
|
-
- [Features](#features)
|
|
35
|
-
- [Installation](#installation)
|
|
36
|
-
- [Quick Start](#quick-start)
|
|
37
|
-
- [Commands](#commands)
|
|
38
|
-
- [Utilities](#utilities)
|
|
39
|
-
- [Fun](#fun)
|
|
40
|
-
- [Creative](#creative)
|
|
41
|
-
- [Developer Tools](#developer-tools)
|
|
42
|
-
- [Info](#info)
|
|
43
|
-
- [Enhanced Shell Commands](#enhanced-shell-commands)
|
|
44
|
-
- [Interactive Features](#interactive-features)
|
|
45
|
-
- [Configuration](#configuration)
|
|
46
|
-
- [Development](#development)
|
|
47
|
-
- [Contributing](#contributing)
|
|
48
|
-
- [License](#license)
|
|
29
|
+
## Why Zammy?
|
|
49
30
|
|
|
50
|
-
|
|
31
|
+
**70% of developers struggle with remembering terminal commands.** We built Zammy to fix that.
|
|
51
32
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
- **Cross-Platform** — Works on Windows, macOS, and Linux
|
|
60
|
-
- **Simple Mode** — Use `--simple` for terminals that don't support animations
|
|
33
|
+
| The Problem | Zammy's Solution |
|
|
34
|
+
|-------------|------------------|
|
|
35
|
+
| Juggling 14+ different tools | Everything in one place |
|
|
36
|
+
| Forgetting command syntax | Interactive menu + autocomplete |
|
|
37
|
+
| Context switching kills focus | Never leave your terminal |
|
|
38
|
+
| Terminals feel cold & lifeless | Meet your new CLI companion |
|
|
39
|
+
| Windows always feels like an afterthought | First-class cross-platform support |
|
|
61
40
|
|
|
62
|
-
|
|
41
|
+
### What Zammy Replaces
|
|
63
42
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
43
|
+
```
|
|
44
|
+
Before Zammy With Zammy
|
|
45
|
+
─────────────────────────────────────────────────────────
|
|
46
|
+
Open browser → hash generator /hash sha256 mytext
|
|
47
|
+
Switch to Postman for API test !http GET api.com/users
|
|
48
|
+
Open separate todo app /todo add "Fix bug"
|
|
49
|
+
Google "how to base64 encode" /encode base64 hello
|
|
50
|
+
Find UUID generator website /uuid
|
|
51
|
+
Look up git status flags !git status
|
|
68
52
|
```
|
|
69
53
|
|
|
70
|
-
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Demo
|
|
71
57
|
|
|
58
|
+

|
|
59
|
+
|
|
60
|
+
**Try these first:**
|
|
72
61
|
```bash
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
npm start
|
|
62
|
+
zammy # Start Zammy
|
|
63
|
+
/joke # Get a programming joke
|
|
64
|
+
/zammy excited # See Zammy get excited
|
|
65
|
+
/asciiart @photo.png # Turn any image into ASCII art
|
|
78
66
|
```
|
|
79
67
|
|
|
80
|
-
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Installation
|
|
81
71
|
|
|
82
72
|
```bash
|
|
83
|
-
npm
|
|
84
|
-
zammy
|
|
73
|
+
npm install -g zammy
|
|
85
74
|
```
|
|
86
75
|
|
|
76
|
+
That's it. No config files. No setup wizard. Just run `zammy` and go.
|
|
77
|
+
|
|
78
|
+
### Requirements
|
|
79
|
+
- Node.js 18.0.0 or higher
|
|
80
|
+
- Works on Windows, macOS, and Linux
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
87
84
|
## Quick Start
|
|
88
85
|
|
|
89
86
|
```bash
|
|
90
87
|
# Start Zammy
|
|
91
88
|
zammy
|
|
92
89
|
|
|
93
|
-
#
|
|
94
|
-
zammy
|
|
90
|
+
# Once inside:
|
|
91
|
+
zammy❯ /help # See all commands
|
|
92
|
+
zammy❯ /calc 2^10 # Quick math → 1024
|
|
93
|
+
zammy❯ /password 16 # Generate secure password
|
|
94
|
+
zammy❯ !ls # Enhanced file listing with icons
|
|
95
|
+
zammy❯ !git status # Pretty git status
|
|
96
|
+
```
|
|
95
97
|
|
|
96
|
-
|
|
97
|
-
zammy --simple
|
|
98
|
+
### Command Prefixes
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
| Prefix | Type | Example |
|
|
101
|
+
|--------|------|---------|
|
|
102
|
+
| `/` | Zammy commands | `/help`, `/joke`, `/hash` |
|
|
103
|
+
| `!` | Enhanced shell | `!ls`, `!git`, `!http` |
|
|
104
|
+
| (none) | Chat with Zammy | `thanks`, `wow`, `:(` |
|
|
101
105
|
|
|
102
|
-
|
|
103
|
-
zammy --simple --no-menu
|
|
104
|
-
```
|
|
106
|
+
---
|
|
105
107
|
|
|
106
|
-
|
|
108
|
+
## Features
|
|
107
109
|
|
|
110
|
+
### Meet Zammy — Your CLI Companion
|
|
111
|
+
|
|
112
|
+
Zammy isn't just a command runner. It's a character that reacts to you:
|
|
113
|
+
|
|
114
|
+
- **Blinks** when you're idle (it's watching!)
|
|
115
|
+
- **Celebrates** when you say "thanks" or "awesome"
|
|
116
|
+
- **Shows sympathy** when you type "ugh" or ":("
|
|
117
|
+
- **Has 9 moods**: happy, excited, love, sleepy, thinking, surprised, sad, wink, angry
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
/zammy moods # See all moods
|
|
121
|
+
/zammy excited # Make Zammy excited
|
|
108
122
|
```
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
123
|
+
|
|
124
|
+
### Interactive Command Menu
|
|
125
|
+
|
|
126
|
+
Type `/` to browse commands with arrow keys:
|
|
127
|
+
- **↑/↓** Navigate
|
|
128
|
+
- **Tab/Enter** Select
|
|
129
|
+
- **Type** to filter
|
|
130
|
+
- **Escape** to close
|
|
131
|
+
|
|
132
|
+
### Beautiful Output
|
|
133
|
+
|
|
134
|
+
Everything is styled with colors, icons, and proper formatting:
|
|
135
|
+
- Syntax-highlighted code viewing
|
|
136
|
+
- Progress bars for disk usage
|
|
137
|
+
- Box-drawn tables and results
|
|
138
|
+
- File icons for 40+ file types
|
|
139
|
+
|
|
140
|
+
---
|
|
115
141
|
|
|
116
142
|
## Commands
|
|
117
143
|
|
|
@@ -119,181 +145,253 @@ zammy❯ /asciiart @img.png # Convert image to ASCII
|
|
|
119
145
|
|
|
120
146
|
| Command | Description |
|
|
121
147
|
|---------|-------------|
|
|
122
|
-
| `/help [cmd]` | Show all commands or
|
|
148
|
+
| `/help [cmd]` | Show all commands or help for specific command |
|
|
149
|
+
| `/calc <expr>` | Math expressions (`2+2`, `2^8`, `sqrt(144)`) |
|
|
150
|
+
| `/password [len]` | Generate secure password with strength meter |
|
|
151
|
+
| `/stats` | System info (CPU, memory, uptime) |
|
|
152
|
+
| `/time` | Current time with ASCII clock |
|
|
153
|
+
| `/countdown <time>` | Countdown timer (`30s`, `5m`, `1h30m`) |
|
|
154
|
+
| `/timer` | Stopwatch with lap support |
|
|
155
|
+
| `/todo` | Persistent todo list |
|
|
156
|
+
| `/history` | Command history |
|
|
157
|
+
| `/env [name]` | View environment variables |
|
|
158
|
+
| `/size [path]` | Analyze file/folder sizes |
|
|
123
159
|
| `/exit` | Exit Zammy |
|
|
124
|
-
| `/calc <expr>` | Calculate math expressions (`2+2`, `2^8`, `100%7`) |
|
|
125
|
-
| `/password [len]` | Generate secure passwords with strength indicator |
|
|
126
|
-
| `/stats` | Display system statistics (CPU, memory, uptime) |
|
|
127
|
-
| `/time` | Show current time with ASCII clock |
|
|
128
|
-
| `/countdown <time>` | Start a countdown timer (`30s`, `5m`, `1h30m`) |
|
|
129
|
-
| `/timer [start\|stop\|lap]` | Stopwatch timer |
|
|
130
|
-
| `/todo [add\|done\|rm]` | Persistent todo list |
|
|
131
|
-
| `/history [count\|clear]` | Command history |
|
|
132
160
|
|
|
133
|
-
###
|
|
161
|
+
### Developer Tools
|
|
134
162
|
|
|
135
163
|
| Command | Description |
|
|
136
164
|
|---------|-------------|
|
|
137
|
-
| `/
|
|
138
|
-
| `/
|
|
139
|
-
| `/
|
|
140
|
-
| `/
|
|
141
|
-
| `/
|
|
142
|
-
| `/
|
|
143
|
-
| `/pomodoro [start\|stop\|status]` | Pomodoro timer (25/5 technique) |
|
|
165
|
+
| `/hash <algo> <text>` | Hash text (md5, sha1, sha256, sha512) |
|
|
166
|
+
| `/uuid [count]` | Generate UUIDs |
|
|
167
|
+
| `/encode <type> <text>` | Encode/decode (base64, url, html) |
|
|
168
|
+
| `/json <action>` | JSON tools (validate, format, query) |
|
|
169
|
+
| `/request <method> <url>` | Make HTTP requests (no curl needed) |
|
|
170
|
+
| `/diff <file1> <file2>` | Compare two files |
|
|
144
171
|
|
|
145
|
-
###
|
|
172
|
+
### Fun
|
|
146
173
|
|
|
147
174
|
| Command | Description |
|
|
148
175
|
|---------|-------------|
|
|
149
|
-
| `/
|
|
150
|
-
| `/
|
|
151
|
-
| `/
|
|
152
|
-
| `/
|
|
176
|
+
| `/zammy [mood]` | Interact with Zammy |
|
|
177
|
+
| `/joke` | Random programming joke |
|
|
178
|
+
| `/quote` | Inspirational quote |
|
|
179
|
+
| `/fortune` | Get your fortune (with lucky numbers!) |
|
|
180
|
+
| `/dice [n] [sides]` | Roll dice with ASCII art |
|
|
181
|
+
| `/flip [count]` | Flip coins |
|
|
182
|
+
| `/pomodoro` | 25/5 Pomodoro timer |
|
|
153
183
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
/asciiart @photo.png --width 100 --style detailed --edges
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Available styles: `standard`, `detailed` (default), `blocks`, `simple`, `extended`
|
|
161
|
-
|
|
162
|
-
**Figlet Fonts:**
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
/figlet Hello --font Slant
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
Available fonts: Standard, Big, Slant, Small, Banner, Block, Bubble, Digital, Mini, Script, Shadow, Speed
|
|
169
|
-
|
|
170
|
-
### Developer Tools
|
|
184
|
+
### Creative
|
|
171
185
|
|
|
172
186
|
| Command | Description |
|
|
173
187
|
|---------|-------------|
|
|
174
|
-
| `/
|
|
175
|
-
| `/
|
|
176
|
-
| `/
|
|
188
|
+
| `/asciiart @<image>` | Convert images to ASCII art |
|
|
189
|
+
| `/figlet <text>` | Generate ASCII text art |
|
|
190
|
+
| `/lorem [n]` | Lorem ipsum generator |
|
|
191
|
+
| `/color <hex>` | Color converter & preview |
|
|
177
192
|
|
|
178
193
|
### Info
|
|
179
194
|
|
|
180
195
|
| Command | Description |
|
|
181
196
|
|---------|-------------|
|
|
182
|
-
| `/weather [city]` |
|
|
197
|
+
| `/weather [city]` | Current weather |
|
|
198
|
+
|
|
199
|
+
> **Want IP & port tools?** Install the network plugins:
|
|
200
|
+
> - `/plugin install zammy-plugin-network` for `/net ip`, `/net ping`, `/net dns`, `/net speed`
|
|
201
|
+
> - `/plugin install zammy-plugin-port` for `/port list`, `/port kill`, `/port check`
|
|
202
|
+
|
|
203
|
+
---
|
|
183
204
|
|
|
184
205
|
## Enhanced Shell Commands
|
|
185
206
|
|
|
186
|
-
|
|
207
|
+
Prefix any command with `!` for enhanced versions:
|
|
187
208
|
|
|
188
209
|
### File Operations
|
|
210
|
+
```bash
|
|
211
|
+
!ls # Colorized listing with icons
|
|
212
|
+
!tree # Directory tree visualization
|
|
213
|
+
!cat file.js # Syntax-highlighted file view
|
|
214
|
+
!find *.ts # Find files with colors
|
|
215
|
+
!grep pattern # Search with highlighted matches
|
|
216
|
+
!du # Disk usage with progress bars
|
|
217
|
+
```
|
|
189
218
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
219
|
+
### Developer Tools
|
|
220
|
+
```bash
|
|
221
|
+
!git status # Pretty git with branch & file status
|
|
222
|
+
!git log # Formatted commit history
|
|
223
|
+
!json data.json # Pretty-print JSON
|
|
224
|
+
!http GET url # Quick HTTP requests
|
|
225
|
+
!serve 3000 # Start HTTP server
|
|
226
|
+
!epoch # Timestamp converter
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### System
|
|
230
|
+
```bash
|
|
231
|
+
!ip # Local + public IP
|
|
232
|
+
!ps # Process list
|
|
233
|
+
!env # Environment variables
|
|
234
|
+
!clipboard copy # Clipboard operations
|
|
235
|
+
!notify "Done!" # Desktop notification
|
|
236
|
+
```
|
|
199
237
|
|
|
200
238
|
### Navigation
|
|
239
|
+
```bash
|
|
240
|
+
!cd ~/projects # Change directory
|
|
241
|
+
!bookmark save work # Save current dir as "work"
|
|
242
|
+
!bookmark go work # Jump to "work"
|
|
243
|
+
```
|
|
201
244
|
|
|
202
|
-
|
|
203
|
-
|---------|-------------|
|
|
204
|
-
| `!cd <path>` | Change directory (supports `~` and `-`) |
|
|
205
|
-
| `!pwd` | Show current directory |
|
|
206
|
-
| `!bookmark save/go/list/del` | Directory bookmarks |
|
|
245
|
+
---
|
|
207
246
|
|
|
208
|
-
|
|
247
|
+
## Plugin System
|
|
209
248
|
|
|
210
|
-
|
|
211
|
-
|---------|-------------|
|
|
212
|
-
| `!git [status\|log\|branch]` | Enhanced git with colors |
|
|
213
|
-
| `!json <file>` | Pretty print JSON |
|
|
214
|
-
| `!http GET <url>` | Quick HTTP requests |
|
|
215
|
-
| `!epoch [time]` | Timestamp converter |
|
|
216
|
-
| `!serve [port]` | Quick HTTP server |
|
|
249
|
+
Zammy is extensible through plugins. Install community plugins or create your own.
|
|
217
250
|
|
|
218
|
-
###
|
|
251
|
+
### Managing Plugins
|
|
219
252
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
253
|
+
```bash
|
|
254
|
+
/plugin list # Show installed plugins
|
|
255
|
+
/plugin install ./my-plugin # Install from local directory
|
|
256
|
+
/plugin install zammy-plugin-x # Install from npm
|
|
257
|
+
/plugin install github:user/repo # Install from GitHub
|
|
258
|
+
/plugin remove plugin-name # Remove a plugin
|
|
259
|
+
```
|
|
227
260
|
|
|
228
|
-
###
|
|
261
|
+
### Official Plugins
|
|
229
262
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
-
|
|
263
|
+
| Plugin | Install | Description |
|
|
264
|
+
|--------|---------|-------------|
|
|
265
|
+
| **Faker** | `/plugin install zammy-plugin-faker` | Generate fake data (emails, names, addresses, credit cards) |
|
|
266
|
+
| **Port Manager** | `/plugin install zammy-plugin-port` | List, check, and kill processes by port |
|
|
267
|
+
| **Network Tools** | `/plugin install zammy-plugin-network` | IP lookup, ping, DNS, speed test |
|
|
268
|
+
| **Docker** | `/plugin install zammy-plugin-docker` | Manage containers with pretty output |
|
|
235
269
|
|
|
236
|
-
|
|
270
|
+
### Creating a Plugin
|
|
237
271
|
|
|
238
|
-
|
|
272
|
+
```bash
|
|
273
|
+
/plugin create my-plugin
|
|
274
|
+
```
|
|
239
275
|
|
|
240
|
-
|
|
276
|
+
This scaffolds a new plugin with:
|
|
277
|
+
```
|
|
278
|
+
my-plugin/
|
|
279
|
+
├── zammy-plugin.json # Plugin manifest
|
|
280
|
+
├── package.json
|
|
281
|
+
├── tsconfig.json
|
|
282
|
+
├── src/
|
|
283
|
+
│ └── index.ts # Your plugin code
|
|
284
|
+
└── README.md
|
|
285
|
+
```
|
|
241
286
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
287
|
+
### Plugin Manifest
|
|
288
|
+
|
|
289
|
+
```json
|
|
290
|
+
{
|
|
291
|
+
"name": "my-plugin",
|
|
292
|
+
"version": "1.0.0",
|
|
293
|
+
"displayName": "My Plugin",
|
|
294
|
+
"description": "Does something cool",
|
|
295
|
+
"main": "./dist/index.js",
|
|
296
|
+
"commands": ["mycommand"],
|
|
297
|
+
"zammy": {
|
|
298
|
+
"minVersion": "1.2.0"
|
|
299
|
+
},
|
|
300
|
+
"permissions": {
|
|
301
|
+
"shell": false,
|
|
302
|
+
"filesystem": false,
|
|
303
|
+
"network": false
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
```
|
|
246
307
|
|
|
247
|
-
###
|
|
308
|
+
### Plugin API
|
|
248
309
|
|
|
249
|
-
|
|
310
|
+
Plugins receive a full API for integration:
|
|
250
311
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
312
|
+
```typescript
|
|
313
|
+
export default {
|
|
314
|
+
activate(api) {
|
|
315
|
+
// Register commands
|
|
316
|
+
api.registerCommand({
|
|
317
|
+
name: 'mycommand',
|
|
318
|
+
description: 'My custom command',
|
|
319
|
+
usage: '/mycommand [args]',
|
|
320
|
+
async execute(args) {
|
|
321
|
+
const { theme, symbols } = api.ui;
|
|
322
|
+
console.log(theme.success('Hello from my plugin!'));
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
// Use storage
|
|
327
|
+
api.storage.set('key', 'value');
|
|
328
|
+
|
|
329
|
+
// Logging
|
|
330
|
+
api.log.info('Plugin loaded!');
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
**Available API:**
|
|
336
|
+
- `api.registerCommand()` — Add new commands
|
|
337
|
+
- `api.ui.theme` — Access Zammy's color theme
|
|
338
|
+
- `api.ui.symbols` — Access Unicode symbols
|
|
339
|
+
- `api.storage` — Persistent key-value storage
|
|
340
|
+
- `api.log` — Prefixed logging (info, warn, error)
|
|
341
|
+
- `api.context` — Plugin metadata & paths
|
|
342
|
+
- `api.shell` — Shell access (if permitted)
|
|
343
|
+
|
|
344
|
+
---
|
|
259
345
|
|
|
260
|
-
|
|
346
|
+
## Configuration
|
|
261
347
|
|
|
262
|
-
|
|
348
|
+
Zammy works out of the box with sensible defaults:
|
|
263
349
|
|
|
264
|
-
|
|
350
|
+
- **Double Ctrl+C** to exit (prevents accidents)
|
|
351
|
+
- **Persistent data** stored in `~/.zammy/`
|
|
352
|
+
- **Command history** remembered across sessions
|
|
265
353
|
|
|
266
|
-
###
|
|
354
|
+
### CLI Flags
|
|
267
355
|
|
|
268
356
|
```bash
|
|
269
|
-
zammy
|
|
357
|
+
zammy --simple # Disable animations (for CI/pipes)
|
|
358
|
+
zammy --no-menu # Disable interactive menu
|
|
359
|
+
zammy --version # Show version
|
|
360
|
+
zammy --help # Show help
|
|
270
361
|
```
|
|
271
362
|
|
|
272
|
-
|
|
363
|
+
---
|
|
273
364
|
|
|
274
|
-
|
|
365
|
+
## Comparison
|
|
275
366
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
367
|
+
| Feature | Zammy | Oh My Zsh | tldr | Warp |
|
|
368
|
+
|---------|-------|-----------|------|------|
|
|
369
|
+
| Install | Node.js + `npm i -g` | Shell script | Package manager | App download |
|
|
370
|
+
| Cross-platform | Win/Mac/Linux | Mac/Linux | All | Mac only |
|
|
371
|
+
| Interactive menu | Yes | No | No | Yes |
|
|
372
|
+
| Built-in dev tools | 26+ commands | Aliases only | Help only | AI suggestions |
|
|
373
|
+
| Plugin system | Yes | Yes (300+) | No | No |
|
|
374
|
+
| Mascot/personality | Zammy! | No | No | No |
|
|
375
|
+
| Offline | Yes | Yes | Yes | Partial |
|
|
376
|
+
|
|
377
|
+
---
|
|
279
378
|
|
|
280
379
|
## Development
|
|
281
380
|
|
|
282
381
|
```bash
|
|
283
|
-
#
|
|
382
|
+
# Clone and install
|
|
383
|
+
git clone https://github.com/aayushadhikari7/zammy-cli.git
|
|
384
|
+
cd zammy-cli
|
|
284
385
|
npm install
|
|
285
386
|
|
|
286
|
-
# Development
|
|
287
|
-
npm run dev
|
|
387
|
+
# Development
|
|
388
|
+
npm run dev # Watch mode
|
|
389
|
+
npm run build # Build
|
|
390
|
+
npm test # Run tests
|
|
288
391
|
|
|
289
|
-
#
|
|
290
|
-
npm
|
|
291
|
-
|
|
292
|
-
# Run tests
|
|
293
|
-
npm test
|
|
294
|
-
|
|
295
|
-
# Run tests once
|
|
296
|
-
npm run test:run
|
|
392
|
+
# Link for local testing
|
|
393
|
+
npm link
|
|
394
|
+
zammy
|
|
297
395
|
```
|
|
298
396
|
|
|
299
397
|
### Project Structure
|
|
@@ -301,73 +399,56 @@ npm run test:run
|
|
|
301
399
|
```
|
|
302
400
|
zammy-cli/
|
|
303
401
|
├── src/
|
|
304
|
-
│ ├── index.ts #
|
|
305
|
-
│ ├── cli.ts # Command parser
|
|
306
|
-
│ ├── commands/ #
|
|
307
|
-
│ │ ├──
|
|
308
|
-
│ │ ├──
|
|
309
|
-
│ │ ├──
|
|
310
|
-
│ │ ├──
|
|
311
|
-
│ │ ├──
|
|
312
|
-
│ │ └──
|
|
313
|
-
│ ├── handlers/ #
|
|
314
|
-
│
|
|
315
|
-
│
|
|
316
|
-
|
|
317
|
-
│
|
|
318
|
-
│
|
|
319
|
-
│
|
|
320
|
-
│
|
|
321
|
-
|
|
322
|
-
│ └── slime-animated.ts # Zammy mascot moods & reactions
|
|
323
|
-
├── dist/ # Compiled output
|
|
324
|
-
└── package.json
|
|
402
|
+
│ ├── index.ts # Entry point & REPL
|
|
403
|
+
│ ├── cli.ts # Command parser
|
|
404
|
+
│ ├── commands/ # Command implementations
|
|
405
|
+
│ │ ├── utilities/ # calc, password, stats, etc.
|
|
406
|
+
│ │ ├── fun/ # joke, quote, zammy, etc.
|
|
407
|
+
│ │ ├── creative/ # asciiart, figlet, lorem
|
|
408
|
+
│ │ ├── dev/ # hash, uuid, encode, json, request, diff
|
|
409
|
+
│ │ ├── info/ # weather
|
|
410
|
+
│ │ └── plugin/ # Plugin management
|
|
411
|
+
│ ├── handlers/ # Reusable logic (testable)
|
|
412
|
+
│ ├── plugins/ # Plugin system
|
|
413
|
+
│ └── ui/ # Colors, banner, mascot
|
|
414
|
+
├── packages/plugins/ # Official plugins (published separately)
|
|
415
|
+
│ ├── docker/ # zammy-plugin-docker
|
|
416
|
+
│ ├── faker/ # zammy-plugin-faker
|
|
417
|
+
│ ├── network/ # zammy-plugin-network
|
|
418
|
+
│ └── port/ # zammy-plugin-port
|
|
419
|
+
└── dist/ # Built output
|
|
325
420
|
```
|
|
326
421
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
1. Create handler in `src/handlers/<category>/`:
|
|
422
|
+
---
|
|
330
423
|
|
|
331
|
-
|
|
332
|
-
// src/handlers/utilities/myhandler.ts
|
|
333
|
-
export function myFunction(input: string): string {
|
|
334
|
-
return `Processed: ${input}`;
|
|
335
|
-
}
|
|
336
|
-
```
|
|
424
|
+
## Contributing
|
|
337
425
|
|
|
338
|
-
|
|
426
|
+
We welcome contributions! Whether it's:
|
|
427
|
+
- New commands
|
|
428
|
+
- Bug fixes
|
|
429
|
+
- Plugin development
|
|
430
|
+
- Documentation improvements
|
|
339
431
|
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
registerCommand({
|
|
346
|
-
name: 'mycommand',
|
|
347
|
-
description: 'Does something cool',
|
|
348
|
-
usage: '/mycommand <input>',
|
|
349
|
-
async execute(args: string[]) {
|
|
350
|
-
console.log(myFunction(args[0]));
|
|
351
|
-
},
|
|
352
|
-
});
|
|
353
|
-
```
|
|
432
|
+
```bash
|
|
433
|
+
# 1. Fork the repo
|
|
434
|
+
# 2. Create a branch
|
|
435
|
+
git checkout -b feature/awesome-feature
|
|
354
436
|
|
|
355
|
-
3.
|
|
356
|
-
|
|
437
|
+
# 3. Make changes & test
|
|
438
|
+
npm test
|
|
357
439
|
|
|
358
|
-
|
|
440
|
+
# 4. Commit and push
|
|
441
|
+
git commit -m "Add awesome feature"
|
|
442
|
+
git push origin feature/awesome-feature
|
|
359
443
|
|
|
360
|
-
|
|
444
|
+
# 5. Open a Pull Request
|
|
445
|
+
```
|
|
361
446
|
|
|
362
|
-
|
|
363
|
-
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
364
|
-
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
365
|
-
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
366
|
-
5. Open a Pull Request
|
|
447
|
+
---
|
|
367
448
|
|
|
368
449
|
## License
|
|
369
450
|
|
|
370
|
-
|
|
451
|
+
MIT License — see [LICENSE](LICENSE) for details.
|
|
371
452
|
|
|
372
453
|
---
|
|
373
454
|
|
|
@@ -375,6 +456,8 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
|
|
375
456
|
|
|
376
457
|
**[Back to top](#zammy-cli)**
|
|
377
458
|
|
|
378
|
-
Made with TypeScript
|
|
459
|
+
Made with TypeScript, Node.js, and a lot of purple
|
|
460
|
+
|
|
461
|
+
If Zammy made you smile, give us a star!
|
|
379
462
|
|
|
380
463
|
</div>
|