hintshell 0.1.0-beta.5 → 0.1.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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +50 -169
  3. package/package.json +11 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Phi Lau
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 CHANGED
@@ -3,7 +3,7 @@
3
3
  </p>
4
4
 
5
5
  <h1 align="center">HintShell</h1>
6
- <p align="center"><strong>Real-time Command Auto-Suggestion Engine for Your Terminal</strong></p>
6
+ <p align="center"><strong>Next-Gen AI-Ready Real-time Command Suggestions for Your Terminal</strong></p>
7
7
 
8
8
  <p align="center">
9
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>
@@ -14,14 +14,14 @@
14
14
  </p>
15
15
 
16
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.
17
+ HintShell is an <strong>AI-ready productivity engine</strong> that <strong>embeds into your existing shell</strong> (PowerShell, Bash, or Zsh). It provides <strong>context-aware command suggestions</strong> in real-time, drastically reducing context-switching and boosting developer workflow efficiency. Built with <strong>Rust</strong> for maximum performance and minimum footprint.
18
18
  </p>
19
19
 
20
20
  ---
21
21
 
22
22
  ## ⚡ Why HintShell?
23
23
 
24
- Most shells offer basic, single-line autocomplete. HintShell replaces that with a **rich, interactive suggestion panel** — right inside your terminal.
24
+ Most shells offer basic, single-line autocomplete. HintShell replaces that with a <strong>smart, interactive suggestion panel</strong> — a context-aware UI/UX upgrade right inside your terminal. It's the <strong>modern alternative to PSReadLine and zsh-autosuggestions</strong>.
25
25
 
26
26
  | Feature | HintShell | PowerShell <br>(PSReadLine) | Zsh <br>(zsh-autosuggestions) | Bash | Git Bash | Fish |
27
27
  |---|:---:|:---:|:---:|:---:|:---:|:---:|
@@ -34,143 +34,83 @@ Most shells offer basic, single-line autocomplete. HintShell replaces that with
34
34
  | **600+ built-in commands** | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
35
35
  | **Works with any terminal** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
36
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
42
-
43
- ```
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
- └───────────────────────────────────────────┘
53
- ```
54
-
55
- - **↑ / ↓** — Navigate the list
56
- - **Tab** — Accept the selected suggestion
57
- - **Enter** — Execute the current command line
58
- - **Esc** — Dismiss the panel
59
-
60
37
  ---
61
38
 
62
- ## 🚀 Installation
39
+ ## 🚀 Installation (Recommended)
63
40
 
64
- ### Option A — via NPM (Recommended)
41
+ Follow these steps in order to get HintShell running on your machine.
65
42
 
66
- Works on **Windows**, **macOS**, and **Linux**. Automatically downloads the correct binary for your platform.
43
+ ### 1. Install Dependencies (macOS / Linux only)
44
+ HintShell uses `fzf` to render the suggestion picker on Unix systems.
45
+ - **macOS**: `brew install fzf`
46
+ - **Linux (Ubuntu/Debian)**: `sudo apt install fzf`
47
+ - **Windows**: No dependencies needed.
67
48
 
49
+ ### 2. Install HintShell
50
+ Install via NPM to get the latest pre-built binaries for your platform:
68
51
  ```bash
69
52
  npm install -g hintshell
70
- hintshell init
71
53
  ```
72
54
 
73
- Then **restart your terminal** (or reload your shell config):
74
-
55
+ ### 3. Initialize Shell Integration
56
+ Run the init command to automatically configure your shell (`.zshrc`, `.bashrc`, or PowerShell profile):
75
57
  ```bash
76
- # PowerShell
77
- . $PROFILE
78
-
79
- # Bash
80
- source ~/.bashrc
81
-
82
- # Zsh
83
- source ~/.zshrc
58
+ hs init
84
59
  ```
85
60
 
