zammy 1.2.0 → 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 +328 -214
- package/SECURITY.md +57 -0
- package/assets/zammy.gif +0 -0
- package/dist/index.js +3257 -450
- package/package.json +10 -3
- 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,89 +18,126 @@
|
|
|
19
18
|
╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝
|
|
20
19
|
```
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
An all-in-one CLI that combines dev utilities, productivity tools, and a mascot that actually cares about you.
|
|
23
22
|
|
|
24
|
-
[
|
|
23
|
+
[Why Zammy?](#why-zammy) • [Install](#installation) • [Commands](#commands) • [Plugins](#plugin-system) • [Contributing](#contributing)
|
|
25
24
|
|
|
26
25
|
</div>
|
|
27
26
|
|
|
28
27
|
---
|
|
29
28
|
|
|
30
|
-
##
|
|
31
|
-
|
|
32
|
-
- [Features](#features)
|
|
33
|
-
- [Installation](#installation)
|
|
34
|
-
- [Quick Start](#quick-start)
|
|
35
|
-
- [Commands](#commands)
|
|
36
|
-
- [Utilities](#utilities)
|
|
37
|
-
- [Fun](#fun)
|
|
38
|
-
- [Creative](#creative)
|
|
39
|
-
- [Developer Tools](#developer-tools)
|
|
40
|
-
- [Info](#info)
|
|
41
|
-
- [Enhanced Shell Commands](#enhanced-shell-commands)
|
|
42
|
-
- [Interactive Features](#interactive-features)
|
|
43
|
-
- [Configuration](#configuration)
|
|
44
|
-
- [Development](#development)
|
|
45
|
-
- [Contributing](#contributing)
|
|
46
|
-
- [License](#license)
|
|
29
|
+
## Why Zammy?
|
|
47
30
|
|
|
48
|
-
|
|
31
|
+
**70% of developers struggle with remembering terminal commands.** We built Zammy to fix that.
|
|
49
32
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
## Installation
|
|
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 |
|
|
59
40
|
|
|
60
|
-
###
|
|
41
|
+
### What Zammy Replaces
|
|
61
42
|
|
|
62
|
-
```
|
|
63
|
-
|
|
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
|
|
64
52
|
```
|
|
65
53
|
|
|
66
|
-
|
|
54
|
+
---
|
|
67
55
|
|
|
56
|
+
## Demo
|
|
57
|
+
|
|
58
|
+

|
|
59
|
+
|
|
60
|
+
**Try these first:**
|
|
68
61
|
```bash
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
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
|
|
74
66
|
```
|
|
75
67
|
|
|
76
|
-
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Installation
|
|
77
71
|
|
|
78
72
|
```bash
|
|
79
|
-
npm
|
|
80
|
-
zammy
|
|
73
|
+
npm install -g zammy
|
|
81
74
|
```
|
|
82
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
|
+
|
|
83
84
|
## Quick Start
|
|
84
85
|
|
|
85
86
|
```bash
|
|
86
87
|
# Start Zammy
|
|
87
88
|
zammy
|
|
88
89
|
|
|
89
|
-
#
|
|
90
|
-
zammy
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
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
|
|
94
96
|
```
|
|
95
97
|
|
|
96
|
-
|
|
98
|
+
### Command Prefixes
|
|
97
99
|
|
|
100
|
+
| Prefix | Type | Example |
|
|
101
|
+
|--------|------|---------|
|
|
102
|
+
| `/` | Zammy commands | `/help`, `/joke`, `/hash` |
|
|
103
|
+
| `!` | Enhanced shell | `!ls`, `!git`, `!http` |
|
|
104
|
+
| (none) | Chat with Zammy | `thanks`, `wow`, `:(` |
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Features
|
|
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
|
|
98
122
|
```
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
+
---
|
|
105
141
|
|
|
106
142
|
## Commands
|
|
107
143
|
|
|
@@ -109,161 +145,253 @@ zammy❯ /asciiart @img.png # Convert image to ASCII
|
|
|
109
145
|
|
|
110
146
|
| Command | Description |
|
|
111
147
|
|---------|-------------|
|
|
112
|
-
| `/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 |
|
|
113
159
|
| `/exit` | Exit Zammy |
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
|
118
|
-
|
|
119
|
-
| `/
|
|
120
|
-
| `/
|
|
121
|
-
| `/
|
|
160
|
+
|
|
161
|
+
### Developer Tools
|
|
162
|
+
|
|
163
|
+
| Command | Description |
|
|
164
|
+
|---------|-------------|
|
|
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 |
|
|
122
171
|
|
|
123
172
|
### Fun
|
|
124
173
|
|
|
125
174
|
| Command | Description |
|
|
126
175
|
|---------|-------------|
|
|
127
|
-
| `/
|
|
128
|
-
| `/
|
|
129
|
-
| `/
|
|
130
|
-
| `/
|
|
131
|
-
| `/
|
|
132
|
-
| `/
|
|
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 |
|
|
133
183
|
|
|
134
184
|
### Creative
|
|
135
185
|
|
|
136
186
|
| Command | Description |
|
|
137
187
|
|---------|-------------|
|
|
138
|
-
| `/asciiart
|
|
139
|
-
| `/figlet <text>` | Generate ASCII art
|
|
140
|
-
| `/lorem [
|
|
141
|
-
| `/color <hex
|
|
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 |
|
|
142
192
|
|
|
143
|
-
|
|
193
|
+
### Info
|
|
144
194
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
195
|
+
| Command | Description |
|
|
196
|
+
|---------|-------------|
|
|
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
|
+
---
|
|
148
204
|
|
|
149
|
-
|
|
205
|
+
## Enhanced Shell Commands
|
|
150
206
|
|
|
151
|
-
|
|
207
|
+
Prefix any command with `!` for enhanced versions:
|
|
152
208
|
|
|
209
|
+
### File Operations
|
|
153
210
|
```bash
|
|
154
|
-
|
|
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
|
|
155
217
|
```
|
|
156
218
|
|
|
157
|
-
Available fonts: Standard, Big, Slant, Small, Banner, Block, Bubble, Digital, Mini, Script, Shadow, Speed
|
|
158
|
-
|
|
159
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
|
+
```
|
|
160
228
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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
|
+
```
|
|
166
237
|
|
|
167
|
-
###
|
|
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
|
+
```
|
|
168
244
|
|
|
169
|
-
|
|
170
|
-
|---------|-------------|
|
|
171
|
-
| `/weather [city]` | Get current weather for a location |
|
|
245
|
+
---
|
|
172
246
|
|
|
173
|
-
##
|
|
247
|
+
## Plugin System
|
|
174
248
|
|
|
175
|
-
Zammy
|
|
249
|
+
Zammy is extensible through plugins. Install community plugins or create your own.
|
|
176
250
|
|
|
177
|
-
###
|
|
251
|
+
### Managing Plugins
|
|
178
252
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
| `!du` | Disk usage with visual progress bars |
|
|
187
|
-
| `!diff <f1> <f2>` | Compare files with colored output |
|
|
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
|
+
```
|
|
188
260
|
|
|
189
|
-
###
|
|
261
|
+
### Official Plugins
|
|
190
262
|
|
|
191
|
-
|
|
|
192
|
-
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
|
|
|
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 |
|
|
196
269
|
|
|
197
|
-
###
|
|
270
|
+
### Creating a Plugin
|
|
198
271
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
| `!json <file>` | Pretty print JSON |
|
|
203
|
-
| `!http GET <url>` | Quick HTTP requests |
|
|
204
|
-
| `!epoch [time]` | Timestamp converter |
|
|
205
|
-
| `!serve [port]` | Quick HTTP server |
|
|
272
|
+
```bash
|
|
273
|
+
/plugin create my-plugin
|
|
274
|
+
```
|
|
206
275
|
|
|
207
|
-
|
|
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
|
+
```
|
|
208
286
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
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
|
+
```
|
|
216
307
|
|
|
217
|
-
###
|
|
308
|
+
### Plugin API
|
|
218
309
|
|
|
219
|
-
|
|
220
|
-
- `ls` → Enhanced colorized listing
|
|
221
|
-
- `cat` → Syntax-highlighted output
|
|
222
|
-
- `rm`, `cp`, `mv` → Windows equivalents
|
|
223
|
-
- `grep` → Enhanced search
|
|
310
|
+
Plugins receive a full API for integration:
|
|
224
311
|
|
|
225
|
-
|
|
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
|
+
```
|
|
226
334
|
|
|
227
|
-
|
|
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)
|
|
228
343
|
|
|
229
|
-
|
|
344
|
+
---
|
|
230
345
|
|
|
231
|
-
|
|
232
|
-
- **Tab** — Select and insert command
|
|
233
|
-
- **Escape** — Close menu
|
|
234
|
-
- Type to filter commands
|
|
346
|
+
## Configuration
|
|
235
347
|
|
|
236
|
-
|
|
348
|
+
Zammy works out of the box with sensible defaults:
|
|
349
|
+
|
|
350
|
+
- **Double Ctrl+C** to exit (prevents accidents)
|
|
351
|
+
- **Persistent data** stored in `~/.zammy/`
|
|
352
|
+
- **Command history** remembered across sessions
|
|
353
|
+
|
|
354
|
+
### CLI Flags
|
|
237
355
|
|
|
238
356
|
```bash
|
|
239
|
-
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
|
|
240
361
|
```
|
|
241
362
|
|
|
242
|
-
|
|
363
|
+
---
|
|
243
364
|
|
|
244
|
-
|
|
365
|
+
## Comparison
|
|
245
366
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
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
|
+
---
|
|
249
378
|
|
|
250
379
|
## Development
|
|
251
380
|
|
|
252
381
|
```bash
|
|
253
|
-
#
|
|
382
|
+
# Clone and install
|
|
383
|
+
git clone https://github.com/aayushadhikari7/zammy-cli.git
|
|
384
|
+
cd zammy-cli
|
|
254
385
|
npm install
|
|
255
386
|
|
|
256
|
-
# Development
|
|
257
|
-
npm run dev
|
|
387
|
+
# Development
|
|
388
|
+
npm run dev # Watch mode
|
|
389
|
+
npm run build # Build
|
|
390
|
+
npm test # Run tests
|
|
258
391
|
|
|
259
|
-
#
|
|
260
|
-
npm
|
|
261
|
-
|
|
262
|
-
# Run tests
|
|
263
|
-
npm test
|
|
264
|
-
|
|
265
|
-
# Run tests once
|
|
266
|
-
npm run test:run
|
|
392
|
+
# Link for local testing
|
|
393
|
+
npm link
|
|
394
|
+
zammy
|
|
267
395
|
```
|
|
268
396
|
|
|
269
397
|
### Project Structure
|
|
@@ -271,72 +399,56 @@ npm run test:run
|
|
|
271
399
|
```
|
|
272
400
|
zammy-cli/
|
|
273
401
|
├── src/
|
|
274
|
-
│ ├── index.ts #
|
|
275
|
-
│ ├── cli.ts # Command parser
|
|
276
|
-
│ ├── commands/ #
|
|
277
|
-
│ │ ├──
|
|
278
|
-
│ │ ├──
|
|
279
|
-
│ │ ├──
|
|
280
|
-
│ │ ├──
|
|
281
|
-
│ │ ├──
|
|
282
|
-
│ │ └──
|
|
283
|
-
│ ├── handlers/ #
|
|
284
|
-
│
|
|
285
|
-
│
|
|
286
|
-
|
|
287
|
-
│
|
|
288
|
-
│
|
|
289
|
-
│
|
|
290
|
-
│
|
|
291
|
-
|
|
292
|
-
├── dist/ # Compiled output
|
|
293
|
-
└── 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
|
|
294
420
|
```
|
|
295
421
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
1. Create handler in `src/handlers/<category>/`:
|
|
422
|
+
---
|
|
299
423
|
|
|
300
|
-
|
|
301
|
-
// src/handlers/utilities/myhandler.ts
|
|
302
|
-
export function myFunction(input: string): string {
|
|
303
|
-
return `Processed: ${input}`;
|
|
304
|
-
}
|
|
305
|
-
```
|
|
424
|
+
## Contributing
|
|
306
425
|
|
|
307
|
-
|
|
426
|
+
We welcome contributions! Whether it's:
|
|
427
|
+
- New commands
|
|
428
|
+
- Bug fixes
|
|
429
|
+
- Plugin development
|
|
430
|
+
- Documentation improvements
|
|
308
431
|
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
registerCommand({
|
|
315
|
-
name: 'mycommand',
|
|
316
|
-
description: 'Does something cool',
|
|
317
|
-
usage: '/mycommand <input>',
|
|
318
|
-
async execute(args: string[]) {
|
|
319
|
-
console.log(myFunction(args[0]));
|
|
320
|
-
},
|
|
321
|
-
});
|
|
322
|
-
```
|
|
432
|
+
```bash
|
|
433
|
+
# 1. Fork the repo
|
|
434
|
+
# 2. Create a branch
|
|
435
|
+
git checkout -b feature/awesome-feature
|
|
323
436
|
|
|
324
|
-
3.
|
|
325
|
-
|
|
437
|
+
# 3. Make changes & test
|
|
438
|
+
npm test
|
|
326
439
|
|
|
327
|
-
|
|
440
|
+
# 4. Commit and push
|
|
441
|
+
git commit -m "Add awesome feature"
|
|
442
|
+
git push origin feature/awesome-feature
|
|
328
443
|
|
|
329
|
-
|
|
444
|
+
# 5. Open a Pull Request
|
|
445
|
+
```
|
|
330
446
|
|
|
331
|
-
|
|
332
|
-
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
333
|
-
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
334
|
-
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
335
|
-
5. Open a Pull Request
|
|
447
|
+
---
|
|
336
448
|
|
|
337
449
|
## License
|
|
338
450
|
|
|
339
|
-
|
|
451
|
+
MIT License — see [LICENSE](LICENSE) for details.
|
|
340
452
|
|
|
341
453
|
---
|
|
342
454
|
|
|
@@ -344,6 +456,8 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
|
|
344
456
|
|
|
345
457
|
**[Back to top](#zammy-cli)**
|
|
346
458
|
|
|
347
|
-
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!
|
|
348
462
|
|
|
349
463
|
</div>
|