@terminai/core 0.26.0 → 0.50.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 (97) hide show
  1. package/LICENSE +247 -0
  2. package/README.md +422 -0
  3. package/dist/docs/CONTRIBUTING.md +8 -8
  4. package/dist/docs/changelogs/index.md +5 -5
  5. package/dist/docs/cli/commands.md +43 -17
  6. package/dist/docs/cli/quick-reference.md +61 -0
  7. package/dist/docs/cli/telemetry.md +3 -792
  8. package/dist/docs/extensions/index.md +1 -1
  9. package/dist/docs/get-started/configuration.md +6 -2
  10. package/dist/docs/index.md +17 -17
  11. package/dist/docs/{termai-comparison.md → terminai-comparison.md} +18 -18
  12. package/dist/docs/{termai-examples.md → terminai-examples.md} +2 -2
  13. package/dist/docs/{termai-operator-recipes.md → terminai-operator-recipes.md} +1 -1
  14. package/dist/docs/{termai-process-manager.md → terminai-process-manager.md} +7 -7
  15. package/dist/docs/{termai-quickstart.md → terminai-quickstart.md} +10 -10
  16. package/dist/docs/{termai-system.md → terminai-system.md} +2 -2
  17. package/dist/index.d.ts +0 -1
  18. package/dist/index.js +0 -1
  19. package/dist/index.js.map +1 -1
  20. package/dist/src/auth/wizardSettings.js +3 -0
  21. package/dist/src/auth/wizardSettings.js.map +1 -1
  22. package/dist/src/auth/wizardSettings.test.js +3 -0
  23. package/dist/src/auth/wizardSettings.test.js.map +1 -1
  24. package/dist/src/brain/__tests__/advisors.test.js +25 -6
  25. package/dist/src/brain/__tests__/advisors.test.js.map +1 -1
  26. package/dist/src/brain/__tests__/cognitiveArchitecture.test.js +24 -0
  27. package/dist/src/brain/__tests__/cognitiveArchitecture.test.js.map +1 -1
  28. package/dist/src/brain/__tests__/thinkingOrchestrator.test.js +29 -5
  29. package/dist/src/brain/__tests__/thinkingOrchestrator.test.js.map +1 -1
  30. package/dist/src/config/builder.js +4 -1
  31. package/dist/src/config/builder.js.map +1 -1
  32. package/dist/src/config/settings/loader.d.ts +1 -0
  33. package/dist/src/config/settings/loader.js +10 -0
  34. package/dist/src/config/settings/loader.js.map +1 -1
  35. package/dist/src/config/settings/schema.d.ts +2 -5
  36. package/dist/src/config/settings/schema.js +2 -3
  37. package/dist/src/config/settings/schema.js.map +1 -1
  38. package/dist/src/core/client.test.js +0 -2
  39. package/dist/src/core/client.test.js.map +1 -1
  40. package/dist/src/core/coreToolScheduler.test.js +1 -1
  41. package/dist/src/core/coreToolScheduler.test.js.map +1 -1
  42. package/dist/src/generated/git-commit.d.ts +2 -2
  43. package/dist/src/generated/git-commit.js +2 -2
  44. package/dist/src/generated/git-commit.js.map +1 -1
  45. package/dist/src/mcp/token-storage/hybrid-token-storage.d.ts +3 -0
  46. package/dist/src/mcp/token-storage/hybrid-token-storage.js +34 -13
  47. package/dist/src/mcp/token-storage/hybrid-token-storage.js.map +1 -1
  48. package/dist/src/mcp/token-storage/hybrid-token-storage.test.js +25 -0
  49. package/dist/src/mcp/token-storage/hybrid-token-storage.test.js.map +1 -1
  50. package/dist/src/openai_chatgpt/imports.test.js +17 -1
  51. package/dist/src/openai_chatgpt/imports.test.js.map +1 -1
  52. package/dist/src/telemetry/config.d.ts +1 -0
  53. package/dist/src/telemetry/config.js +3 -4
  54. package/dist/src/telemetry/config.js.map +1 -1
  55. package/dist/src/telemetry/config.test.js +6 -4
  56. package/dist/src/telemetry/config.test.js.map +1 -1
  57. package/dist/src/telemetry/index.d.ts +0 -2
  58. package/dist/src/telemetry/index.js +0 -2
  59. package/dist/src/telemetry/index.js.map +1 -1
  60. package/dist/src/telemetry/loggers.js +0 -36
  61. package/dist/src/telemetry/loggers.js.map +1 -1
  62. package/dist/src/telemetry/loggers.test.js +17 -1
  63. package/dist/src/telemetry/loggers.test.js.map +1 -1
  64. package/dist/src/telemetry/sdk.js +24 -19
  65. package/dist/src/telemetry/sdk.js.map +1 -1
  66. package/dist/src/telemetry/sdk.test.js +17 -135
  67. package/dist/src/telemetry/sdk.test.js.map +1 -1
  68. package/dist/src/tools/confirmation-policy.test.js +1 -1
  69. package/dist/src/tools/confirmation-policy.test.js.map +1 -1
  70. package/dist/src/utils/paths.js +7 -3
  71. package/dist/src/utils/paths.js.map +1 -1
  72. package/dist/src/utils/paths.test.js +31 -2
  73. package/dist/src/utils/paths.test.js.map +1 -1
  74. package/dist/src/utils/shell-permissions.test.js +4 -2
  75. package/dist/src/utils/shell-permissions.test.js.map +1 -1
  76. package/dist/src/utils/shell-utils.test.js +4 -2
  77. package/dist/src/utils/shell-utils.test.js.map +1 -1
  78. package/dist/tsconfig.tsbuildinfo +1 -1
  79. package/package.json +1 -5
  80. package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +0 -159
  81. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +0 -1210
  82. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +0 -1
  83. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.d.ts +0 -20
  84. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +0 -835
  85. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +0 -1
  86. package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +0 -140
  87. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +0 -350
  88. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +0 -1
  89. package/dist/src/telemetry/gcp-exporters.d.ts +0 -36
  90. package/dist/src/telemetry/gcp-exporters.js +0 -121
  91. package/dist/src/telemetry/gcp-exporters.js.map +0 -1
  92. package/dist/src/telemetry/gcp-exporters.test.d.ts +0 -7
  93. package/dist/src/telemetry/gcp-exporters.test.js +0 -319
  94. package/dist/src/telemetry/gcp-exporters.test.js.map +0 -1
  95. package/dist/src/telemetry/integration.test.circular.d.ts +0 -7
  96. package/dist/src/telemetry/integration.test.circular.js +0 -55
  97. package/dist/src/telemetry/integration.test.circular.js.map +0 -1
