hintshell 0.1.0-beta.3 โ 0.1.0-beta.4
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 +180 -119
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,176 +1,213 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/philau2512/hintshell/main/assets/logo.png" alt="HintShell Logo" width="120" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[]()
|
|
6
|
-
[]()
|
|
7
|
-
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
<h1 align="center">HintShell</h1>
|
|
6
|
+
<p align="center"><strong>Real-time Command Auto-Suggestion Engine for Your Terminal</strong></p>
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="https://www.npmjs.com/package/hintshell"><img src="https://img.shields.io/npm/v/hintshell?color=CB3837&label=npm" alt="NPM Version" /></a>
|
|
10
|
+
<a href="https://www.rust-lang.org/"><img src="https://img.shields.io/badge/Built_with-Rust-DEA584?logo=rust" alt="Rust" /></a>
|
|
11
|
+
<a href="#"><img src="https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-0078D4" alt="Platform" /></a>
|
|
12
|
+
<a href="#"><img src="https://img.shields.io/badge/Shell-PowerShell%20%7C%20Bash%20%7C%20Zsh-4D4D4D" alt="Shells" /></a>
|
|
13
|
+
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-green.svg" alt="MIT License" /></a>
|
|
14
|
+
</p>
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
<p align="center">
|
|
17
|
+
HintShell is <strong>not</strong> a terminal emulator. It's a lightweight engine that <strong>embeds into your existing shell</strong> โ PowerShell, Bash, or Zsh โ and provides real-time command suggestions as you type. Think of it like autocomplete on steroids: a scrollable suggestion list with fuzzy matching, frequency ranking, and inline command descriptions.
|
|
18
|
+
</p>
|
|
12
19
|
|
|
13
20
|
---
|
|
14
21
|
|
|
15
|
-
##
|
|
22
|
+
## โก Why HintShell?
|
|
16
23
|
|
|
17
|
-
|
|
18
|
-
- ๐ **Tab โ fzf picker** (Bash/Zsh) โ nhแบฅn Tab ฤแป chแปn lแปnh
|
|
19
|
-
- ๐ **Fuzzy matching** โ gรต sai vแบซn tรฌm ฤฦฐแปฃc lแปnh ฤรบng
|
|
20
|
-
- ๐งฎ **Frequency scoring** โ lแปnh dรนng nhiแปu xแบฟp trรชn
|
|
21
|
-
- ๐ฅ๏ธ **Cross-platform** โ Windows, macOS, Linux
|
|
22
|
-
- ๐ **Multi-shell** โ PowerShell, Bash, Zsh
|
|
24
|
+
Most shells offer basic, single-line autocomplete. HintShell replaces that with a **rich, interactive suggestion panel** โ right inside your terminal.
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
| Feature | HintShell | PowerShell <br>(PSReadLine) | Zsh <br>(zsh-autosuggestions) | Bash | Git Bash | Fish |
|
|
27
|
+
|---|:---:|:---:|:---:|:---:|:---:|:---:|
|
|
28
|
+
| **Suggestion UI** | Scrollable list | Single inline ghost | Single inline ghost | None | None | Single inline ghost |
|
|
29
|
+
| **Prefix matching** | โ
| โ
| โ
| โ
| โ | โ
|
|
|
30
|
+
| **Frequency ranking** | โ
| โ | โ | โ | โ | โ
|
|
|
31
|
+
| **Command descriptions** | โ
| โ | โ | โ | โ | โ |
|
|
32
|
+
| **Cross-shell** | โ
| PowerShell only | Zsh only | Bash only | โ | Fish only |
|
|
33
|
+
| **Learns from history** | โ
| โ
| โ
| โ | โ | โ
|
|
|
34
|
+
| **600+ built-in commands** | โ
| โ | โ | โ | โ | โ |
|
|
35
|
+
| **Works with any terminal** | โ
| โ
| โ
| โ
| โ
| โ
|
|
|
36
|
+
|
|
37
|
+
> **TL;DR** โ Other shells give you one dim ghost suggestion. HintShell gives you a full list, ranked by how often you use each command, with a description of what every command does.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## ๐ธ How It Looks
|
|
25
42
|
|
|
26
43
|
```
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
โ
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
37
|
-
โ Shell Integration โ
|
|
38
|
-
โ PowerShell / Bash / Zsh โ
|
|
39
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
44
|
+
PS> git ch
|
|
45
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
46
|
+
โ > git checkout main (12x) [1/30]โ
|
|
47
|
+
โ git cherry-pick (3x) [2/30]โ
|
|
48
|
+
โ git checkout -b (2x) [3/30]โ
|
|
49
|
+
โ git checkout -- (1x) [4/30]โ
|
|
50
|
+
โ git cherry-pick --abort (1x) [5/30]โ
|
|
51
|
+
โ ๐ก Switch branches or restore working treeโ
|
|
52
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
40
53
|
```
|
|
41
54
|
|
|
42
|
-
-
|
|
43
|
-
- **
|
|
44
|
-
- **
|
|
55
|
+
- **โ / โ** โ Navigate the list
|
|
56
|
+
- **Tab** โ Accept the selected suggestion
|
|
57
|
+
- **Enter** โ Execute the current command line
|
|
58
|
+
- **Esc** โ Dismiss the panel
|
|
45
59
|
|
|
46
60
|
---
|
|
47
61
|
|
|
48
|
-
## ๐
|
|
62
|
+
## ๐ Installation
|
|
63
|
+
|
|
64
|
+
### Option A โ via NPM (Recommended)
|
|
49
65
|
|
|
50
|
-
|
|
66
|
+
Works on **Windows**, **macOS**, and **Linux**. Automatically downloads the correct binary for your platform.
|
|
51
67
|
|
|
52
68
|
```bash
|
|
53
|
-
# 1. Cร i ฤแบทt global
|
|
54
69
|
npm install -g hintshell
|
|
55
|
-
|
|
56
|
-
# 2. Khแปi tแบกo (tแปฑ ฤแปng cแบฅu hรฌnh shell)
|
|
57
70
|
hintshell init
|
|
71
|
+
```
|
|
58
72
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
73
|
+
Then **restart your terminal** (or reload your shell config):
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# PowerShell
|
|
77
|
+
. $PROFILE
|
|
78
|
+
|
|
79
|
+
# Bash
|
|
80
|
+
source ~/.bashrc
|
|
81
|
+
|
|
82
|
+
# Zsh
|
|
83
|
+
source ~/.zshrc
|
|
62
84
|
```
|
|
63
85
|
|
|
64
|
-
###
|
|
86
|
+
### Option B โ Download from GitHub Releases
|
|
65
87
|
|
|
66
|
-
|
|
88
|
+
Go to [**Releases**](https://github.com/philau2512/hintshell/releases), download the archive for your OS, extract it, and run:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
hintshell init
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Option C โ Build from Source
|
|
95
|
+
|
|
96
|
+
Requires [Rust](https://rustup.rs/).
|
|
67
97
|
|
|
68
98
|
```bash
|
|
69
99
|
git clone https://github.com/philau2512/hintshell.git
|
|
70
100
|
cd hintshell
|
|
71
101
|
cargo build --release
|
|
72
|
-
./target/release/hintshell init
|
|
102
|
+
./target/release/hintshell init # Linux / macOS
|
|
103
|
+
.\target\release\hintshell.exe init # Windows
|
|
73
104
|
```
|
|
74
105
|
|
|
75
106
|
---
|
|
76
107
|
|
|
77
|
-
##
|
|
108
|
+
## ๐๏ธ Uninstall
|
|
78
109
|
|
|
110
|
+
### If installed via NPM
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
npm uninstall -g hintshell
|
|
79
114
|
```
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
115
|
+
|
|
116
|
+
### Complete cleanup (all platforms)
|
|
117
|
+
|
|
118
|
+
Remove the HintShell data directory and any shell configuration lines it added:
|
|
119
|
+
|
|
120
|
+
**Windows (PowerShell):**
|
|
121
|
+
```powershell
|
|
122
|
+
# 1. Stop the daemon
|
|
123
|
+
hs stop
|
|
124
|
+
|
|
125
|
+
# 2. Remove data directory
|
|
126
|
+
Remove-Item -Recurse -Force "$HOME\.hintshell"
|
|
127
|
+
|
|
128
|
+
# 3. Edit your PowerShell profile and remove the HintShell lines
|
|
129
|
+
notepad $PROFILE
|
|
130
|
+
# Delete lines related to "HintShell" or "Import-Module HintShellModule"
|
|
93
131
|
```
|
|
94
132
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
133
|
+
**macOS / Linux:**
|
|
134
|
+
```bash
|
|
135
|
+
# 1. Stop the daemon
|
|
136
|
+
hs stop
|
|
137
|
+
|
|
138
|
+
# 2. Remove data directory
|
|
139
|
+
rm -rf ~/.hintshell
|
|
140
|
+
|
|
141
|
+
# 3. Remove the hook line from your shell config
|
|
142
|
+
# For Bash: edit ~/.bashrc
|
|
143
|
+
# For Zsh: edit ~/.zshrc
|
|
144
|
+
# Delete the line: eval "$(hintshell hook bash)" (or zsh)
|
|
145
|
+
```
|
|
98
146
|
|
|
99
147
|
---
|
|
100
148
|
|
|
101
149
|
## ๐ Usage
|
|
102
150
|
|
|
103
|
-
###
|
|
104
|
-
|
|
105
|
-
Gรต lแปnh bรฌnh thฦฐแปng โ gแปฃi รฝ tแปฑ ฤแปng hiแปn dฦฐแปi dแบกng overlay:
|
|
151
|
+
### CLI Commands
|
|
106
152
|
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
153
|
+
```bash
|
|
154
|
+
hs start # Start the HintShell daemon
|
|
155
|
+
hs stop # Stop the daemon
|
|
156
|
+
hs status # Check daemon status
|
|
157
|
+
hs init # Set up shell integration (run once)
|
|
111
158
|
```
|
|
112
159
|
|
|
113
|
-
|
|
114
|
-
- **Tab** โ chแบฅp nhแบญn
|
|
115
|
-
- **Esc** โ ฤรณng
|
|
116
|
-
- **Enter** โ thแปฑc thi lแปnh hiแปn tแบกi
|
|
160
|
+
### PowerShell โ Auto-Suggest Overlay
|
|
117
161
|
|
|
118
|
-
|
|
162
|
+
Just type โ suggestions appear automatically as a floating panel beneath your cursor.
|
|
119
163
|
|
|
120
|
-
|
|
164
|
+
### Bash / Zsh โ Tab to Suggest
|
|
165
|
+
|
|
166
|
+
Type a partial command, then press **Tab** to open the suggestion picker (requires `fzf`).
|
|
121
167
|
|
|
122
168
|
```bash
|
|
123
|
-
$ docker
|
|
169
|
+
$ docker โน
|
|
124
170
|
๐ง HintShell>
|
|
125
171
|
docker compose up -d
|
|
126
172
|
docker ps -a
|
|
127
173
|
docker build -t myapp .
|
|
128
174
|
```
|
|
129
175
|
|
|
130
|
-
- **Tab/Enter** โ chแปn
|
|
131
|
-
- **Esc** โ hแปงy
|
|
132
|
-
|
|
133
|
-
### CLI Commands
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
hintshell status # Xem trแบกng thรกi daemon
|
|
137
|
-
hintshell stop # Dแปซng daemon
|
|
138
|
-
hintshell start # Khแปi ฤแปng lแบกi daemon
|
|
139
|
-
hintshell init # Chแบกy lแบกi bแป cร i ฤแบทt
|
|
140
|
-
```
|
|
141
|
-
|
|
142
176
|
---
|
|
143
177
|
|
|
144
|
-
##
|
|
178
|
+
## ๐๏ธ Architecture
|
|
145
179
|
|
|
146
|
-
|
|
180
|
+
HintShell is a **client-daemon** system. It does **not** replace your terminal or shell. It plugs in via a thin hook.
|
|
147
181
|
|
|
148
|
-
```bash
|
|
149
|
-
# Cร i dependencies
|
|
150
|
-
sudo apt install -y build-essential fzf
|
|
151
|
-
|
|
152
|
-
# Build & install
|
|
153
|
-
cargo build --release
|
|
154
|
-
./target/release/hintshell init
|
|
155
|
-
source ~/.bashrc
|
|
156
182
|
```
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
183
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
184
|
+
โ Your Terminal โ
|
|
185
|
+
โ (Windows Terminal, iTerm2, โ
|
|
186
|
+
โ Alacritty, any terminal) โ
|
|
187
|
+
โ โ
|
|
188
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
189
|
+
โ โ Your Shell โ โ
|
|
190
|
+
โ โ (PowerShell / Bash / Zsh)โ โ
|
|
191
|
+
โ โ โฒ โ โ
|
|
192
|
+
โ โ โ hook / module โ โ
|
|
193
|
+
โ โ โผ โ โ
|
|
194
|
+
โ โ โโโโโโโโโโโ IPC โโโโโโโโโโโโโโโโ
|
|
195
|
+
โ โ โ hs โโโโโโโโโโโโบโ hintshell โ
|
|
196
|
+
โ โ โ (CLI) โ Named Pipeโ -core โ
|
|
197
|
+
โ โ โโโโโโโโโโโ or UDS โ (Daemon) โ
|
|
198
|
+
โ โ โ SQLite+Fuzzy โ
|
|
199
|
+
โ โ โโโโโโโโโโโโโโโโ
|
|
200
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
201
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
165
202
|
```
|
|
166
203
|
|
|
167
|
-
|
|
204
|
+
| Component | Role |
|
|
205
|
+
|---|---|
|
|
206
|
+
| `hs` / `hintshell` | CLI client โ sends queries over IPC |
|
|
207
|
+
| `hintshell-core` | Background daemon โ stores history, runs the suggestion engine (SQLite + fuzzy matching) |
|
|
208
|
+
| Shell Hook | Thin integration layer โ captures keystrokes and renders the suggestion UI |
|
|
168
209
|
|
|
169
|
-
|
|
170
|
-
cargo build --release
|
|
171
|
-
.\target\release\hintshell.exe init
|
|
172
|
-
. $PROFILE
|
|
173
|
-
```
|
|
210
|
+
**IPC:** Named Pipe on Windows, Unix Domain Socket on Linux/macOS.
|
|
174
211
|
|
|
175
212
|
---
|
|
176
213
|
|
|
@@ -179,33 +216,57 @@ cargo build --release
|
|
|
179
216
|
```
|
|
180
217
|
~/.hintshell/
|
|
181
218
|
โโโ bin/
|
|
182
|
-
โ โโโ hintshell
|
|
183
|
-
โ
|
|
219
|
+
โ โโโ hintshell # CLI binary
|
|
220
|
+
โ โโโ hintshell-core # Daemon binary
|
|
221
|
+
โ โโโ hs # CLI alias
|
|
184
222
|
โโโ module/
|
|
185
|
-
โ โโโ HintShellModule/
|
|
186
|
-
|
|
223
|
+
โ โโโ HintShellModule/ # PowerShell module
|
|
224
|
+
โโโ default-commands.json # 600+ built-in commands with descriptions
|
|
225
|
+
โโโ history.db # SQLite โ your command history & frequencies
|
|
187
226
|
```
|
|
188
227
|
|
|
189
228
|
---
|
|
190
229
|
|
|
230
|
+
## โจ Key Features
|
|
231
|
+
|
|
232
|
+
- **๐ Prefix Matching** โ Type `git` and instantly see all commands starting with `git`, ranked by your usage frequency.
|
|
233
|
+
- **๐ Frequency Ranking** โ Commands you use most float to the top.
|
|
234
|
+
- **๐ก Command Descriptions** โ See what each command does before you run it. 600+ commands pre-loaded across Git, Docker, NPM, Python, Kubernetes, Terraform, Cargo, and more.
|
|
235
|
+
- **๐ฅ๏ธ Cross-Platform** โ Windows, macOS, Linux. One tool, every OS.
|
|
236
|
+
- **๐ Multi-Shell** โ PowerShell, Bash, Zsh. Same experience everywhere.
|
|
237
|
+
- **โก Built in Rust** โ Fast startup, tiny memory footprint, no runtime dependencies.
|
|
238
|
+
- **๐ Local & Private** โ Everything stays on your machine. No cloud, no telemetry.
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
191
242
|
## ๐ ๏ธ Development
|
|
192
243
|
|
|
193
244
|
```bash
|
|
194
|
-
#
|
|
245
|
+
# Debug build
|
|
195
246
|
cargo build
|
|
196
247
|
|
|
197
|
-
# Run CLI
|
|
248
|
+
# Run CLI directly
|
|
198
249
|
cargo run --bin hintshell -- status
|
|
199
250
|
|
|
200
|
-
# Run daemon
|
|
251
|
+
# Run daemon directly
|
|
201
252
|
cargo run --bin hintshell-core
|
|
202
253
|
|
|
203
|
-
#
|
|
254
|
+
# Quick reload (PowerShell)
|
|
204
255
|
.\reload-hintshell.ps1
|
|
205
256
|
```
|
|
206
257
|
|
|
207
258
|
---
|
|
208
259
|
|
|
260
|
+
## ๐ค Contributing
|
|
261
|
+
|
|
262
|
+
Contributions are welcome! Feel free to open issues or submit pull requests.
|
|
263
|
+
|
|
209
264
|
## ๐ License
|
|
210
265
|
|
|
211
|
-
MIT
|
|
266
|
+
[MIT](LICENSE)
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
<p align="center">
|
|
271
|
+
<strong>Stop memorizing commands. Let HintShell remember for you.</strong>
|
|
272
|
+
</p>
|
package/package.json
CHANGED