You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: completions/snip.bash
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ _snip_completions() {
8
8
COMPREPLY=()
9
9
cur="${COMP_WORDS[COMP_CWORD]}"
10
10
prev="${COMP_WORDS[COMP_CWORD-1]}"
11
-
commands="add list search show run edit update rm delete export import sync ui config seed exec alias doctor cp mv cat recent fzf grab widget completion stats"
11
+
commands="add list search show run edit update rm delete export import sync ui config seed exec alias doctor init last import-history cp mv cat recent fzf grab widget completion stats"
Copy file name to clipboardExpand all lines: docs/action_plan.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,8 @@
25
25
**Outcome:**~900 kB lighter, 4 fewer deps.
26
26
27
27
### Medium
28
-
-[]**1.5** Add Fuse index cache invalidation — only rebuild when snippet count or DB mtime changes (in `lib/search.js`).
29
-
-[]**1.6** Lazy-load snippet content in `storage.js` — metadata-only for `list`/`search`; load content only for `show`/`run`/`exec`.
28
+
-[x]**1.5** Add Fuse index cache invalidation — only rebuild when snippet count or DB mtime changes (in `lib/search.js`).
29
+
-[x]**1.6** Lazy-load snippet content in `storage.js` — metadata-only for `list`/`search`; load content only for `show`/`run`/`exec`.
30
30
31
31
### Hard
32
32
-[ ]**1.7** Add in-process cache for `listSnippets()` so repeated commands in same process don’t reload full data every time.
@@ -42,10 +42,10 @@
42
42
-[ ]**2.4** Centralize `process.exit()` — move exit logic into `cli.js` where possible; commands should throw or return status.
43
43
44
44
### Medium
45
-
-[]**2.5** 🔴 Add **file lock** (or single-writer) for JSON backend in `storage.js` so two concurrent `snip add` don’t corrupt the DB (e.g. lock file or mutex around read-modify-write).
45
+
-[x]**2.5** 🔴 Add **file lock** (or single-writer) for JSON backend in `storage.js` so two concurrent `snip add` don’t corrupt the DB (e.g. lock file or mutex around read-modify-write).
46
46
-[x]**2.6** 🔴 Add `better-sqlite3` as **optional dependency** in `package.json` and document; add `snip doctor` check that suggests `npm install -g better-sqlite3` when SQLite is enabled but module missing.
47
47
-[ ]**2.7** Normalize error handling — all commands: errors to stderr, non-zero exit on failure, consistent behavior for scripting.
48
-
-[]**2.8** Enforce `--no-color` / `NO_COLOR` everywhere — audit chalk usage and respect flag/env in all commands.
48
+
-[x]**2.8** Enforce `--no-color` / `NO_COLOR` everywhere — audit chalk usage and respect flag/env in all commands.
49
49
50
50
### Hard
51
51
-[ ]**2.9** Raise coverage — bring command-layer coverage up (add tests for add, run, grab, pipe, show, stats, alias, sync; aim 60%+ on critical paths).
@@ -63,9 +63,9 @@
63
63
-[x]**3.4****Gist errors** — On 401 from GitHub API, show: "Invalid GitHub token. Set SNIP_GIST_TOKEN with a valid PAT."
64
64
65
65
### Medium
66
-
-[]**3.5****`snip run` vs `snip exec`** — Clarify in docs and help text; consider merging or one-line explanation in `--help` and README.
67
-
-[]**3.6****Pager for long lists** — When `snip list` returns 50+ snippets, use a pager (e.g. `less`) or suggest TUI.
68
-
-[]**3.7** TUI first-run — Show a tiny guide or overlay on first `snip ui` (e.g. keybindings, "? for help").
66
+
-[x]**3.5****`snip run` vs `snip exec`** — Clarify in docs and help text; consider merging or one-line explanation in `--help` and README.
67
+
-[x]**3.6****Pager for long lists** — When `snip list` returns 50+ snippets, use a pager (e.g. `less`) or suggest TUI.
68
+
-[x]**3.7** TUI first-run — Show a tiny guide or overlay on first `snip ui` (e.g. keybindings, "? for help").
69
69
70
70
### Hard
71
71
-[ ]**3.8** Add inline help overlay in TUI (e.g. `?` key) with keybindings and confirm behavior.
@@ -82,10 +82,10 @@
82
82
-[ ]**4.5****`snip config`** — Add basic validation (type checking / allowed keys) instead of accepting any value.
83
83
84
84
### Medium
85
-
-[]**4.6****`snip init`** — Single guided wizard: choose editor → set up shell widget → seed example snippets → optional "open TUI". Target: zero to aha in ~60 seconds.
86
-
-[]**4.7****`snip last`** — Re-run last executed snippet (store last snippet id/name; simple persistence).
87
-
-[]**4.8****`snip stats --streak`** — Days in a row using snip (needs lightweight usage tracking).
88
-
-[]**4.9****CLI help** — One-line example in `--help` for each core command; align README examples with behavior.
85
+
-[x]**4.6****`snip init`** — Single guided wizard: choose editor → set up shell widget → seed example snippets → optional "open TUI". Target: zero to aha in ~60 seconds.
86
+
-[x]**4.7****`snip last`** — Re-run last executed snippet (store last snippet id/name; simple persistence).
87
+
-[x]**4.8****`snip stats --streak`** — Days in a row using snip (needs lightweight usage tracking).
88
+
-[x]**4.9****CLI help** — One-line example in `--help` for each core command; align README examples with behavior.
89
89
90
90
### Hard
91
91
-[ ]**4.10****`snip watch <name>`** — Re-run snippet on file edit (watch snippet file or DB change).
@@ -102,8 +102,8 @@
102
102
-[x]**5.4****`snip config` validation** — Reject invalid values and list allowed keys/types in help.
103
103
104
104
### Medium
105
-
-[]**5.5****Shell history import** — `snip import-history --last 30`: analyze recent shell history, find commands run 3+ times, suggest saving as snippets.
106
-
-[]**5.6****Natural language search** — Make description first-class in search (e.g. higher weight in Fuse options) so "find my docker cleanup command" works well.
105
+
-[x]**5.5****Shell history import** — `snip import-history --last 30`: analyze recent shell history, find commands run 3+ times, suggest saving as snippets.
106
+
-[x]**5.6****Natural language search** — Make description first-class in search (e.g. higher weight in Fuse options) so "find my docker cleanup command" works well.
107
107
108
108
### Hard
109
109
-[ ]**5.7****Context-aware suggestions** — In dir with `package.json` → suggest npm snippets; with `Dockerfile` → suggest docker snippets (needs context detection + tagging or categories).
0 commit comments