86
- ### Option B — Download from GitHub Releases
87
-
88
- Go to [**Releases**](https://github.com/philau2512/hintshell/releases), download the archive for your OS, extract it, and run:
89
-
61
+ ### 4. Restart Terminal
62
+ Restart your terminal or reload your shell config to activate the hooks:
90
63
  ```bash
91
- hintshell init
92
- ```
93
-
94
- ### Option C — Build from Source
64
+ # Zsh
65
+ source ~/.zshrc
95
66
 
96
- Requires [Rust](https://rustup.rs/).
67
+ # Bash
68
+ source ~/.bashrc
97
69
 
98
- ```bash
99
- git clone https://github.com/philau2512/hintshell.git
100
- cd hintshell
101
- cargo build --release
102
- ./target/release/hintshell init # Linux / macOS
103
- .\target\release\hintshell.exe init # Windows
70
+ # PowerShell
71
+ . $PROFILE
104
72
  ```
105
73
 
106
74
  ---
107
75
 
108
- ## 🗑️ Uninstall
109
-
110
- ### If installed via NPM
111
-
112
- ```bash
113
- npm uninstall -g hintshell
114
- ```
76
+ ## 📖 Usage
115
77
 
116
- ### Complete cleanup (all platforms)
78
+ ### PowerShell (Windows/Unix)
79
+ **Real-time Overlay**: Suggestions appear automatically as a floating panel beneath your cursor as you type.
80
+ - **↑ / ↓** : Navigate
81
+ - **Tab** : Accept
82
+ - **Esc** : Close
117
83
 
118
- Remove the HintShell data directory and any shell configuration lines it added:
84
+ ### Zsh / Bash (macOS/Linux)
85
+ **Tab-to-Suggest**: To avoid conflicts with `zsh-autosuggestions`, HintShell activates when you press **Tab**.
86
+ - **Type `git ` + Tab** : Opens a fuzzy picker with frequencies and descriptions.
87
+ - **Enter** : Select and fill the command line.
119
88
 
120
- **Windows (PowerShell):**
121
- ```powershell
122
- # 1. Stop the daemon
123
- hs stop
89
+ ---
124
90
 
125
- # 2. Remove data directory
126
- Remove-Item -Recurse -Force "$HOME\.hintshell"
91
+ ## 🗑️ Uninstallation
127
92
 
128
- # 3. Edit your PowerShell profile and remove the HintShell lines
129
- notepad $PROFILE
130
- # Delete lines related to "HintShell" or "Import-Module HintShellModule"
131
- ```
93
+ If you need to remove HintShell, it now comes with a clean uninstaller that handles everything for you:
132
94
 
133
- **macOS / Linux:**
134
95
  ```bash
135
- # 1. Stop the daemon
136
- hs stop
137
-
138
- # 2. Remove data directory
139
- rm -rf ~/.hintshell
96
+ # 1. Run the official uninstaller
97
+ hs uninstall
140
98
 
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)
99
+ # 2. (Optional) Remove the NPM package
100
+ npm uninstall -g hintshell
145
101
  ```
102
+ *Note: `hs uninstall` stops the daemon, removes hook lines from your shell configs, and deletes binaries from `~/.hintshell/bin`, but keeps your history database (`history.db`) safe.*
146
103
 
147
104
  ---
148
105
 
149
- ## 📖 Usage
150
-
151
- ### CLI Commands
106
+ ## 🏗️ CLI Reference
152
107
 
153
108
  ```bash
154
- hs start # Start the HintShell daemon
109
+ hs status # Check if the daemon is running and see stats
110
+ hs start # Manually start the daemon
155
111
  hs stop # Stop the daemon
156
- hs status # Check daemon status
157
- hs init # Set up shell integration (run once)
158
- ```
159
-
160
- ### PowerShell — Auto-Suggest Overlay
161
-
162
- Just type — suggestions appear automatically as a floating panel beneath your cursor.
163
-
164
- ### Bash / Zsh — Tab to Suggest
165
-
166
- Type a partial command, then press **Tab** to open the suggestion picker (requires `fzf`).
167
-
168
- ```bash
169
- $ docker ↹
170
- 🧠 HintShell>
171
- docker compose up -d
172
- docker ps -a
173
- docker build -t myapp .
112
+ hs update # Check for new versions
113
+ hs uninstall # Completely remove shell integration and binaries
174
114
  ```
175
115
 
176
116
  ---
@@ -201,72 +141,13 @@ HintShell is a **client-daemon** system. It does **not** replace your terminal o
201
141
  └─────────────────────────────────┘
202
142
  ```
203
143
 
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 |
209
-
210
- **IPC:** Named Pipe on Windows, Unix Domain Socket on Linux/macOS.
211
-
212
- ---
213
-
214
- ## 📁 File Structure
215
-
216
- ```
217
- ~/.hintshell/
218
- ├── bin/
219
- │ ├── hintshell # CLI binary
220
- │ ├── hintshell-core # Daemon binary
221
- │ └── hs # CLI alias
222
- ├── module/
223
- │ └── HintShellModule/ # PowerShell module
224
- ├── default-commands.json # 600+ built-in commands with descriptions
225
- └── history.db # SQLite — your command history & frequencies
226
- ```
227
-
228
144
  ---
229
145
 
230
- ## ✨ Key Features
146
+ ## 🤝 Contributing & License
231
147
 
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.
148
+ Contributions are welcome! Built with 🦀 Rust for speed and safety.
149
+ Licensed under **MIT**.
239
150
 
240
- ---
241
-
242
- ## 🛠️ Development
243
-
244
- ```bash
245
- # Debug build
246
- cargo build
247
-
248
- # Run CLI directly
249
- cargo run --bin hintshell -- status
250
-
251
- # Run daemon directly
252
- cargo run --bin hintshell-core
253
-
254
- # Quick reload (PowerShell)
255
- .\reload-hintshell.ps1
256
- ```
257
-
258
- ---
259
-
260
- ## 🤝 Contributing
261
-
262
- Contributions are welcome! Feel free to open issues or submit pull requests.
263
-
264
- ## 📄 License
265
-
266
- [MIT](LICENSE)
267
-
268
- ---
269
-
270
- <p align="center">
151
+ <p align="left">
271
152
  <strong>Stop memorizing commands. Let HintShell remember for you.</strong>
272
153
  </p>
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "hintshell",
3
- "version": "0.1.0-beta.5",
4
- "description": "AI-Powered Terminal Auto-Suggestion Engine — learns your command history and suggests commands in real-time",
3
+ "version": "0.1.1",
4
+ "description": "Next-gen AI-ready real-time command suggestions for your terminal. Smart, context-aware autocomplete for PowerShell, Bash, and Zsh.",
5
5
  "keywords": [
6
+ "ai-shell",
7
+ "shell-assistant",
8
+ "terminal-autocomplete",
9
+ "cli-productivity",
10
+ "rust-cli",
6
11
  "terminal",
7
12
  "autocomplete",
8
13
  "auto-suggest",
@@ -12,13 +17,16 @@
12
17
  "bash",
13
18
  "zsh",
14
19
  "cli",
20
+ "fzf",
21
+ "dx",
22
+ "developer-experience",
15
23
  "productivity",
16
24
  "rust"
17
25
  ],
18
26
  "homepage": "https://github.com/philau2512/hintshell",
19
27
  "repository": {
20
28
  "type": "git",
21
- "url": "https://github.com/philau2512/hintshell.git"
29
+ "url": "git+https://github.com/philau2512/hintshell.git"
22
30
  },
23
31
  "license": "MIT",
24
32
  "author": "philau2512",