package/LICENSE ADDED
@@ -0,0 +1,247 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
203
+ ===============================================================================
204
+ TRADEMARK NOTICE
205
+ ===============================================================================
206
+
207
+ "TerminaI" is a trademark of Prof-Harita (Nittala Venkata Sastry).
208
+
209
+ While the SOURCE CODE in this repository is licensed under the Apache License
210
+ 2.0 (as stated above), the TERMINAI NAME, LOGO, and BRAND IDENTITY are NOT
211
+ licensed for unrestricted use.
212
+
213
+ The Apache 2.0 license grants you rights to use, modify, and distribute the
214
+ code. However, it does NOT grant trademark rights. Section 6 of the Apache
215
+ License explicitly states: "This License does not grant permission to use the
216
+ trade names, trademarks, service marks, or product names of the Licensor."
217
+
218
+ PERMITTED TRADEMARK USES:
219
+
220
+ - Referring to the TerminaI project in documentation or articles
221
+ - Linking to the official TerminaI repository
222
+ - Academic, educational, or press references to TerminaI
223
+ - Stating that your work is "based on TerminaI" or "compatible with TerminaI"
224
+
225
+ PROHIBITED TRADEMARK USES (without written permission):
226
+
227
+ - Using "TerminaI" as the name of a competing product or service
228
+ - Using the TerminaI logo or brand assets in your product
229
+ - Creating confusion about whether your product is the official TerminaI
230
+ - Implying endorsement or official status without permission
231
+
232
+ FORKS AND DERIVATIVE WORKS:
233
+ If you create a fork or derivative work (which the Apache 2.0 license permits),
234
+ you MUST:
235
+
236
+ - Use a different name (e.g., "MyTerminal" or "MyTerminal based on TerminaI")
237
+ - Not use the TerminaI logo or brand identity
238
+ - Clearly state that it is a fork/derivative and not official
239
+ - Follow all Apache 2.0 license requirements for the code
240
+
241
+ COMMERCIAL TRADEMARK LICENSING:
242
+ For commercial use of the TerminaI trademark, custom licensing, or partnership
243
+ inquiries, please contact: prof.harita@gmail.com
244
+
245
+ See TRADEMARK.md for complete trademark usage guidelines.
246
+
247
+ ===============================================================================
package/README.md ADDED
@@ -0,0 +1,422 @@
1
+ # TerminAI
2
+
3
+ ### The safe, local-first AI operator for your terminal.
4
+
5
+ **Stop copy-pasting from ChatGPT.** TerminAI is the CLI that operates your
6
+ machine with permissions you control.
7
+
8
+ Runs on Windows/Linux/macOS using the models you already trust (Gemini, OpenAI,
9
+ Local LLMs). Designed for real system changes or user workflows - governed,
10
+ reviewable, and reversible.
11
+
12
+ <div align="center">
13
+ <img src="docs-terminai/assets/terminai-banner.svg" alt="TerminAI Banner" width="100%">
14
+ </div>
15
+
16
+ <p align="center">
17
+ <a href="https://github.com/Prof-Harita/terminaI/actions/workflows/ci.yml"><img src="https://github.com/Prof-Harita/terminaI/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
18
+ <img src="https://img.shields.io/badge/Node.js-20+-339933" alt="Node.js 20+">
19
+ <img src="https://img.shields.io/badge/License-Apache%202.0-green" alt="License">
20
+ </p>
21
+
22
+ **TerminAI is an AI-powered system operator.**
23
+ You describe what you want; TerminAI inspects your machine, proposes a plan, and
24
+ executes it through **governed tools** with a deterministic **approval ladder**
25
+ and an **audit trail**.
26
+
27
+ > **Status: Public Preview (v0.x)**
28
+ > The core operator loop is rock-solid. CLI is the canonical surface.
29
+ > Desktop/Voice/A2A are optional and still being hardened across platforms.
30
+ > Expect power; expect rough edges. Contributions welcome.
31
+
32
+ ---
33
+
34
+ ## What this is / what this is not
35
+
36
+ **This is:**
37
+
38
+ - A **local-first operator runtime**: intent → governed plan → approvals →
39
+ execution → audit log.
40
+ - A **real terminal operator** (true PTY): it can handle interactive sessions
41
+ (sudo prompts, ssh, vim/htop-style flows).
42
+ - A **model-flexible** setup: choose a provider you already use (including
43
+ OpenAI-compatible endpoints and local gateways).
44
+ - **100% free and 100% private** if you want it to be. Use free models on
45
+ OpenRouter, run local LLMs—no telemetry, no charges, ever.
46
+
47
+ **This is not:**
48
+
49
+ - A hosted service. There is **no "contact sales," no pilots, no managed
50
+ deployment**, and no support obligations—this is best-effort OSS.
51
+ - An "unchecked agent" that silently runs commands. Risky actions are gated
52
+ behind explicit approvals and logged locally.
53
+ - A promise that every surface is production-hardened today
54
+ (desktop/voice/remote features are optional previews).
55
+
56
+ ---
57
+
58
+ ## Demo
59
+
60
+ <div align="center">
61
+ <img src="docs-terminai/assets/Kooha_combined_cropped.gif" alt="TerminAI Demo" width="100%">
62
+ </div>
63
+
64
+ ---
65
+
66
+ ## Try it right now (10 min)
67
+
68
+ Pick one of these prompts and paste it into TerminAI. _(Click to copy the full
69
+ prompt)_
70
+
71
+ <details>
72
+ <summary><strong>🌍 1. Plan a complex trip (Research & Output)</strong></summary>
73
+
74
+ > "Plan an itinerary for Paris. I am visiting as a tourist for 2 days next
75
+ > Saturday. I have already seen the big attractions (Eiffel, Louvre). Find me
76
+ > hidden gems and plan my trip hour-by-hour, including restaurants. Show it on a
77
+ > map. I will visit all these locations via the Metro. Once done, save the
78
+ > map-based visual output as a PDF."
79
+
80
+ </details>
81
+
82
+ <details>
83
+ <summary><strong>🔧 2. Fix broken drivers (System Repair)</strong></summary>
84
+
85
+ > "My graphics drivers seem unstable after the last OS update. Identify my GPU
86
+ > model, check the currently installed driver version, and find the correct
87
+ > latest stable driver. Propose a clean install plan and verify it before
88
+ > execution."
89
+
90
+ </details>
91
+
92
+ <details>
93
+ <summary><strong>📈 3. Monitor & Automate (Background Tasks)</strong></summary>
94
+
95
+ > "Check the price of Bitcoin every 10 minutes. If it drops below $90,000, send
96
+ > a system notification and append the timestamp/price to `~/crypto_log.csv`.
97
+ > Keep running this in the background until I stop it."
98
+
99
+ </details>
100
+
101
+ ---
102
+
103
+ ## Vision
104
+
105
+ What if your computer could do things for you safely?
106
+
107
+ Not just suggesting commands. Not just generating scripts. Actually operating
108
+ your system—diagnosing issues, fixing problems, and orchestrating
109
+ workflows—**with guardrails that make execution trustworthy.**
110
+
111
+ For years, "internet help" meant: copy instructions from a chat window, paste
112
+ into your terminal, and hope you didn't miss a step. Coding tools (Cursor,
113
+ Aider, etc.) reduced that friction for software development—but the rest of your
114
+ computer is still stuck in the copy/paste era.
115
+
116
+ TerminAI is the next interface: you state intent, it proposes a governed plan,
117
+ you approve at the right level, and it executes with an audit trail. Fewer
118
+ fragile steps. More outcomes—without handing your machine to an unchecked agent.
119
+
120
+ ---
121
+
122
+ ## Why this exists
123
+
124
+ Computers are powerful, but operating them still requires memorizing syntax,
125
+ hunting through logs, and repeating the same diagnosis steps.
126
+
127
+ TerminAI compresses the gap between **intent** and **execution**—without turning
128
+ your machine into an uncontrolled "agent."
129
+
130
+ **Intent → Governed plan → Approval → Execution → Audit**
131
+
132
+ ---
133
+
134
+ ## Who it's for
135
+
136
+ - **Generalist users** — “Review the largest files in my downloads folder,
137
+ prioritizing the oldest first, i need to free up 200 GB of space.” “What is
138
+ wrong with my internet; reset my adapter.” “Setup a HP printer.” "Monitor the
139
+ stock price of NVDA and alert me when it hits xx$". "Why is my system so slow?
140
+ Can you free up memory" "Can you install the best markdown viewer on my linux
141
+ machine?". "I just re-installed Windows. Find specific drivers for my GPU and
142
+ install them".
143
+ - **Developers** — “Set up my machine for this repo.” “Fix my dev environment.”
144
+ “Explain what broke and how to recover.” "Install all the dependencies for
145
+ this project"
146
+ - **Tech purists** — AI leverage with deterministic guardrails, explicit
147
+ approvals, and tamper-evident logs.
148
+ - **Professional engineers / DevOps** — Remotely control your servers,
149
+ repeatable workflows, headless-friendly CLI, safer execution, readable audit
150
+ trails.
151
+
152
+ ---
153
+
154
+ ## Two ways to use TerminAI
155
+
156
+ - **CLI (canonical):** for developers, power users, and headless environments.
157
+ - **Desktop (preview):** a Tauri wrapper around the same engine (GUI + voice
158
+ surface). Linux/Windows are early; macOS is in progress. Treat as experimental
159
+ until hardened.
160
+
161
+ The canonical command is: `terminai`.
162
+
163
+ ---
164
+
165
+ ## What makes TerminAI different
166
+
167
+ AI system operation must be governed. TerminAI is built around that primitive.
168
+
169
+ - **True PTY support:** handles interactive applications correctly (sudo
170
+ prompts, ssh sessions, vim/htop-like flows) via `node-pty`.
171
+ - **Governed autonomy:** a strict **policy engine** + deterministic **approval
172
+ ladder** (A/B/C) replaces "yolo execution."
173
+ - **Audit trail by default:** structured **JSONL** logs for actions and intent
174
+ tracking (local files you can review/replay).
175
+ - **Provider flexibility:** choose what you already use—Google, OpenAI sign-in,
176
+ or any OpenAI-compatible `/chat/completions` endpoint (OpenRouter, local
177
+ gateways, etc.).
178
+ - **Deep extensibility:** first-class support for **MCP** (tool connectors) and
179
+ an optional **Agent-to-Agent (A2A)** control plane (preview).
180
+ - **Local-first posture:** core operation runs on your machine; no hosted relay
181
+ is required. Any optional remote features are opt-in and under your control.
182
+
183
+ ## Read more: `docs-terminai/why-terminai.md`
184
+
185
+ ## Install
186
+
187
+ ### CLI (npm)
188
+
189
+ Prereqs: Node.js 20+
190
+
191
+ ```bash
192
+ npm i -g @terminai/cli
193
+ terminai --version
194
+ terminai
195
+ ```
196
+
197
+ > If you don't see the CLI package yet (or want bleeding-edge), install from
198
+ > source below.
199
+
200
+ ### Desktop (installers) — preview
201
+
202
+ Download installers from GitHub Releases (desktop is in preview):
203
+
204
+ - https://github.com/Prof-Harita/terminaI/releases
205
+
206
+ ---
207
+
208
+ ### Git clone and build (contributors / bleeding-edge)
209
+
210
+ ```bash
211
+ git clone https://github.com/Prof-Harita/terminaI.git
212
+ cd terminaI
213
+ npm install
214
+ npm run build
215
+ ```
216
+
217
+ ---
218
+
219
+ ## Upgrade (if you installed earlier)
220
+
221
+ If you installed before the recent multi-provider updates, upgrade so you get
222
+ the latest auth + platform parity.
223
+
224
+ - **npm global:**
225
+ ```bash
226
+ npm i -g @terminai/cli@latest
227
+ terminai --version
228
+ ```
229
+ - **release installers:** grab the latest from Releases and reinstall:
230
+ - https://github.com/Prof-Harita/terminaI/releases
231
+ - **source build:**
232
+ ```bash
233
+ git pull
234
+ npm install
235
+ npm run build
236
+ ```
237
+
238
+ ---
239
+
240
+ ## Quick start (providers)
241
+
242
+ Run `terminai` and the wizard guides you through setup.
243
+
244
+ ### Google Gemini (default)
245
+
246
+ Fastest path for many users.
247
+
248
+ ```bash
249
+ terminai
250
+ # Select "Google Gemini" → browser opens → sign in
251
+ ```
252
+
253
+ Or use an API key:
254
+
255
+ ```bash
256
+ # macOS/Linux
257
+ export TERMINAI_API_KEY="your-gemini-key"
258
+
259
+ # Windows (PowerShell)
260
+ $env:TERMINAI_API_KEY='your-gemini-key'
261
+
262
+ terminai
263
+ ```
264
+
265
+ ### ChatGPT sign-in (OAuth) — preview
266
+
267
+ Use an OpenAI browser sign-in flow (similar to how Codex tooling supports "Sign
268
+ in with ChatGPT").
269
+
270
+ ```bash
271
+ terminai
272
+ # Select "ChatGPT Sign-in (OAuth)" → sign in with OpenAI
273
+ ```
274
+
275
+ > Note: this is still being hardened. If anything fails, attach logs (see below)
276
+ > and open an issue.
277
+
278
+ ### OpenAI-Compatible
279
+
280
+ Connect to OpenAI Platform, OpenRouter, Ollama gateways, or any
281
+ `/chat/completions` endpoint.
282
+
283
+ ```bash
284
+ # macOS/Linux
285
+ export OPENAI_API_KEY="sk-..."
286
+
287
+ # Windows (PowerShell)
288
+ $env:OPENAI_API_KEY='sk-...'
289
+
290
+ terminai
291
+ # Select "OpenAI Compatible" → enter base URL and model
292
+ ```
293
+
294
+ **Popular configurations:**
295
+
296
+ - OpenAI: `https://api.openai.com/v1`
297
+ - OpenRouter: `https://openrouter.ai/api/v1`
298
+ - Local LLM gateway: `http://localhost:11434/v1`
299
+
300
+ See: `docs-terminai/multi-llm-support.md`
301
+
302
+ ```markdown
303
+ Use `/llm reset` to switch when inside. Note right now hot-swap is not fully
304
+ live. Please restart (Ctrl-C and npm run start or terminai) to apply changes.
305
+ ```
306
+
307
+ ---
308
+
309
+ ## Safety model (high level)
310
+
311
+ TerminAI routes execution through governed tools and a deterministic approval
312
+ ladder:
313
+
314
+ - **Level A**: safe/reversible actions (no approval)
315
+ - **Level B**: mutating actions (explicit approval)
316
+ - **Level C**: destructive or high-risk actions (explicit approval + PIN)
317
+
318
+ Audit logs are written to `~/.terminai/logs/audit/` (JSONL). Runtime/session
319
+ logs live in `~/.terminai/logs/`.
320
+
321
+ > Zero telemetry by design. No opt-in, no opt-out: just local logs you can
322
+ > inspect. Nothing leaves your system, except for the LLM provider you choose to
323
+ > use.
324
+
325
+ ## Documentation
326
+
327
+ Start here:
328
+
329
+ - `docs-terminai/quickstart.md`
330
+ - `docs-terminai/configuration.md`
331
+ - `docs-terminai/troubleshooting.md`
332
+ - `docs-terminai/voice.md`
333
+ - `docs-terminai/multi-llm-support.md`
334
+
335
+ Contributor and security references:
336
+
337
+ - `AGENTS.md`
338
+ - `CONTRIBUTING.md`
339
+ - `SECURITY.md`
340
+
341
+ ---
342
+
343
+ <details>
344
+ <summary><strong>Architecture (monorepo)</strong></summary>
345
+
346
+ ```text
347
+ packages/
348
+ ├── core/ # Engine: tools, policy, routing, logging/telemetry (opt-in)
349
+ ├── cli/ # Terminal UI (Ink/React)
350
+ ├── desktop/ # Tauri app + PTY bridge (preview)
351
+ ├── a2a-server/ # Agent-to-Agent control plane (preview)
352
+ ├── termai/ # `terminai` launcher
353
+ ├── cloud-relay/ # Self-hosted relay server (optional/preview; not provided as a service)
354
+ ```
355
+
356
+ </details>
357
+
358
+ <details>
359
+ <summary><strong>Development</strong></summary>
360
+
361
+ Prereqs:
362
+
363
+ - Node.js 20+
364
+ - Rust (latest stable) for Desktop builds
365
+ - Platform-specific build tools (see below)
366
+
367
+ **First-time setup** (auto-installs dependencies):
368
+
369
+ ```bash
370
+ npm ci
371
+ npm run setup:dev
372
+ ```
373
+
374
+ This detects your OS and installs the required build tools:
375
+
376
+ - **Windows**: Visual Studio Build Tools (C++ workload), WebView2
377
+ - **Linux**: build-essential, webkit2gtk, libappindicator, librsvg
378
+ - **macOS**: Xcode Command Line Tools
379
+
380
+ Build and run the CLI from source:
381
+
382
+ ```bash
383
+ npm run build
384
+ npm start
385
+ ```
386
+
387
+ Desktop dev:
388
+
389
+ ```bash
390
+ npm run desktop:dev
391
+ # Or: cd packages/desktop && npm run tauri dev
392
+ ```
393
+
394
+ </details>
395
+
396
+ ---
397
+
398
+ ## Why TerminAI vs “chat-first” computer assistants?
399
+
400
+ | Capability | Chat-first assistants / UI shells | TerminAI (governed operator runtime) |
401
+ | --------------------- | ----------------------------------- | -------------------------------------------------------------------------------------- |
402
+ | Real terminal control | Often best-effort command execution | **True PTY** (interactive sudo/ssh/TTY flows) |
403
+ | Safety model | “Be careful” prompts | **Policy + A/B/C approvals** for risky actions |
404
+ | Traceability | Partial transcripts | **Local JSONL audit logs** of what ran and why |
405
+ | Provider choice | Frequently tied to one model/vendor | **Model-agnostic** (Gemini / ChatGPT native Oauth, OpenAI-compatible + local gateways) |
406
+ | Platforms | Varies | **Windows + Linux + macOS** (CLI-first) |
407
+ | Goal | Assist with tasks | **Mutate system state safely** (review → approve → execute → verify) |
408
+ | Privacy | Varies. | Zero telemetry. Works great with local-hosted models |
409
+ | Price | $100 | Free. Works great with free models in OpenRouter (e.g., GPT-OSS) |
410
+
411
+ ## Lineage
412
+
413
+ TerminAI is the open-source evolution of Google's Gemini CLI:
414
+
415
+ - https://github.com/google-gemini/gemini-cli (Upstream)
416
+
417
+ ---
418
+
419
+ ## License and trademarks
420
+
421
+ - License: Apache-2.0 (see `LICENSE`)
422
+ - Trademark: see `TRADEMARK.md`