gemiterm 2.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.
Files changed (184) hide show
  1. package/.env +2 -0
  2. package/.github/workflows/manual-release.yml +34 -0
  3. package/.github/workflows/release.yml +198 -0
  4. package/.github/workflows/test.yml +29 -0
  5. package/.opencode/commands/opsx-apply.md +152 -0
  6. package/.opencode/commands/opsx-archive.md +157 -0
  7. package/.opencode/commands/opsx-explore.md +169 -0
  8. package/.opencode/commands/opsx-propose.md +104 -0
  9. package/.opencode/commands/opsx-sync.md +140 -0
  10. package/.opencode/commands/search-intelligently.md +9 -0
  11. package/.opencode/opencode.json +20 -0
  12. package/.opencode/skills/intellisearch/.version +1 -0
  13. package/.opencode/skills/intellisearch/SKILL.md +84 -0
  14. package/.opencode/skills/intellisearch/references/brave-search.md +67 -0
  15. package/.opencode/skills/intellisearch/references/ddg-search.md +79 -0
  16. package/.opencode/skills/intellisearch/references/deepwiki-tools.md +246 -0
  17. package/.opencode/skills/intellisearch/references/examples.md +97 -0
  18. package/.opencode/skills/intellisearch/references/gh-cli.md +143 -0
  19. package/.opencode/skills/intellisearch/references/google-search.md +40 -0
  20. package/.opencode/skills/intellisearch/references/search-workflow.md +143 -0
  21. package/.opencode/skills/intellisearch/references/workflow.md +115 -0
  22. package/.opencode/skills/openspec-apply-change/SKILL.md +159 -0
  23. package/.opencode/skills/openspec-archive-change/SKILL.md +117 -0
  24. package/.opencode/skills/openspec-explore/SKILL.md +287 -0
  25. package/.opencode/skills/openspec-propose/SKILL.md +111 -0
  26. package/.opencode/skills/openspec-sync-specs/SKILL.md +147 -0
  27. package/.serena/project.yml +133 -0
  28. package/AGENTS.md +136 -0
  29. package/CHANGELOG.md +3 -0
  30. package/README.md +245 -0
  31. package/bun.lock +105 -0
  32. package/docs/INSTALL.md +185 -0
  33. package/docs/PLAYWRIGHT_CLI_API.md +306 -0
  34. package/docs/python-release-for-reference.md +175 -0
  35. package/examples/sample_json_export.json +32 -0
  36. package/examples/sample_markdown_export.md +221 -0
  37. package/examples/usage_examples.sh +222 -0
  38. package/install.ps1 +264 -0
  39. package/install.sh +275 -0
  40. package/openspec/MAESTRO_MIGRATION.md +180 -0
  41. package/openspec/changes/archive/2026-06-08-command-spec-conformance/.openspec.yaml +2 -0
  42. package/openspec/changes/archive/2026-06-08-command-spec-conformance/design.md +194 -0
  43. package/openspec/changes/archive/2026-06-08-command-spec-conformance/proposal.md +52 -0
  44. package/openspec/changes/archive/2026-06-08-command-spec-conformance/specs/multi-profile-conversations/spec.md +133 -0
  45. package/openspec/changes/archive/2026-06-08-command-spec-conformance/tasks.md +95 -0
  46. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/.openspec.yaml +2 -0
  47. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/design.md +28 -0
  48. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/proposal.md +22 -0
  49. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/specs/interactive-prompt-loop/spec.md +35 -0
  50. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/tasks.md +28 -0
  51. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/.openspec.yaml +2 -0
  52. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/design.md +323 -0
  53. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/proposal.md +122 -0
  54. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/specs/no-capability-changes/spec.md +29 -0
  55. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/tasks.md +172 -0
  56. package/openspec/changes/archive/2026-06-09-v2-install-migration/.openspec.yaml +2 -0
  57. package/openspec/changes/archive/2026-06-09-v2-install-migration/design.md +241 -0
  58. package/openspec/changes/archive/2026-06-09-v2-install-migration/proposal.md +41 -0
  59. package/openspec/changes/archive/2026-06-09-v2-install-migration/specs/v2-installer/spec.md +205 -0
  60. package/openspec/changes/archive/2026-06-09-v2-install-migration/tasks.md +97 -0
  61. package/openspec/changes/commander-cli-parser/.openspec.yaml +2 -0
  62. package/openspec/changes/commander-cli-parser/design.md +107 -0
  63. package/openspec/changes/commander-cli-parser/proposal.md +31 -0
  64. package/openspec/changes/commander-cli-parser/specs/cli/spec.md +48 -0
  65. package/openspec/changes/commander-cli-parser/tasks.md +33 -0
  66. package/openspec/changes/cross-platform-build-and-ci/.openspec.yaml +2 -0
  67. package/openspec/changes/cross-platform-build-and-ci/design.md +213 -0
  68. package/openspec/changes/cross-platform-build-and-ci/proposal.md +50 -0
  69. package/openspec/changes/cross-platform-build-and-ci/specs/path-and-file-mediation/spec.md +335 -0
  70. package/openspec/changes/cross-platform-build-and-ci/specs/release-pipeline/spec.md +95 -0
  71. package/openspec/changes/cross-platform-build-and-ci/tasks.md +164 -0
  72. package/openspec/config.yaml +20 -0
  73. package/openspec/specs/auth/spec.md +394 -0
  74. package/openspec/specs/cli/spec.md +108 -0
  75. package/openspec/specs/commands/spec.md +409 -0
  76. package/openspec/specs/configuration/spec.md +130 -0
  77. package/openspec/specs/conversations/spec.md +139 -0
  78. package/openspec/specs/domain-model/spec.md +128 -0
  79. package/openspec/specs/formatters/spec.md +158 -0
  80. package/openspec/specs/install-browser/spec.md +146 -0
  81. package/openspec/specs/interactive-prompt-loop/spec.md +41 -0
  82. package/openspec/specs/logger/spec.md +71 -0
  83. package/openspec/specs/mediator/spec.md +72 -0
  84. package/openspec/specs/multi-profile-conversations/spec.md +145 -0
  85. package/openspec/specs/path-utils/spec.md +101 -0
  86. package/openspec/specs/profiles/spec.md +94 -0
  87. package/openspec/specs/storage/spec.md +198 -0
  88. package/openspec/specs/testing/spec.md +237 -0
  89. package/openspec/specs/v2-installer/spec.md +205 -0
  90. package/openspec/specs/validators/spec.md +65 -0
  91. package/package.json +45 -0
  92. package/scripts/build.ts +88 -0
  93. package/scripts/clean-build.ps1 +4 -0
  94. package/scripts/clean-build.sh +5 -0
  95. package/scripts/install-browser.ps1 +5 -0
  96. package/scripts/install-browser.sh +6 -0
  97. package/scripts/lint-path-mediation.ps1 +65 -0
  98. package/scripts/lint-path-mediation.sh +40 -0
  99. package/src/cli/.gitkeep +0 -0
  100. package/src/cli/command-registry.ts +62 -0
  101. package/src/cli/commands/auth-command.ts +179 -0
  102. package/src/cli/commands/continue-command.ts +158 -0
  103. package/src/cli/commands/delete-command.ts +163 -0
  104. package/src/cli/commands/export-all-command.ts +243 -0
  105. package/src/cli/commands/export-command.ts +156 -0
  106. package/src/cli/commands/fetch-command.ts +176 -0
  107. package/src/cli/commands/help.ts +45 -0
  108. package/src/cli/commands/install-browser-command.ts +33 -0
  109. package/src/cli/commands/list-command.ts +226 -0
  110. package/src/cli/commands/new-command.ts +147 -0
  111. package/src/cli/commands/profile-command.ts +226 -0
  112. package/src/cli/commands/status-command.ts +59 -0
  113. package/src/cli/index.ts +213 -0
  114. package/src/cli/utils/interactive-prompt.ts +64 -0
  115. package/src/core/.gitkeep +0 -0
  116. package/src/core/command-handlers.ts +240 -0
  117. package/src/core/errors.ts +41 -0
  118. package/src/core/mediator.ts +58 -0
  119. package/src/core/query-handlers.ts +163 -0
  120. package/src/core/types.ts +43 -0
  121. package/src/infrastructure/.gitkeep +0 -0
  122. package/src/infrastructure/cli-table.ts +45 -0
  123. package/src/infrastructure/config.ts +52 -0
  124. package/src/infrastructure/formatters.ts +130 -0
  125. package/src/infrastructure/io.ts +161 -0
  126. package/src/infrastructure/logger.ts +41 -0
  127. package/src/infrastructure/path-utils.ts +157 -0
  128. package/src/infrastructure/storage.ts +209 -0
  129. package/src/infrastructure/validators.ts +28 -0
  130. package/src/services/.gitkeep +0 -0
  131. package/src/services/auth-service.ts +135 -0
  132. package/src/services/cookie-monitor.ts +159 -0
  133. package/src/services/cookie-storage-service.ts +74 -0
  134. package/src/services/gemini-client-wrapper.ts +239 -0
  135. package/src/services/install-browser-service.ts +205 -0
  136. package/src/services/playwright-cli-driver.ts +269 -0
  137. package/src/services/profile-auth-manager.ts +65 -0
  138. package/src/services/profile-service.ts +121 -0
  139. package/tests/cli/auth-command.test.ts +220 -0
  140. package/tests/cli/command-registry.test.ts +67 -0
  141. package/tests/cli/continue-command.test.ts +100 -0
  142. package/tests/cli/delete-command.test.ts +128 -0
  143. package/tests/cli/export-all-command.test.ts +375 -0
  144. package/tests/cli/install-browser-command.test.ts +48 -0
  145. package/tests/cli/list-command.test.ts +179 -0
  146. package/tests/cli/new-command.test.ts +139 -0
  147. package/tests/cli/status-command.test.ts +106 -0
  148. package/tests/core/query-handlers.test.ts +187 -0
  149. package/tests/fixtures/auth-fixtures.ts +98 -0
  150. package/tests/fixtures/chat-fixtures.ts +87 -0
  151. package/tests/infrastructure/cli-table.test.ts +107 -0
  152. package/tests/infrastructure/formatters.test.ts +202 -0
  153. package/tests/infrastructure/io.test.ts +197 -0
  154. package/tests/infrastructure/logger.test.ts +74 -0
  155. package/tests/infrastructure/storage.test.ts +335 -0
  156. package/tests/infrastructure/validators.test.ts +67 -0
  157. package/tests/integration/commands/auth.test.ts +186 -0
  158. package/tests/integration/commands/continue.test.ts +130 -0
  159. package/tests/integration/commands/delete.test.ts +140 -0
  160. package/tests/integration/commands/export.test.ts +266 -0
  161. package/tests/integration/commands/fetch.test.ts +238 -0
  162. package/tests/integration/commands/list.test.ts +281 -0
  163. package/tests/integration/commands/profile.test.ts +258 -0
  164. package/tests/integration/commands/status.test.ts +223 -0
  165. package/tests/integration/installer-script-shape.test.ts +67 -0
  166. package/tests/parity/compare-outputs.ts +359 -0
  167. package/tests/parity/test-commands-parity.ps1 +82 -0
  168. package/tests/parity/test-commands-parity.sh +61 -0
  169. package/tests/services/auth-service.test.ts +315 -0
  170. package/tests/services/cookie-monitor.test.ts +229 -0
  171. package/tests/services/cookie-storage-service.test.ts +230 -0
  172. package/tests/services/gemini-client-wrapper.test.ts +688 -0
  173. package/tests/services/install-browser-service.test.ts +83 -0
  174. package/tests/services/playwright-cli-driver.test.ts +468 -0
  175. package/tests/services/profile-auth-manager.test.ts +334 -0
  176. package/tests/services/profile-service.test.ts +224 -0
  177. package/tests/setup.ts +95 -0
  178. package/tests/smoke/smoke.test.ts +52 -0
  179. package/tests/unit/config.test.ts +159 -0
  180. package/tests/unit/errors.test.ts +119 -0
  181. package/tests/unit/formatters.test.ts +316 -0
  182. package/tests/unit/mediator.test.ts +152 -0
  183. package/tests/unit/path-utils.test.ts +289 -0
  184. package/tsconfig.json +16 -0
