github-search-cli 9.1.1 → 9.2.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.
package/src/help.ts CHANGED
@@ -1,142 +1,142 @@
1
- /** Help screen — structured sections rendered by OpenTUI components. */
2
- export interface HelpRow {
3
- keys: string;
4
- action: string;
5
- }
6
- export interface HelpSection {
7
- title: string;
8
- /** Theme color key or hex — used for Box title color */
9
- titleColor: string;
10
- rows: HelpRow[];
11
- note?: string;
12
- }
13
- export function buildHelpSections(): HelpSection[] {
14
- return [
15
- {
16
- title: " Landing ",
17
- titleColor: "blue",
18
- rows: [
19
- { keys: "↑ ↓ / j k", action: "Navigate menu cards" },
20
- { keys: "Enter", action: "Select mode" },
21
- { keys: "? / h", action: "Toggle this help screen" },
22
- { keys: "q", action: "Quit" },
23
- ],
24
- },
25
- {
26
- title: " Navigation ",
27
- titleColor: "blue",
28
- rows: [
29
- { keys: "↑ ↓ / j k", action: "Move selection" },
30
- { keys: "Enter", action: "Open repo in browser" },
31
- { keys: "/", action: "Focus search input" },
32
- { keys: "Space", action: "Open command menu" },
33
- { keys: "? / Ctrl+H", action: "Toggle this help screen" },
34
- { keys: "q", action: "Quit" },
35
- ],
36
- },
37
- {
38
- title: " Main View ",
39
- titleColor: "green",
40
- rows: [
41
- { keys: "Tab", action: "Auto-complete qualifier" },
42
- { keys: "PageDown", action: "Next page of results" },
43
- { keys: "PageUp", action: "Scroll to top of results" },
44
- ],
45
- },
46
- {
47
- title: " Trending Mode ",
48
- titleColor: "yellow",
49
- rows: [
50
- { keys: "1-5", action: "Switch tab: Today → Week → Month → …" },
51
- { keys: "← → / h l", action: "Navigate tabs" },
52
- ],
53
- },
54
- {
55
- title: " Packages Mode ",
56
- titleColor: "cyan",
57
- rows: [
58
- { keys: "/", action: "Search npm packages" },
59
- { keys: "↑ ↓ / j k", action: "Move selection" },
60
- { keys: "Enter", action: "View package details" },
61
- { keys: "Space", action: "Open command menu" },
62
- ],
63
- note: "Search by name, description, or tags. Sort by downloads or score.",
64
- },
65
- {
66
- title: " Command Menu (Space)",
67
- titleColor: "purple",
68
- rows: [
69
- { keys: "Sort", action: "Cycle sort: best-match → stars → …" },
70
- { keys: "Limit", action: "Cycle limit: 10 → 25 → 50 → 100" },
71
- { keys: "Refresh", action: "Re-run current search" },
72
- { keys: "Graph", action: "Toggle commit activity chart" },
73
- { keys: "Readme", action: "Full README viewer" },
74
- { keys: "Deep-dive", action: "Languages + contributors + excerpt" },
75
- { keys: "Bookmark", action: "Save / unsave selected repo" },
76
- { keys: "Compare", action: "Add to / remove from comparison" },
77
- { keys: "Trending", action: "Switch to trending browser" },
78
- { keys: "Packages", action: "Switch to npm packages" },
79
- { keys: "Export", action: "Export results to file" },
80
- { keys: "Share", action: "Share repo as text" },
81
- { keys: "Topics", action: "Browse GitHub topics" },
82
- { keys: "Saved", action: "View saved searches" },
83
- { keys: "Notifs", action: "Check GitHub notifications" },
84
- { keys: "History", action: "View search history" },
85
- { keys: "Help", action: "Show this help screen" },
86
- ],
87
- note: "Navigate menu with ↑ ↓, select with Enter, back with ← / Esc",
88
- },
89
- {
90
- title: " Overlay Keys ",
91
- titleColor: "teal",
92
- rows: [
93
- { keys: "Esc / q", action: "Close any overlay" },
94
- { keys: "Enter", action: "Confirm selection / run action" },
95
- { keys: "d", action: "Delete entry (history, bookmarks, saved)" },
96
- { keys: "↑ ↓ / j k", action: "Navigate overlay list" },
97
- { keys: "← → / h l", action: "Navigate tabs / panels" },
98
- ],
99
- },
100
- {
101
- title: " Search Syntax ",
102
- titleColor: "teal",
103
- rows: [
104
- { keys: "keywords", action: "Free-text search" },
105
- { keys: "key:value", action: "Qualifier filter" },
106
- { keys: "-key:value", action: "Negated qualifier" },
107
- { keys: '"phrase"', action: "Exact phrase match" },
108
- { keys: "language:TypeScript", action: "Filter by language" },
109
- { keys: "stars:>1000", action: "Minimum stars" },
110
- { keys: "fork:true", action: "Include forks" },
111
- { keys: "user:octocat", action: "User's repos" },
112
- { keys: "org:facebook", action: "Organization repos" },
113
- { keys: "repo:facebook/react", action: "Specific repo" },
114
- { keys: "topic:react", action: "Filter by topic" },
115
- { keys: "license:mit", action: "License type" },
116
- { keys: "pushed:>2024-01-01", action: "Last push date" },
117
- { keys: "archived:false", action: "Exclude archived" },
118
- ],
119
- },
120
- {
121
- title: " Utility Keys ",
122
- titleColor: "muted",
123
- rows: [
124
- { keys: "t", action: "Cycle theme (light / dark / solarized)" },
125
- { keys: "Ctrl+X", action: "Copy repo URL to clipboard" },
126
- { keys: "Ctrl+C", action: "Copy search query to clipboard" },
127
- ],
128
- },
129
- {
130
- title: " Rate Limits ",
131
- titleColor: "orange",
132
- rows: [
133
- { keys: "No token", action: "10 req / min" },
134
- { keys: "GITHUB_TOKEN", action: "30 req / min (or your plan limit)" },
135
- ],
136
- note: "Set GITHUB_TOKEN in your environment or add to config.",
137
- },
138
- ];
139
- }
140
-
141
- /** Column at which the action description starts (right-aligns keys). */
142
- export const HELP_KEYS_COLUMN = 24;
1
+ /** Help screen — structured sections rendered by OpenTUI components. */
2
+ export interface HelpRow {
3
+ keys: string;
4
+ action: string;
5
+ }
6
+ export interface HelpSection {
7
+ title: string;
8
+ /** Theme color key or hex — used for Box title color */
9
+ titleColor: string;
10
+ rows: HelpRow[];
11
+ note?: string;
12
+ }
13
+ export function buildHelpSections(): HelpSection[] {
14
+ return [
15
+ {
16
+ title: " Landing ",
17
+ titleColor: "blue",
18
+ rows: [
19
+ { keys: "↑ ↓ / j k", action: "Navigate menu cards" },
20
+ { keys: "Enter", action: "Select mode" },
21
+ { keys: "? / h", action: "Toggle this help screen" },
22
+ { keys: "q", action: "Quit" },
23
+ ],
24
+ },
25
+ {
26
+ title: " Navigation ",
27
+ titleColor: "blue",
28
+ rows: [
29
+ { keys: "↑ ↓ / j k", action: "Move selection" },
30
+ { keys: "Enter", action: "Open repo in browser" },
31
+ { keys: "/", action: "Focus search input" },
32
+ { keys: "Space", action: "Open command menu" },
33
+ { keys: "? / Ctrl+H", action: "Toggle this help screen" },
34
+ { keys: "q", action: "Quit" },
35
+ ],
36
+ },
37
+ {
38
+ title: " Main View ",
39
+ titleColor: "green",
40
+ rows: [
41
+ { keys: "Tab", action: "Auto-complete qualifier" },
42
+ { keys: "PageDown", action: "Next page of results" },
43
+ { keys: "PageUp", action: "Scroll to top of results" },
44
+ ],
45
+ },
46
+ {
47
+ title: " Trending Mode ",
48
+ titleColor: "yellow",
49
+ rows: [
50
+ { keys: "1-5", action: "Switch tab: Today → Week → Month → …" },
51
+ { keys: "← → / h l", action: "Navigate tabs" },
52
+ ],
53
+ },
54
+ {
55
+ title: " Packages Mode ",
56
+ titleColor: "cyan",
57
+ rows: [
58
+ { keys: "/", action: "Search npm packages" },
59
+ { keys: "↑ ↓ / j k", action: "Move selection" },
60
+ { keys: "Enter", action: "View package details" },
61
+ { keys: "Space", action: "Open command menu" },
62
+ ],
63
+ note: "Search by name, description, or tags. Sort by downloads or score.",
64
+ },
65
+ {
66
+ title: " Command Menu (Space)",
67
+ titleColor: "purple",
68
+ rows: [
69
+ { keys: "Sort", action: "Cycle sort: best-match → stars → …" },
70
+ { keys: "Limit", action: "Cycle limit: 10 → 25 → 50 → 100" },
71
+ { keys: "Refresh", action: "Re-run current search" },
72
+ { keys: "Graph", action: "Toggle commit activity chart" },
73
+ { keys: "Readme", action: "Full README viewer" },
74
+ { keys: "Deep-dive", action: "Languages + contributors + excerpt" },
75
+ { keys: "Bookmark", action: "Save / unsave selected repo" },
76
+ { keys: "Compare", action: "Add to / remove from comparison" },
77
+ { keys: "Trending", action: "Switch to trending browser" },
78
+ { keys: "Packages", action: "Switch to npm packages" },
79
+ { keys: "Export", action: "Export results to file" },
80
+ { keys: "Share", action: "Share repo as text" },
81
+ { keys: "Topics", action: "Browse GitHub topics" },
82
+ { keys: "Saved", action: "View saved searches" },
83
+ { keys: "Notifs", action: "Check GitHub notifications" },
84
+ { keys: "History", action: "View search history" },
85
+ { keys: "Help", action: "Show this help screen" },
86
+ ],
87
+ note: "Navigate menu with ↑ ↓, select with Enter, back with ← / Esc",
88
+ },
89
+ {
90
+ title: " Overlay Keys ",
91
+ titleColor: "teal",
92
+ rows: [
93
+ { keys: "Esc / q", action: "Close any overlay" },
94
+ { keys: "Enter", action: "Confirm selection / run action" },
95
+ { keys: "d", action: "Delete entry (history, bookmarks, saved)" },
96
+ { keys: "↑ ↓ / j k", action: "Navigate overlay list" },
97
+ { keys: "← → / h l", action: "Navigate tabs / panels" },
98
+ ],
99
+ },
100
+ {
101
+ title: " Search Syntax ",
102
+ titleColor: "teal",
103
+ rows: [
104
+ { keys: "keywords", action: "Free-text search" },
105
+ { keys: "key:value", action: "Qualifier filter" },
106
+ { keys: "-key:value", action: "Negated qualifier" },
107
+ { keys: '"phrase"', action: "Exact phrase match" },
108
+ { keys: "language:TypeScript", action: "Filter by language" },
109
+ { keys: "stars:>1000", action: "Minimum stars" },
110
+ { keys: "fork:true", action: "Include forks" },
111
+ { keys: "user:octocat", action: "User's repos" },
112
+ { keys: "org:facebook", action: "Organization repos" },
113
+ { keys: "repo:facebook/react", action: "Specific repo" },
114
+ { keys: "topic:react", action: "Filter by topic" },
115
+ { keys: "license:mit", action: "License type" },
116
+ { keys: "pushed:>2024-01-01", action: "Last push date" },
117
+ { keys: "archived:false", action: "Exclude archived" },
118
+ ],
119
+ },
120
+ {
121
+ title: " Utility Keys ",
122
+ titleColor: "muted",
123
+ rows: [
124
+ { keys: "t", action: "Cycle theme (light / dark / solarized)" },
125
+ { keys: "Ctrl+X", action: "Copy repo URL to clipboard" },
126
+ { keys: "Ctrl+C", action: "Copy search query to clipboard" },
127
+ ],
128
+ },
129
+ {
130
+ title: " Rate Limits ",
131
+ titleColor: "orange",
132
+ rows: [
133
+ { keys: "No token", action: "10 req / min" },
134
+ { keys: "GITHUB_TOKEN", action: "30 req / min (or your plan limit)" },
135
+ ],
136
+ note: "Set GITHUB_TOKEN in your environment or add to config.",
137
+ },
138
+ ];
139
+ }
140
+
141
+ /** Column at which the action description starts (right-aligns keys). */
142
+ export const HELP_KEYS_COLUMN = 24;