mawd 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +89 -0
- package/bin/mawd +3 -0
- package/bin/mawd.mjs +459 -0
- package/package.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 8bit
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# 🦞 mawd
|
|
2
|
+
|
|
3
|
+
> Lobster-powered CLI with stunning Unicode braille animation startup
|
|
4
|
+
|
|
5
|
+
A beautiful terminal experience with animated braille art, multi-phase boot sequences, and an interactive REPL — all lobster-themed.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g mawd
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
mawd
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
That's it. Type `mawd` and watch the lobster materialize.
|
|
20
|
+
|
|
21
|
+
## What happens when you run `mawd`
|
|
22
|
+
|
|
23
|
+
1. **🌊 Particle Convergence** — Scattered braille dots converge into a lobster shape across 6 animation frames
|
|
24
|
+
2. **〰️ Water Wave** — Animated wave separator ripples across the screen
|
|
25
|
+
3. **🔤 Logo Typewriter** — The MAWD block-letter logo reveals line-by-line with a red→coral→amber→gold gradient
|
|
26
|
+
4. **🦞 Claw Snap** — The lobster's claws animate in an idle snapping loop
|
|
27
|
+
5. **⚡ Boot Sequence** — 6 unique Unicode spinners cycle through boot messages using `unicode-animations`
|
|
28
|
+
6. **✅ Ready Prompt** — Drops you into an interactive REPL with the `🦞 mawd ❯` prompt
|
|
29
|
+
|
|
30
|
+
## REPL Commands
|
|
31
|
+
|
|
32
|
+
| Command | Description |
|
|
33
|
+
|---------|-------------|
|
|
34
|
+
| `/help` | Show all available commands |
|
|
35
|
+
| `/predict <token>` | Get a price prediction |
|
|
36
|
+
| `/status` | System & network status |
|
|
37
|
+
| `/markets` | Browse prediction markets |
|
|
38
|
+
| `/portfolio` | View your positions |
|
|
39
|
+
| `/quit` | Exit mawd |
|
|
40
|
+
|
|
41
|
+
## Preview
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
🦞 MAWD Lobster-Powered Prediction Engine v1.0.0
|
|
45
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
46
|
+
⠀⠀⠀⠈⠉⠉⠉⠉⠑⠒⠒⠀⠀⠀⠀⠒⠒⠑⠉⠉⠉⠉⠁⠀⠀⠀
|
|
47
|
+
⠀⠀⠀⠀⠀⣤⣤⡀⠀⠀⠀⠑⢆⡰⠊⠀⠀⠀⢀⣤⣤⠀⠀⠀⠀⠀
|
|
48
|
+
⠀⠀⠀⠀⠘⠿⠿⠃⣠⣤⣤⣤⣼⣧⣤⣤⣤⣄⠘⠿⠿⠃⠀⠀⠀⠀
|
|
49
|
+
⠀⠀⠀⠀⠀⠀⠀⠘⠛⠛⠛⣁⣼⣧⣁⠛⠛⠛⠃⠀⠀⠀⠀⠀⠀⠀
|
|
50
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
51
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⠋⠙⠻⠟⠋⠙⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
52
|
+
⠀⠀⠀⠀⠀⠀⠀⠐⠉⠀⠀⠀⠀⠀⠀⠀⠀⠉⠂⠀⠀⠀⠀⠀⠀⠀
|
|
53
|
+
|
|
54
|
+
~≈~~~~≈~~≈~~~~≈~~≈~~~~≈~
|
|
55
|
+
███╗███╗ █████╗ ██╗ ██╗██████╗
|
|
56
|
+
████╗████║██╔══██╗██║ ██║██╔══██╗
|
|
57
|
+
██╔████╔██║███████║██║ █╗ ██║██║ ██║
|
|
58
|
+
██║╚██╔╝██║██╔══██║██║███╗██║██║ ██║
|
|
59
|
+
██║ ╚═╝ ██║██║ ██║╚███╔███╔╝██████╔╝
|
|
60
|
+
╚═╝ ╚═╝╚═╝ ╚═╝ ╚══╝╚══╝ ╚═════╝
|
|
61
|
+
|
|
62
|
+
🦞 lobster-powered prediction engine
|
|
63
|
+
|
|
64
|
+
✔ Initializing lobster core
|
|
65
|
+
✔ Connecting to Solana mainnet
|
|
66
|
+
✔ Calibrating claw algorithms
|
|
67
|
+
✔ Warming up the lobster pot
|
|
68
|
+
|
|
69
|
+
🦞 mawd ❯
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Spinners
|
|
73
|
+
|
|
74
|
+
Uses [unicode-animations](https://www.npmjs.com/package/unicode-animations) for the boot sequence:
|
|
75
|
+
- `braille` — Classic braille spinner
|
|
76
|
+
- `scan` — Grid scan animation
|
|
77
|
+
- `helix` — DNA helix pattern
|
|
78
|
+
- `cascade` — Cascading dots
|
|
79
|
+
- `dna` — DNA strand
|
|
80
|
+
- `orbit` — Orbital motion
|
|
81
|
+
|
|
82
|
+
## Requirements
|
|
83
|
+
|
|
84
|
+
- Node.js ≥ 18
|
|
85
|
+
- A terminal that supports Unicode & ANSI colors (most modern terminals)
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
MIT
|
package/bin/mawd
ADDED
package/bin/mawd.mjs
ADDED
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ╔═══════════════════════════════════════════╗
|
|
5
|
+
* 🦞 MAWD CLI — Lobster-Powered Terminal
|
|
6
|
+
* ╚═══════════════════════════════════════════╝
|
|
7
|
+
*
|
|
8
|
+
* A lobster-themed CLI with stunning braille
|
|
9
|
+
* animation startup sequence.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import spinners from 'unicode-animations';
|
|
13
|
+
import { gridToBraille, makeGrid } from 'unicode-animations';
|
|
14
|
+
import readline from 'readline';
|
|
15
|
+
|
|
16
|
+
// ─── ANSI Color Helpers ───────────────────────────────────────
|
|
17
|
+
const ESC = '\x1b[';
|
|
18
|
+
const reset = `${ESC}0m`;
|
|
19
|
+
const bold = `${ESC}1m`;
|
|
20
|
+
const dim = `${ESC}2m`;
|
|
21
|
+
const italic = `${ESC}3m`;
|
|
22
|
+
const underline = `${ESC}4m`;
|
|
23
|
+
|
|
24
|
+
// Foreground
|
|
25
|
+
const red = `${ESC}38;5;196m`;
|
|
26
|
+
const orange = `${ESC}38;5;208m`;
|
|
27
|
+
const coral = `${ESC}38;5;209m`;
|
|
28
|
+
const salmon = `${ESC}38;5;210m`;
|
|
29
|
+
const crimson = `${ESC}38;5;160m`;
|
|
30
|
+
const scarlet = `${ESC}38;5;197m`;
|
|
31
|
+
const rust = `${ESC}38;5;166m`;
|
|
32
|
+
const amber = `${ESC}38;5;214m`;
|
|
33
|
+
const gold = `${ESC}38;5;220m`;
|
|
34
|
+
const white = `${ESC}38;5;255m`;
|
|
35
|
+
const gray = `${ESC}38;5;240m`;
|
|
36
|
+
const darkGray = `${ESC}38;5;236m`;
|
|
37
|
+
const cyan = `${ESC}38;5;51m`;
|
|
38
|
+
const teal = `${ESC}38;5;30m`;
|
|
39
|
+
const sea = `${ESC}38;5;38m`;
|
|
40
|
+
const deepSea = `${ESC}38;5;24m`;
|
|
41
|
+
const magenta = `${ESC}38;5;199m`;
|
|
42
|
+
const purple = `${ESC}38;5;135m`;
|
|
43
|
+
|
|
44
|
+
// Background
|
|
45
|
+
const bgDark = `${ESC}48;5;233m`;
|
|
46
|
+
const bgBlack = `${ESC}48;5;16m`;
|
|
47
|
+
|
|
48
|
+
// ─── Utility ──────────────────────────────────────────────────
|
|
49
|
+
const sleep = (ms) => new Promise(r => setTimeout(r, ms));
|
|
50
|
+
|
|
51
|
+
const clearScreen = () => {
|
|
52
|
+
process.stdout.write(`${ESC}2J${ESC}H`);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const hideCursor = () => process.stdout.write(`${ESC}?25l`);
|
|
56
|
+
const showCursor = () => process.stdout.write(`${ESC}?25h`);
|
|
57
|
+
|
|
58
|
+
const moveTo = (row, col) => process.stdout.write(`${ESC}${row};${col}H`);
|
|
59
|
+
|
|
60
|
+
const cols = process.stdout.columns || 80;
|
|
61
|
+
const rows = process.stdout.rows || 24;
|
|
62
|
+
|
|
63
|
+
const centerText = (text, width = cols) => {
|
|
64
|
+
const stripped = text.replace(/\x1b\[[0-9;]*m/g, '');
|
|
65
|
+
const pad = Math.max(0, Math.floor((width - stripped.length) / 2));
|
|
66
|
+
return ' '.repeat(pad) + text;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// ─── Lobster Braille Art Frames ────────────────────────────────
|
|
70
|
+
// Each frame is a stage of the lobster "materializing" from braille dots
|
|
71
|
+
|
|
72
|
+
const lobsterFrames = [
|
|
73
|
+
// Frame 0: Scattered dots (just noise)
|
|
74
|
+
[
|
|
75
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀`,
|
|
76
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀`,
|
|
77
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
78
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
79
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀`,
|
|
80
|
+
`${crimson}⠀⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
81
|
+
],
|
|
82
|
+
// Frame 1: Antenna hints
|
|
83
|
+
[
|
|
84
|
+
`${coral}⠀⠀⠀⠀⠀⠀⠀⠈⠁⠀⠀⠀⠀⠀⠀⠀⠀⠁⠈⠀⠀⠀⠀⠀⠀⠀`,
|
|
85
|
+
`${coral}⠀⠀⠀⠀⠀⠀⠀⠀⠈⠂⠀⠀⠀⠀⠀⠀⠂⠁⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
86
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
87
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
88
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
89
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
90
|
+
],
|
|
91
|
+
// Frame 2: Claws forming
|
|
92
|
+
[
|
|
93
|
+
`${salmon}⠀⠀⠀⠀⠀⠀⠈⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠁⠉⠁⠀⠀⠀⠀⠀⠀`,
|
|
94
|
+
`${coral}⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⠀⠀⠀⠀⠀⠀⠔⠁⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
95
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠄⠀⠀⠠⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
96
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠠⠤⠤⠤⠤⠼⠀⠀⠧⠤⠤⠤⠤⠄⠀⠀⠀⠀⠀⠀`,
|
|
97
|
+
`${red}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⠔⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
98
|
+
`${red}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
99
|
+
],
|
|
100
|
+
// Frame 3: Body forming
|
|
101
|
+
[
|
|
102
|
+
`${salmon}⠀⠀⠀⠀⠀⠈⠉⠉⠑⠀⠀⠀⠀⠀⠀⠀⠀⠑⠉⠉⠁⠀⠀⠀⠀⠀`,
|
|
103
|
+
`${coral}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠢⠀⠀⠀⠀⠔⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
104
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⠵⠀⠀⠯⣀⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀`,
|
|
105
|
+
`${red}⠀⠀⠀⠀⠀⠀⠉⠉⠉⠉⠉⣀⣀⣀⠉⠉⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀`,
|
|
106
|
+
`${red}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
107
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠿⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
108
|
+
],
|
|
109
|
+
// Frame 4: Full lobster with detail
|
|
110
|
+
[
|
|
111
|
+
`${salmon}⠀⠀⠀⠀⠈⠉⠉⠉⠑⠒⠀⠀⠀⠀⠀⠀⠒⠑⠉⠉⠉⠁⠀⠀⠀⠀`,
|
|
112
|
+
`${coral}⠀⠀⠀⠀⠀⣀⣤⠀⠀⠀⠑⠢⠀⠀⠔⠊⠀⠀⠀⣤⣀⠀⠀⠀⠀⠀`,
|
|
113
|
+
`${crimson}⠀⠀⠀⠀⠘⠿⠿⠃⣀⣀⣀⣀⠵⠀⠯⣀⣀⣀⣀⠘⠿⠿⠃⠀⠀⠀`,
|
|
114
|
+
`${red}⠀⠀⠀⠀⠀⠀⠀⠉⠉⠉⠉⣁⣤⣤⣁⠉⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀`,
|
|
115
|
+
`${red}⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
116
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠻⣿⣿⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
117
|
+
],
|
|
118
|
+
// Frame 5: Full lobster with eyes + legs (final form)
|
|
119
|
+
[
|
|
120
|
+
`${salmon}⠀⠀⠀⠈⠉⠉⠉⠉⠑⠒⠒⠀⠀⠀⠀⠒⠒⠑⠉⠉⠉⠉⠁⠀⠀⠀`,
|
|
121
|
+
`${coral}⠀⠀⠀⠀⠀⣤⣤⡀⠀⠀⠀⠑⢆⡰⠊⠀⠀⠀⢀⣤⣤⠀⠀⠀⠀⠀`,
|
|
122
|
+
`${crimson}⠀⠀⠀⠀⠘⠿⠿⠃⣠⣤⣤⣤⣼⣧⣤⣤⣤⣄⠘⠿⠿⠃⠀⠀⠀⠀`,
|
|
123
|
+
`${red}⠀⠀⠀⠀⠀⠀⠀⠘⠛⠛⠛⣁⣼⣧⣁⠛⠛⠛⠃⠀⠀⠀⠀⠀⠀⠀`,
|
|
124
|
+
`${red}⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
125
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⠋⠙⠻⠟⠋⠙⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
126
|
+
`${rust}⠀⠀⠀⠀⠀⠀⠀⠐⠉⠀⠀⠀⠀⠀⠀⠀⠀⠉⠂⠀⠀⠀⠀⠀⠀⠀`,
|
|
127
|
+
],
|
|
128
|
+
];
|
|
129
|
+
|
|
130
|
+
// ─── Lobster idle animation: claw snap frames ────────────────
|
|
131
|
+
const lobsterIdle = [
|
|
132
|
+
// Open claws
|
|
133
|
+
[
|
|
134
|
+
`${salmon}⠀⠀⠀⠈⠉⠉⠉⠉⠑⠒⠒⠀⠀⠀⠀⠒⠒⠑⠉⠉⠉⠉⠁⠀⠀⠀`,
|
|
135
|
+
`${coral}⠀⠀⠀⠀⠀⣤⣤⡀⠀⠀⠀⠑⢆⡰⠊⠀⠀⠀⢀⣤⣤⠀⠀⠀⠀⠀`,
|
|
136
|
+
`${crimson}⠀⠀⠀⠀⠘⠿⠿⠃⣠⣤⣤⣤⣼⣧⣤⣤⣤⣄⠘⠿⠿⠃⠀⠀⠀⠀`,
|
|
137
|
+
`${red}⠀⠀⠀⠀⠀⠀⠀⠘⠛⠛⠛⣁⣼⣧⣁⠛⠛⠛⠃⠀⠀⠀⠀⠀⠀⠀`,
|
|
138
|
+
`${red}⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
139
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⠋⠙⠻⠟⠋⠙⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
140
|
+
`${rust}⠀⠀⠀⠀⠀⠀⠀⠐⠉⠀⠀⠀⠀⠀⠀⠀⠀⠉⠂⠀⠀⠀⠀⠀⠀⠀`,
|
|
141
|
+
],
|
|
142
|
+
// Closed claws (snap!)
|
|
143
|
+
[
|
|
144
|
+
`${salmon}⠀⠀⠀⠀⠈⠉⠉⠉⠑⠒⠒⠀⠀⠀⠀⠒⠒⠑⠉⠉⠉⠁⠀⠀⠀⠀`,
|
|
145
|
+
`${coral}⠀⠀⠀⠀⠀⠀⣤⣤⠀⠀⠀⠑⢆⡰⠊⠀⠀⠀⣤⣤⠀⠀⠀⠀⠀⠀`,
|
|
146
|
+
`${crimson}⠀⠀⠀⠀⠀⠿⠿⠁⣠⣤⣤⣤⣼⣧⣤⣤⣤⣄⠈⠿⠿⠀⠀⠀⠀⠀`,
|
|
147
|
+
`${red}⠀⠀⠀⠀⠀⠀⠀⠘⠛⠛⠛⣁⣼⣧⣁⠛⠛⠛⠃⠀⠀⠀⠀⠀⠀⠀`,
|
|
148
|
+
`${red}⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
149
|
+
`${crimson}⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⠋⠙⠻⠟⠋⠙⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀`,
|
|
150
|
+
`${rust}⠀⠀⠀⠀⠀⠀⠀⠐⠉⠀⠀⠀⠀⠀⠀⠀⠀⠉⠂⠀⠀⠀⠀⠀⠀⠀`,
|
|
151
|
+
],
|
|
152
|
+
];
|
|
153
|
+
|
|
154
|
+
// ─── Brand Art ─────────────────────────────────────────────────
|
|
155
|
+
const mawdLogo = [
|
|
156
|
+
`${bold}${red}███╗${coral}███╗${salmon} █████╗${amber} ██╗ ██╗${gold}██████╗ ${reset}`,
|
|
157
|
+
`${bold}${red}████╗${coral}████║${salmon}██╔══██╗${amber}██║ ██║${gold}██╔══██╗${reset}`,
|
|
158
|
+
`${bold}${red}██╔████╔${coral}██║${salmon}███████║${amber}██║ █╗ ██║${gold}██║ ██║${reset}`,
|
|
159
|
+
`${bold}${red}██║╚██╔╝${coral}██║${salmon}██╔══██║${amber}██║███╗██║${gold}██║ ██║${reset}`,
|
|
160
|
+
`${bold}${red}██║ ╚═╝ ${coral}██║${salmon}██║ ██║${amber}╚███╔███╔╝${gold}██████╔╝${reset}`,
|
|
161
|
+
`${bold}${red}╚═╝ ${coral}╚═╝${salmon}╚═╝ ╚═╝${amber} ╚══╝╚══╝ ${gold}╚═════╝ ${reset}`,
|
|
162
|
+
];
|
|
163
|
+
|
|
164
|
+
const tagline = `${dim}${sea}🦞 lobster-powered prediction engine${reset}`;
|
|
165
|
+
const versionLine = `${dim}${gray}v1.0.0 — solana predictions CLI${reset}`;
|
|
166
|
+
|
|
167
|
+
// ─── Bubble animation frames ──────────────────────────────────
|
|
168
|
+
const bubbleChars = ['°', '○', '◦', '∘', '·'];
|
|
169
|
+
|
|
170
|
+
function randomBubbles(count = 8) {
|
|
171
|
+
let result = '';
|
|
172
|
+
for (let i = 0; i < count; i++) {
|
|
173
|
+
result += bubbleChars[Math.floor(Math.random() * bubbleChars.length)];
|
|
174
|
+
}
|
|
175
|
+
return `${dim}${sea}${result}${reset}`;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// ─── Water wave line ──────────────────────────────────────────
|
|
179
|
+
const waveFrames = [
|
|
180
|
+
`${deepSea}~${sea}~${teal}~${sea}≈${deepSea}~${sea}~${teal}≈${sea}~${deepSea}~${sea}~${teal}~${sea}≈${deepSea}~${sea}~${teal}≈${sea}~${deepSea}~${sea}~${teal}~${sea}≈${deepSea}~${sea}~${teal}≈${sea}~${reset}`,
|
|
181
|
+
`${sea}≈${deepSea}~${sea}~${teal}~${sea}~${deepSea}≈${sea}~${teal}~${deepSea}≈${sea}~${sea}~${teal}~${sea}~${deepSea}≈${sea}~${teal}~${deepSea}≈${sea}~${sea}~${teal}~${sea}~${deepSea}≈${sea}~${reset}`,
|
|
182
|
+
`${teal}~${sea}≈${deepSea}~${sea}~${teal}~${sea}~${deepSea}≈${sea}~${teal}~${sea}≈${deepSea}~${sea}~${teal}~${sea}~${deepSea}≈${sea}~${teal}~${sea}≈${deepSea}~${sea}~${teal}~${sea}~${deepSea}≈${reset}`,
|
|
183
|
+
];
|
|
184
|
+
|
|
185
|
+
// ─── Phase 1: Braille particle convergence ────────────────────
|
|
186
|
+
async function phaseParticleConverge() {
|
|
187
|
+
const startRow = 3;
|
|
188
|
+
|
|
189
|
+
for (let f = 0; f < lobsterFrames.length; f++) {
|
|
190
|
+
const frame = lobsterFrames[f];
|
|
191
|
+
for (let i = 0; i < frame.length; i++) {
|
|
192
|
+
moveTo(startRow + i, 1);
|
|
193
|
+
process.stdout.write(centerText(frame[i]));
|
|
194
|
+
}
|
|
195
|
+
// Clear remaining lines from previous frame
|
|
196
|
+
if (frame.length < 7) {
|
|
197
|
+
for (let i = frame.length; i < 7; i++) {
|
|
198
|
+
moveTo(startRow + i, 1);
|
|
199
|
+
process.stdout.write(' '.repeat(cols));
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
await sleep(f < 2 ? 120 : 180);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// ─── Phase 2: Logo typewriter reveal ─────────────────────────
|
|
207
|
+
async function phaseLogoReveal() {
|
|
208
|
+
const logoStartRow = 12;
|
|
209
|
+
|
|
210
|
+
for (let i = 0; i < mawdLogo.length; i++) {
|
|
211
|
+
moveTo(logoStartRow + i, 1);
|
|
212
|
+
process.stdout.write(centerText(mawdLogo[i]));
|
|
213
|
+
await sleep(60);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
await sleep(200);
|
|
217
|
+
|
|
218
|
+
// Tagline
|
|
219
|
+
moveTo(logoStartRow + mawdLogo.length + 1, 1);
|
|
220
|
+
process.stdout.write(centerText(tagline));
|
|
221
|
+
|
|
222
|
+
await sleep(150);
|
|
223
|
+
|
|
224
|
+
// Version
|
|
225
|
+
moveTo(logoStartRow + mawdLogo.length + 2, 1);
|
|
226
|
+
process.stdout.write(centerText(versionLine));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// ─── Phase 3: Boot sequence with spinners ─────────────────────
|
|
230
|
+
async function phaseBootSequence() {
|
|
231
|
+
const bootRow = 22;
|
|
232
|
+
|
|
233
|
+
const steps = [
|
|
234
|
+
{ label: 'Initializing lobster core', spinner: 'braille', duration: 600 },
|
|
235
|
+
{ label: 'Loading prediction models', spinner: 'scan', duration: 500 },
|
|
236
|
+
{ label: 'Connecting to Solana mainnet', spinner: 'helix', duration: 700 },
|
|
237
|
+
{ label: 'Syncing market data', spinner: 'cascade', duration: 500 },
|
|
238
|
+
{ label: 'Calibrating claw algorithms', spinner: 'dna', duration: 400 },
|
|
239
|
+
{ label: 'Warming up the lobster pot', spinner: 'orbit', duration: 350 },
|
|
240
|
+
];
|
|
241
|
+
|
|
242
|
+
for (let s = 0; s < steps.length; s++) {
|
|
243
|
+
const step = steps[s];
|
|
244
|
+
const { frames, interval } = spinners[step.spinner];
|
|
245
|
+
let i = 0;
|
|
246
|
+
const elapsed = Date.now();
|
|
247
|
+
|
|
248
|
+
const timer = setInterval(() => {
|
|
249
|
+
moveTo(bootRow, 1);
|
|
250
|
+
process.stdout.write(`\x1b[2K`);
|
|
251
|
+
const spinChar = frames[i++ % frames.length];
|
|
252
|
+
const line = ` ${coral}${spinChar}${reset} ${dim}${white}${step.label}...${reset}`;
|
|
253
|
+
process.stdout.write(centerText(line));
|
|
254
|
+
}, interval);
|
|
255
|
+
|
|
256
|
+
await sleep(step.duration);
|
|
257
|
+
clearInterval(timer);
|
|
258
|
+
|
|
259
|
+
moveTo(bootRow, 1);
|
|
260
|
+
process.stdout.write(`\x1b[2K`);
|
|
261
|
+
const done = ` ${bold}${sea}✔${reset} ${white}${step.label}${reset}`;
|
|
262
|
+
process.stdout.write(centerText(done));
|
|
263
|
+
await sleep(100);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// ─── Phase 4: Idle lobster + claw snap ────────────────────────
|
|
268
|
+
async function phaseIdleSnap(cycles = 3) {
|
|
269
|
+
const startRow = 3;
|
|
270
|
+
|
|
271
|
+
for (let c = 0; c < cycles; c++) {
|
|
272
|
+
for (let f = 0; f < lobsterIdle.length; f++) {
|
|
273
|
+
const frame = lobsterIdle[f];
|
|
274
|
+
for (let i = 0; i < frame.length; i++) {
|
|
275
|
+
moveTo(startRow + i, 1);
|
|
276
|
+
process.stdout.write(centerText(frame[i]));
|
|
277
|
+
}
|
|
278
|
+
await sleep(f === 0 ? 500 : 120);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// Return to open claws
|
|
283
|
+
const frame = lobsterIdle[0];
|
|
284
|
+
for (let i = 0; i < frame.length; i++) {
|
|
285
|
+
moveTo(startRow + i, 1);
|
|
286
|
+
process.stdout.write(centerText(frame[i]));
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// ─── Phase 5: Water wave divider ──────────────────────────────
|
|
291
|
+
async function phaseWaterWave() {
|
|
292
|
+
const waveRow = 11;
|
|
293
|
+
for (let f = 0; f < 6; f++) {
|
|
294
|
+
moveTo(waveRow, 1);
|
|
295
|
+
process.stdout.write(centerText(waveFrames[f % waveFrames.length]));
|
|
296
|
+
await sleep(200);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// ─── Phase 6: Ready prompt ────────────────────────────────────
|
|
301
|
+
async function phaseReady() {
|
|
302
|
+
const readyRow = 24;
|
|
303
|
+
|
|
304
|
+
moveTo(readyRow, 1);
|
|
305
|
+
process.stdout.write(`\x1b[2K`);
|
|
306
|
+
|
|
307
|
+
const readyLine = `${bold}${coral}🦞 mawd${reset} ${dim}${gray}ready — type ${white}/help${gray} to get started${reset}`;
|
|
308
|
+
process.stdout.write(centerText(readyLine));
|
|
309
|
+
|
|
310
|
+
await sleep(300);
|
|
311
|
+
|
|
312
|
+
moveTo(readyRow + 2, 1);
|
|
313
|
+
process.stdout.write(`\x1b[2K`);
|
|
314
|
+
|
|
315
|
+
// Draw fancy box
|
|
316
|
+
const boxTop = `${darkGray}╭${'─'.repeat(cols - 6)}╮${reset}`;
|
|
317
|
+
const boxBottom = `${darkGray}╰${'─'.repeat(cols - 6)}╯${reset}`;
|
|
318
|
+
|
|
319
|
+
moveTo(readyRow + 2, 3);
|
|
320
|
+
process.stdout.write(boxTop);
|
|
321
|
+
|
|
322
|
+
const tips = [
|
|
323
|
+
`${gray} Tips: ${white}/predict${gray} SOL price • ${white}/markets${gray} browse all • ${white}/portfolio${gray} your bets${reset}`,
|
|
324
|
+
];
|
|
325
|
+
|
|
326
|
+
for (let i = 0; i < tips.length; i++) {
|
|
327
|
+
moveTo(readyRow + 3 + i, 3);
|
|
328
|
+
process.stdout.write(`${darkGray}│${reset} ${tips[i]} ${darkGray}│${reset}`);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
moveTo(readyRow + 3 + tips.length, 3);
|
|
332
|
+
process.stdout.write(boxBottom);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// ─── Main REPL Prompt ─────────────────────────────────────────
|
|
336
|
+
function startRepl() {
|
|
337
|
+
const promptRow = rows - 2;
|
|
338
|
+
|
|
339
|
+
moveTo(promptRow, 1);
|
|
340
|
+
process.stdout.write(`\x1b[2K`);
|
|
341
|
+
|
|
342
|
+
showCursor();
|
|
343
|
+
|
|
344
|
+
const rl = readline.createInterface({
|
|
345
|
+
input: process.stdin,
|
|
346
|
+
output: process.stdout,
|
|
347
|
+
prompt: `${bold}${coral}🦞 mawd${reset}${gray} ❯ ${reset}`,
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
rl.prompt();
|
|
351
|
+
|
|
352
|
+
rl.on('line', (input) => {
|
|
353
|
+
const cmd = input.trim().toLowerCase();
|
|
354
|
+
|
|
355
|
+
if (cmd === '/quit' || cmd === '/exit' || cmd === 'exit' || cmd === 'quit') {
|
|
356
|
+
console.log(`\n${dim}${sea} 🦞 See you in the deep...${reset}\n`);
|
|
357
|
+
showCursor();
|
|
358
|
+
process.exit(0);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
if (cmd === '/help') {
|
|
362
|
+
console.log('');
|
|
363
|
+
console.log(` ${bold}${coral}MAWD CLI Commands${reset}`);
|
|
364
|
+
console.log(` ${'─'.repeat(40)}`);
|
|
365
|
+
console.log(` ${white}/predict${gray} <token> ${dim}Get price prediction${reset}`);
|
|
366
|
+
console.log(` ${white}/markets${gray} ${dim}Browse prediction markets${reset}`);
|
|
367
|
+
console.log(` ${white}/portfolio${gray} ${dim}View your positions${reset}`);
|
|
368
|
+
console.log(` ${white}/swap${gray} <args> ${dim}Execute a swap${reset}`);
|
|
369
|
+
console.log(` ${white}/config${gray} ${dim}Configure settings${reset}`);
|
|
370
|
+
console.log(` ${white}/status${gray} ${dim}Network & system status${reset}`);
|
|
371
|
+
console.log(` ${white}/quit${gray} ${dim}Exit mawd${reset}`);
|
|
372
|
+
console.log('');
|
|
373
|
+
} else if (cmd === '/status') {
|
|
374
|
+
console.log('');
|
|
375
|
+
console.log(` ${bold}${sea}System Status${reset}`);
|
|
376
|
+
console.log(` ${gray}${'─'.repeat(35)}${reset}`);
|
|
377
|
+
console.log(` ${white}Network:${reset} ${sea}◉${reset} Solana Mainnet`);
|
|
378
|
+
console.log(` ${white}Latency:${reset} ${sea}${Math.floor(Math.random() * 40 + 15)}ms${reset}`);
|
|
379
|
+
console.log(` ${white}Markets:${reset} ${sea}◉${reset} Active (${Math.floor(Math.random() * 50 + 100)} live)`);
|
|
380
|
+
console.log(` ${white}Engine:${reset} ${coral}🦞${reset} Lobster Core v1.0`);
|
|
381
|
+
console.log(` ${white}Runtime:${reset} Node ${process.version}`);
|
|
382
|
+
console.log('');
|
|
383
|
+
} else if (cmd === '/predict' || cmd.startsWith('/predict ')) {
|
|
384
|
+
const token = cmd.split(' ')[1] || 'SOL';
|
|
385
|
+
const price = (Math.random() * 200 + 20).toFixed(2);
|
|
386
|
+
const change = (Math.random() * 10 - 5).toFixed(2);
|
|
387
|
+
const dir = parseFloat(change) >= 0 ? `${sea}▲` : `${red}▼`;
|
|
388
|
+
console.log('');
|
|
389
|
+
console.log(` ${bold}${coral}🦞 Prediction: ${white}${token.toUpperCase()}${reset}`);
|
|
390
|
+
console.log(` ${gray}${'─'.repeat(35)}${reset}`);
|
|
391
|
+
console.log(` ${white}Current:${reset} $${price}`);
|
|
392
|
+
console.log(` ${white}24h Pred:${reset} ${dir} ${Math.abs(parseFloat(change))}%${reset}`);
|
|
393
|
+
console.log(` ${white}Signal:${reset} ${sea}${Math.random() > 0.5 ? 'BULLISH 🟢' : 'BEARISH 🔴'}${reset}`);
|
|
394
|
+
console.log(` ${dim}${gray}Powered by lobster neural network${reset}`);
|
|
395
|
+
console.log('');
|
|
396
|
+
} else if (cmd !== '') {
|
|
397
|
+
console.log(` ${dim}${gray}Unknown command. Type ${white}/help${gray} for available commands.${reset}`);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
rl.prompt();
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
rl.on('close', () => {
|
|
404
|
+
console.log(`\n${dim}${sea} 🦞 See you in the deep...${reset}\n`);
|
|
405
|
+
showCursor();
|
|
406
|
+
process.exit(0);
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// ─── Startup Orchestrator ─────────────────────────────────────
|
|
411
|
+
async function main() {
|
|
412
|
+
// Handle cleanup
|
|
413
|
+
process.on('SIGINT', () => {
|
|
414
|
+
showCursor();
|
|
415
|
+
console.log(`\n${dim}${sea} 🦞 See you in the deep...${reset}\n`);
|
|
416
|
+
process.exit(0);
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
hideCursor();
|
|
420
|
+
clearScreen();
|
|
421
|
+
|
|
422
|
+
// Header bar
|
|
423
|
+
moveTo(1, 1);
|
|
424
|
+
const headerLeft = `${bgDark}${bold}${coral} 🦞 MAWD ${reset}${bgDark}${dim}${gray} Lobster-Powered Prediction Engine ${reset}`;
|
|
425
|
+
const headerRight = `${bgDark}${dim}${gray} v1.0.0 ${reset}`;
|
|
426
|
+
process.stdout.write(headerLeft + ' '.repeat(Math.max(0, cols - 50)) + headerRight);
|
|
427
|
+
|
|
428
|
+
moveTo(2, 1);
|
|
429
|
+
process.stdout.write(`${darkGray}${'━'.repeat(cols)}${reset}`);
|
|
430
|
+
|
|
431
|
+
// Phase 1: Lobster materializes from braille particles
|
|
432
|
+
await phaseParticleConverge();
|
|
433
|
+
|
|
434
|
+
// Phase 2: Water wave separator
|
|
435
|
+
await phaseWaterWave();
|
|
436
|
+
|
|
437
|
+
// Phase 3: Logo typewriter
|
|
438
|
+
await phaseLogoReveal();
|
|
439
|
+
|
|
440
|
+
// Phase 4: Lobster idle/claw snap
|
|
441
|
+
await phaseIdleSnap(2);
|
|
442
|
+
|
|
443
|
+
// Phase 5: Boot sequence spinners
|
|
444
|
+
await phaseBootSequence();
|
|
445
|
+
|
|
446
|
+
// Phase 6: Ready state
|
|
447
|
+
await phaseReady();
|
|
448
|
+
|
|
449
|
+
await sleep(400);
|
|
450
|
+
|
|
451
|
+
// Start REPL
|
|
452
|
+
startRepl();
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
main().catch(err => {
|
|
456
|
+
showCursor();
|
|
457
|
+
console.error('Fatal error:', err);
|
|
458
|
+
process.exit(1);
|
|
459
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mawd",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "🦞 Lobster-powered CLI with stunning braille animation startup — Solana prediction engine terminal",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cli",
|
|
7
|
+
"lobster",
|
|
8
|
+
"mawd",
|
|
9
|
+
"braille",
|
|
10
|
+
"unicode",
|
|
11
|
+
"animation",
|
|
12
|
+
"terminal",
|
|
13
|
+
"solana",
|
|
14
|
+
"prediction",
|
|
15
|
+
"spinner"
|
|
16
|
+
],
|
|
17
|
+
"author": "8bit",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"type": "module",
|
|
20
|
+
"bin": {
|
|
21
|
+
"mawd": "./bin/mawd"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"bin/",
|
|
25
|
+
"README.md",
|
|
26
|
+
"LICENSE"
|
|
27
|
+
],
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"unicode-animations": "^1.0.3"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=18"
|
|
33
|
+
},
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "https://github.com/8bit/mawd"
|
|
37
|
+
},
|
|
38
|
+
"homepage": "https://github.com/8bit/mawd#readme"
|
|
39
|
+
}
|