package/README.md ADDED
@@ -0,0 +1,245 @@
1
+ # GemiTerm
2
+
3
+ Access and manage your Gemini web chats from the command line. GemiTerm bridges Playwright-based Google authentication to let you list, fetch, export, continue, and delete conversations trapped in the Gemini web interface — without a standard API. Built with [Bun](https://bun.sh) and TypeScript.
4
+
5
+ ## Prerequisites
6
+
7
+ - **[Bun](https://bun.sh)** runtime
8
+ - **Chromium Browser** — GemiTerm uses your system Chrome/Edge if available, otherwise installs Playwright's Chromium automatically
9
+ - **Google Account** with access to [Gemini](https://gemini.google.com)
10
+
11
+ ## Installation
12
+
13
+ See [docs/INSTALL.md](docs/INSTALL.md) for the full guide, uninstall instructions, troubleshooting, and build-from-source steps.
14
+
15
+ **Windows** (PowerShell 7+):
16
+
17
+ ```powershell
18
+ irm https://github.com/expert-vision-software/GemiTerm/releases/latest/download/install.ps1 | iex
19
+ ```
20
+
21
+ **Linux / WSL**:
22
+
23
+ ```bash
24
+ curl -fsSL https://github.com/expert-vision-software/GemiTerm/releases/latest/download/install.sh | bash
25
+ ```
26
+
27
+ > **Upgrading from v1.4.1?** Your profiles, cookies, and default profile marker are preserved. The installer replaces the binary in place; it does NOT touch your config dir. See the "Upgrade from v1.4.1" section in [docs/INSTALL.md](docs/INSTALL.md) for details.
28
+
29
+ ## Quick Start
30
+
31
+ ```bash
32
+ gemiterm auth # authenticate with Google
33
+ gemiterm list # list your chats
34
+ ```
35
+
36
+ ## Development
37
+
38
+ ```bash
39
+ bun install
40
+ bun run dev # run the CLI
41
+ bun test # run tests (Bun test runner)
42
+ bun run typecheck # TypeScript type checking
43
+ bun run build # compile to standalone Bun binary
44
+ bun run build:linux # cross-compile for Linux x64
45
+ bun run build:windows # cross-compile for Windows x64
46
+ ```
47
+
48
+ For installing Chromium, use the platform-specific wrapper scripts:
49
+ ```bash
50
+ bash scripts/install-browser.sh # Linux/macOS
51
+ pwsh scripts/install-browser.ps1 # Windows
52
+ ```
53
+
54
+ ## Building from source
55
+
56
+ GemiTerm is built with [Bun](https://bun.sh) 1.3.13 or later.
57
+
58
+ ```bash
59
+ bun run build # native binary (dist/gemiterm or dist/gemiterm.exe)
60
+ bun run build:linux # Linux x64 binary (dist/gemiterm)
61
+ bun run build:windows # Windows x64 binary (dist/gemiterm.exe)
62
+ bun run build:release # minified release binary (dist/gemiterm)
63
+ ```
64
+
65
+ Output paths:
66
+ - **Linux/macOS**: `dist/gemiterm`
67
+ - **Windows**: `dist/gemiterm.exe`
68
+
69
+ ## Release artifacts
70
+
71
+ The v2.0.0 release ships the following GitHub Release assets:
72
+ - `GemiTerm` — Linux x64 binary
73
+ - `GemiTerm.exe` — Windows x64 binary
74
+ - `install.sh` — POSIX installer script
75
+ - `install.ps1` — Windows PowerShell installer script
76
+
77
+ ## Usage
78
+
79
+ ### Authentication
80
+
81
+ ```bash
82
+ gemiterm auth
83
+ ```
84
+
85
+ Opens a browser window to log in with your Google account. Cookies are saved for future use.
86
+
87
+ ### Check Status
88
+
89
+ ```bash
90
+ gemiterm status
91
+ ```
92
+
93
+ Shows the config directory and a table of all profiles with their authentication state.
94
+
95
+ ### List Chats
96
+
97
+ ```bash
98
+ gemiterm list
99
+ ```
100
+
101
+ Options:
102
+ - `-n, --limit N`: Maximum number of chats (default: 10)
103
+ - `--offset N`: Skip first N chats (default: 0)
104
+ - `--sort <recent|oldest|alpha>`: Sort order
105
+ - `-s, --search <query>`: Filter by title
106
+ - `--after <date>`: Only chats after this date
107
+ - `--before <date>`: Only chats before this date
108
+ - `--all`: Show all chats (no limit)
109
+ - `--all-profiles`: Merge chats from all profiles
110
+ - `-f, --format <text|json>`: Output format
111
+ - `-p, --path <path>`: Save output to file
112
+
113
+ ### Fetch Chat History
114
+
115
+ ```bash
116
+ gemiterm fetch <conversation_id>
117
+ ```
118
+
119
+ Options:
120
+ - `-f, --format <text|json>`: Output format
121
+ - `-p, --path <path>`: Save output to file
122
+
123
+ ### Continue a Chat
124
+
125
+ ```bash
126
+ gemiterm continue <conversation_id> [message]
127
+ ```
128
+
129
+ Without a message, enters an interactive REPL session. Without a conversation ID, falls back to `list`.
130
+
131
+ ### Start a New Chat
132
+
133
+ ```bash
134
+ gemiterm new [message]
135
+ ```
136
+
137
+ Options:
138
+ - `-p, --profile <name>`: Use a specific profile
139
+
140
+ Without a message, enters an interactive REPL session.
141
+
142
+ ### Export Chat
143
+
144
+ ```bash
145
+ gemiterm export <conversation_id>
146
+ ```
147
+
148
+ Options:
149
+ - `-o, --output <path>`: Custom output file path
150
+ - `-f, --format <markdown|json>`: Export format (default: markdown)
151
+ - `--include-metadata`: Include full metadata in export
152
+
153
+ ### Export All Chats
154
+
155
+ ```bash
156
+ gemiterm export-all
157
+ ```
158
+
159
+ Options:
160
+ - `-o, --output-dir <dir>`: Output directory (default: `./exports`)
161
+ - `--since <date>`: Only chats newer than this date
162
+ - `--include-metadata`: Include full metadata
163
+ - `-a, --all-profiles`: Export from all profiles
164
+
165
+ Creates an `index.md` with links to all exported files.
166
+
167
+ ### Delete a Chat
168
+
169
+ ```bash
170
+ gemiterm delete <conversation_id>
171
+ ```
172
+
173
+ Options:
174
+ - `-f, --force`: Skip confirmation prompt
175
+
176
+ ### Manage Profiles
177
+
178
+ ```bash
179
+ gemiterm profile list # list all profiles
180
+ gemiterm profile add <name> # add a new profile
181
+ gemiterm profile delete <name> # delete a profile
182
+ gemiterm profile rename <name> <newName> # rename a profile
183
+ gemiterm profile default <name> # set default profile
184
+ ```
185
+
186
+ ### Install Browser
187
+
188
+ ```bash
189
+ gemiterm install-browser
190
+ ```
191
+
192
+ Checks for system Chrome/Edge first, falls back to installing Playwright's Chromium.
193
+
194
+ ### Verbose Logging
195
+
196
+ ```bash
197
+ gemiterm -v <command>
198
+ ```
199
+
200
+ ## Configuration
201
+
202
+ ### Configuration Directory
203
+
204
+ Default locations:
205
+ - **Binary**: `$env:LOCALAPPDATA\GemiTerm\` (Windows), `~/.local/bin/gemiterm` (Linux/macOS)
206
+ - **Config**: `%APPDATA%\gemiterm\` (Windows), `~/gemiterm/` (Linux/macOS)
207
+
208
+ Override with:
209
+ ```bash
210
+ export GEMITERM_CONFIG_DIR=/custom/path
211
+ ```
212
+
213
+ ### Profile Storage
214
+
215
+ ```
216
+ gemiterm/
217
+ profiles/
218
+ .default # text file with default profile name
219
+ <profile-name>/
220
+ storage_state.json # authentication cookies
221
+ ```
222
+
223
+ ### Environment Variables
224
+
225
+ | Variable | Description | Default |
226
+ |----------|-------------|---------|
227
+ | `GEMITERM_CONFIG_DIR` | Configuration directory | Platform default |
228
+
229
+ ## Architecture
230
+
231
+ ```
232
+ src/
233
+ cli/ # CLI commands, argument parsing, output formatting
234
+ core/ # Mediator pattern (CQRS), typed commands/queries, handlers, domain types
235
+ services/ # Business logic: auth flow, cookie management, Gemini API client
236
+ infrastructure/ # Config, file I/O, logging, validation, formatters
237
+ tests/
238
+ cli/ # CLI command tests
239
+ core/ # Query handler tests
240
+ services/ # Service layer tests
241
+ infrastructure/ # Infrastructure tests
242
+ fixtures/ # Shared test fixtures
243
+ ```
244
+
245
+ Core uses a **Mediator pattern** with typed Command/Query messages dispatching to registered handlers, decoupling CLI commands from business logic.
package/bun.lock ADDED
@@ -0,0 +1,105 @@
1
+ {
2
+ "lockfileVersion": 1,
3
+ "configVersion": 1,
4
+ "workspaces": {
5
+ "": {
6
+ "name": "gemiterm-bun-rewrite",
7
+ "dependencies": {
8
+ "chalk": "^5.6.2",
9
+ "cli-table3": "^0.6.5",
10
+ "gemini-reverse": "^1.0.12",
11
+ },
12
+ "devDependencies": {
13
+ "@types/bun": "^1.3.14",
14
+ },
15
+ "peerDependencies": {
16
+ "typescript": "^6.0.3",
17
+ },
18
+ },
19
+ },
20
+ "packages": {
21
+ "@colors/colors": ["@colors/colors@1.5.0", "", {}, "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ=="],
22
+
23
+ "@types/bun": ["@types/bun@1.3.14", "", { "dependencies": { "bun-types": "1.3.14" } }, "sha512-h1hFqFVcvAvD9j9K7ZW7vd82aSA+rTdznZa+5bwvCwqSB1jmmfLcbIWhOLx1/+boy/xmjgCs/OMUL8hRJSmnPw=="],
24
+
25
+ "@types/node": ["@types/node@25.9.2", "", { "dependencies": { "undici-types": ">=7.24.0 <7.24.7" } }, "sha512-G05zqtJhcDLb8uslf5EjCxXg9G1KQxiV8OS0R26IC//Eoyitzqe8z37I7cqvnZlrlSfgocQRfSn/AHBZJJFyGw=="],
26
+
27
+ "agent-base": ["agent-base@6.0.2", "", { "dependencies": { "debug": "4" } }, "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="],
28
+
29
+ "ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
30
+
31
+ "asynckit": ["asynckit@0.4.0", "", {}, "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="],
32
+
33
+ "axios": ["axios@1.17.0", "", { "dependencies": { "follow-redirects": "^1.16.0", "form-data": "^4.0.5", "https-proxy-agent": "^5.0.1", "proxy-from-env": "^2.1.0" } }, "sha512-J8SwNxprqqpbfenehxWYXE7CW+wM1BB4w3+N+g+/Wx40xM4rsLrfPmHHxSWIxJLYDgSY/HqlFPIYb2/S3rxafw=="],
34
+
35
+ "bun-types": ["bun-types@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="],
36
+
37
+ "call-bind-apply-helpers": ["call-bind-apply-helpers@1.0.2", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" } }, "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ=="],
38
+
39
+ "chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="],
40
+
41
+ "cli-table3": ["cli-table3@0.6.5", "", { "dependencies": { "string-width": "^4.2.0" }, "optionalDependencies": { "@colors/colors": "1.5.0" } }, "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ=="],
42
+
43
+ "combined-stream": ["combined-stream@1.0.8", "", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="],
44
+
45
+ "debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="],
46
+
47
+ "delayed-stream": ["delayed-stream@1.0.0", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="],
48
+
49
+ "dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="],
50
+
51
+ "emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
52
+
53
+ "es-define-property": ["es-define-property@1.0.1", "", {}, "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="],
54
+
55
+ "es-errors": ["es-errors@1.3.0", "", {}, "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="],
56
+
57
+ "es-object-atoms": ["es-object-atoms@1.1.2", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw=="],
58
+
59
+ "es-set-tostringtag": ["es-set-tostringtag@2.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" } }, "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA=="],
60
+
61
+ "follow-redirects": ["follow-redirects@1.16.0", "", {}, "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw=="],
62
+
63
+ "form-data": ["form-data@4.0.5", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.2", "mime-types": "^2.1.12" } }, "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w=="],
64
+
65
+ "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="],
66
+
67
+ "gemini-reverse": ["gemini-reverse@1.0.12", "", { "dependencies": { "axios": "^1.13.6", "form-data": "^4.0.5", "uuid": "^13.0.0" } }, "sha512-k1k3uxQQ9LIX2c0iWbyeG6JPPMAYVP8K1AQWvmtNqiMhePr6XY5QCOXLy5NzZ94q12m/a0N+p3vQRQKWFhHx5Q=="],
68
+
69
+ "get-intrinsic": ["get-intrinsic@1.3.0", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ=="],
70
+
71
+ "get-proto": ["get-proto@1.0.1", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="],
72
+
73
+ "gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="],
74
+
75
+ "has-symbols": ["has-symbols@1.1.0", "", {}, "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="],
76
+
77
+ "has-tostringtag": ["has-tostringtag@1.0.2", "", { "dependencies": { "has-symbols": "^1.0.3" } }, "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw=="],
78
+
79
+ "hasown": ["hasown@2.0.4", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A=="],
80
+
81
+ "https-proxy-agent": ["https-proxy-agent@5.0.1", "", { "dependencies": { "agent-base": "6", "debug": "4" } }, "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA=="],
82
+
83
+ "is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="],
84
+
85
+ "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="],
86
+
87
+ "mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="],
88
+
89
+ "mime-types": ["mime-types@2.1.35", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="],
90
+
91
+ "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
92
+
93
+ "proxy-from-env": ["proxy-from-env@2.1.0", "", {}, "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA=="],
94
+
95
+ "string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
96
+
97
+ "strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
98
+
99
+ "typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="],
100
+
101
+ "undici-types": ["undici-types@7.24.6", "", {}, "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg=="],
102
+
103
+ "uuid": ["uuid@13.0.2", "", { "bin": { "uuid": "dist-node/bin/uuid" } }, "sha512-vzi9uRZ926x4XV73S/4qQaTwPXM2JBj6/6lI/byHH1jOpCzb0zDbfytgA9LcN/hzb2l7WQSQnxITOVx5un/wGw=="],
104
+ }
105
+ }
@@ -0,0 +1,185 @@
1
+ # Installation Guide
2
+
3
+ The installer scripts are attached to every GitHub release by the `release.yml` workflow. If you see a 404 on the one-liner URL, the release pipeline (owned by the `cross-platform-build-and-ci` change) may not have attached the scripts; check the GitHub release page directly.
4
+
5
+ ## Install
6
+
7
+ **Windows** (PowerShell 7+):
8
+
9
+ ```powershell
10
+ irm https://github.com/expert-vision-software/GemiTerm/releases/latest/download/install.ps1 | iex
11
+ ```
12
+
13
+ **Linux / WSL**:
14
+
15
+ ```bash
16
+ curl -fsSL https://github.com/expert-vision-software/GemiTerm/releases/latest/download/install.sh | bash
17
+ ```
18
+
19
+ > **Recommended install via package manager.** If you have `bun` or `npm` on PATH, the installer will detect it and prompt: "It is recommended to install via bun or npm package manager. Are you sure you want to continue with binary install?" Answer `y` to proceed with the binary drop, or install via:
20
+ > - `bun i -g gemiterm`
21
+ > - `npm i -g gemiterm`
22
+ >
23
+ > The prompt is suppressed when stdin is not a TTY (e.g. the `curl | bash` one-liner flow), so unattended installs proceed.
24
+
25
+ ## Upgrade from v1.4.1
26
+
27
+ Your profiles, cookies, and default-profile marker are preserved. The installer replaces the binary in place; it does **NOT** touch `%APPDATA%\gemiterm\` (Windows) or `~/gemiterm/` (POSIX). This is verified by the path-resolution logic in `src/infrastructure/path-utils.ts` — the v2.0.0 binary reads from the same config directory that v1.4.1 wrote to.
28
+
29
+ On Windows, the v1.4.1 Python config lived at `%USERPROFILE%\.config\gemiterm\` (Python's `Path.home() / ".config/gemiterm"` has no Windows branch). When the installer detects a v1.4.1 config at that path and no v2.0.0 config at `%APPDATA%\gemiterm\`, it copies the tree forward automatically. The v1.4.1 directory is left in place as a safety net — you can delete it manually after verifying the migration.
30
+
31
+ On POSIX, the v1.4.1 Python config lived at `~/.config/gemiterm/`. v2.0.0 reads from `~/gemiterm/`. The installer performs the same one-time copy-forward when it detects the old path.
32
+
33
+ If you have the Python v1.4.1 version installed via `pip`, the installer will detect it and ask you to run `pip uninstall gemiterm` first. Your config data is safe and will be preserved through the uninstall/reinstall cycle.
34
+
35
+ ## Uninstall
36
+
37
+ **Windows**:
38
+
39
+ ```powershell
40
+ pwsh -File install.ps1 -Uninstall
41
+ ```
42
+
43
+ **Linux / WSL**:
44
+
45
+ ```bash
46
+ bash install.sh --uninstall
47
+ ```
48
+
49
+ Uninstall removes the binary and PATH entry but **preserves** your config directory (profiles, cookies, default-profile marker). Re-installing afterward will find the same profiles as before.
50
+
51
+ ## Data Paths
52
+
53
+ | Path | Windows | Linux / WSL |
54
+ |------|---------|-------------|
55
+ | **Binary** | `$env:LOCALAPPDATA\GemiTerm\GemiTerm.exe` | `~/.local/bin/gemiterm` |
56
+ | **Config** | `%APPDATA%\gemiterm\` | `~/gemiterm/` |
57
+ | **Chromium cache** | `$env:LOCALAPPDATA\ms-playwright\` | `~/.cache/ms-playwright/` |
58
+
59
+ > **Note:** On Windows, the install directory is **capital G** (`GemiTerm`) while the config directory is **lowercase** (`gemiterm`). This matches the v1.4.1 convention and is intentional.
60
+
61
+ ## Tag Override (Canary / RC Installs)
62
+
63
+ To install a specific release instead of the latest:
64
+
65
+ **Windows**:
66
+
67
+ ```powershell
68
+ pwsh -File install.ps1 -Tag v2.0.0-rc.1
69
+ ```
70
+
71
+ **Linux / WSL**:
72
+
73
+ ```bash
74
+ GEMITERM_TAG=v2.0.0-rc.1 bash install.sh
75
+ ```
76
+
77
+ ## Custom Install Directory
78
+
79
+ **Windows**:
80
+
81
+ ```powershell
82
+ pwsh -File install.ps1 -InstallDir D:\Tools\GemiTerm
83
+ ```
84
+
85
+ **Linux / WSL**:
86
+
87
+ ```bash
88
+ GEMITERM_INSTALL_DIR=~/.local/bin bash install.sh
89
+ ```
90
+
91
+ ## Troubleshooting
92
+
93
+ ### PATH did not refresh in current shell
94
+
95
+ After installing, if `gemiterm` is not found:
96
+
97
+ **Windows** — reload your PATH in the current PowerShell session:
98
+
99
+ ```powershell
100
+ $env:Path = [Environment]::GetEnvironmentVariable('Path', 'User')
101
+ gemiterm --version
102
+ ```
103
+
104
+ Or open a new terminal.
105
+
106
+ **Linux / WSL** — source the env snippet:
107
+
108
+ ```bash
109
+ source ~/gemiterm/env.sh
110
+ gemiterm --version
111
+ ```
112
+
113
+ Or open a new terminal.
114
+
115
+ ### Chromium installation fails
116
+
117
+ The installer runs `bunx @playwright/cli install chromium` as part of the install flow. If it fails:
118
+
119
+ 1. Check your network connection (Chromium is ~100 MB).
120
+ 2. Re-run the installer.
121
+ 3. Or manually run: `bunx @playwright/cli install chromium`
122
+
123
+ ### Cannot reach GitHub releases
124
+
125
+ If the installer cannot contact `api.github.com`:
126
+
127
+ 1. Check your network connection.
128
+ 2. Use the **Build from source** instructions below.
129
+
130
+ ### Bun not installed
131
+
132
+ The installer automatically bootstraps [Bun](https://bun.sh) if it is not found. If the bootstrap fails:
133
+
134
+ 1. Install Bun manually from [bun.sh](https://bun.sh).
135
+ 2. Re-run the installer.
136
+
137
+ ### fish / nushell users
138
+
139
+ The POSIX installer appends a `source` line to `~/.bashrc` and `~/.zshrc`. For other shells, add the PATH manually:
140
+
141
+ **fish** (`~/.config/fish/config.fish`):
142
+
143
+ ```fish
144
+ set -gx PATH ~/.local/bin $PATH
145
+ ```
146
+
147
+ **nushell** (`~/.config/nushell/config.nu`):
148
+
149
+ ```nu
150
+ $env.PATH = ($env.PATH | prepend ~/.local/bin)
151
+ ```
152
+
153
+ ## Build from Source
154
+
155
+ Requires [Bun](https://bun.sh) 1.3.13 or later.
156
+
157
+ ```bash
158
+ git clone https://github.com/expert-vision-software/GemiTerm.git
159
+ cd GemiTerm
160
+ bun install
161
+ bun run build
162
+ ```
163
+
164
+ The resulting binary is at `dist/gemiterm` (Linux/macOS) or `dist/gemiterm.exe` (Windows). Move it to the install path:
165
+
166
+ **Linux / WSL**:
167
+
168
+ ```bash
169
+ mkdir -p ~/.local/bin
170
+ mv dist/gemiterm ~/.local/bin/gemiterm
171
+ chmod +x ~/.local/bin/gemiterm
172
+ ```
173
+
174
+ **Windows**:
175
+
176
+ ```powershell
177
+ mkdir $env:LOCALAPPDATA\GemiTerm
178
+ Move-Item dist\gemiterm.exe $env:LOCALAPPDATA\GemiTerm\GemiTerm.exe
179
+ ```
180
+
181
+ Then install Chromium:
182
+
183
+ ```bash
184
+ bunx @playwright/cli install chromium
185
+ ```