centaurus-cli 2.5.3 → 2.6.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 (88) hide show
  1. package/dist/cli-adapter.d.ts +6 -0
  2. package/dist/cli-adapter.d.ts.map +1 -1
  3. package/dist/cli-adapter.js +215 -29
  4. package/dist/cli-adapter.js.map +1 -1
  5. package/dist/commands/CommandParser.js +2 -2
  6. package/dist/commands/CommandParser.js.map +1 -1
  7. package/dist/config/defaultConfig.js +1 -1
  8. package/dist/config/defaultConfig.js.map +1 -1
  9. package/dist/config/models.d.ts +50 -5
  10. package/dist/config/models.d.ts.map +1 -1
  11. package/dist/config/models.js +144 -22
  12. package/dist/config/models.js.map +1 -1
  13. package/dist/config/types.d.ts +3 -0
  14. package/dist/config/types.d.ts.map +1 -1
  15. package/dist/config/types.js +3 -1
  16. package/dist/config/types.js.map +1 -1
  17. package/dist/index.js +9 -0
  18. package/dist/index.js.map +1 -1
  19. package/dist/services/ai-service-client.d.ts +8 -2
  20. package/dist/services/ai-service-client.d.ts.map +1 -1
  21. package/dist/services/ai-service-client.js +2 -1
  22. package/dist/services/ai-service-client.js.map +1 -1
  23. package/dist/services/environment-context-injector.d.ts +69 -0
  24. package/dist/services/environment-context-injector.d.ts.map +1 -0
  25. package/dist/services/environment-context-injector.js +198 -0
  26. package/dist/services/environment-context-injector.js.map +1 -0
  27. package/dist/tools/ToolRegistry.d.ts.map +1 -1
  28. package/dist/tools/ToolRegistry.js +120 -26
  29. package/dist/tools/ToolRegistry.js.map +1 -1
  30. package/dist/tools/command.d.ts.map +1 -1
  31. package/dist/tools/command.js +30 -6
  32. package/dist/tools/command.js.map +1 -1
  33. package/dist/tools/file-ops.d.ts.map +1 -1
  34. package/dist/tools/file-ops.js +70 -23
  35. package/dist/tools/file-ops.js.map +1 -1
  36. package/dist/tools/find-files.d.ts +47 -0
  37. package/dist/tools/find-files.d.ts.map +1 -0
  38. package/dist/tools/find-files.js +190 -0
  39. package/dist/tools/find-files.js.map +1 -0
  40. package/dist/tools/get-diff.d.ts +45 -0
  41. package/dist/tools/get-diff.d.ts.map +1 -0
  42. package/dist/tools/get-diff.js +138 -0
  43. package/dist/tools/get-diff.js.map +1 -0
  44. package/dist/tools/grep-search.d.ts +85 -0
  45. package/dist/tools/grep-search.d.ts.map +1 -0
  46. package/dist/tools/grep-search.js +497 -0
  47. package/dist/tools/grep-search.js.map +1 -0
  48. package/dist/tools/inspect-symbol.d.ts +27 -0
  49. package/dist/tools/inspect-symbol.d.ts.map +1 -0
  50. package/dist/tools/inspect-symbol.js +259 -0
  51. package/dist/tools/inspect-symbol.js.map +1 -0
  52. package/dist/tools/validation.d.ts +49 -0
  53. package/dist/tools/validation.d.ts.map +1 -0
  54. package/dist/tools/validation.js +125 -0
  55. package/dist/tools/validation.js.map +1 -0
  56. package/dist/types/index.d.ts +13 -0
  57. package/dist/types/index.d.ts.map +1 -1
  58. package/dist/ui/components/App.d.ts +3 -0
  59. package/dist/ui/components/App.d.ts.map +1 -1
  60. package/dist/ui/components/App.js +173 -15
  61. package/dist/ui/components/App.js.map +1 -1
  62. package/dist/ui/components/ContextWindowIndicator.d.ts +8 -0
  63. package/dist/ui/components/ContextWindowIndicator.d.ts.map +1 -0
  64. package/dist/ui/components/ContextWindowIndicator.js +34 -0
  65. package/dist/ui/components/ContextWindowIndicator.js.map +1 -0
  66. package/dist/ui/components/InputBox.d.ts +2 -0
  67. package/dist/ui/components/InputBox.d.ts.map +1 -1
  68. package/dist/ui/components/InputBox.js +6 -2
  69. package/dist/ui/components/InputBox.js.map +1 -1
  70. package/dist/ui/components/MessageDisplay.d.ts.map +1 -1
  71. package/dist/ui/components/MessageDisplay.js +7 -0
  72. package/dist/ui/components/MessageDisplay.js.map +1 -1
  73. package/dist/ui/components/StreamingMessageDisplay.d.ts.map +1 -1
  74. package/dist/ui/components/StreamingMessageDisplay.js +9 -1
  75. package/dist/ui/components/StreamingMessageDisplay.js.map +1 -1
  76. package/dist/ui/components/ThinkingDisplay.d.ts +2 -3
  77. package/dist/ui/components/ThinkingDisplay.d.ts.map +1 -1
  78. package/dist/ui/components/ThinkingDisplay.js +19 -19
  79. package/dist/ui/components/ThinkingDisplay.js.map +1 -1
  80. package/dist/utils/markdown-parser.d.ts +4 -0
  81. package/dist/utils/markdown-parser.d.ts.map +1 -1
  82. package/dist/utils/markdown-parser.js +15 -1
  83. package/dist/utils/markdown-parser.js.map +1 -1
  84. package/models-config.json +77 -0
  85. package/package.json +3 -1
  86. package/AUTH_FLOW.md +0 -138
  87. package/CONFIG_GUIDE.md +0 -249
  88. package/README.md +0 -501
package/CONFIG_GUIDE.md DELETED
@@ -1,249 +0,0 @@
1
- # Centaurus CLI Configuration Guide
2
-
3
- ## Overview
4
-
5
- The Centaurus CLI stores configuration in two places:
6
- 1. **Environment variables** (`.env` file) - Backend API URL (required)
7
- 2. **User config file** (`~/.centaurus/config.json`) - Model preferences and settings
8
-
9
- **Important:** API keys are no longer stored in the CLI. All AI model access is managed by the backend service for security and centralized control.
10
-
11
- ## Initial Setup
12
-
13
- ### 1. Backend API Configuration (Required)
14
-
15
- Create or update `.env` file in the CLI directory:
16
-
17
- ```env
18
- BACKEND_API_URL=http://localhost:3000/api
19
- ```
20
-
21
- For production, update to your backend URL:
22
- ```env
23
- BACKEND_API_URL=https://api.yourapp.com/api
24
- ```
25
-
26
- **Important:** The backend URL is required for all AI features. The CLI cannot function without a connection to the backend service.
27
-
28
- ### 2. Authentication (Required)
29
-
30
- When you first run the CLI, you'll be prompted to sign in with Google:
31
-
32
- 1. Start Centaurus: `centaurus`
33
- 2. Choose "Yes" when prompted to sign in
34
- 3. Complete the authentication flow in your browser
35
- 4. Return to the CLI and start chatting!
36
-
37
- **Why Authentication?**
38
- - Secures access to AI models
39
- - Enables conversation history sync
40
- - Prevents unauthorized usage
41
- - No local API key management needed
42
-
43
- ## Configuration Commands
44
-
45
- ### View Current Configuration
46
-
47
- ```bash
48
- /config
49
- ```
50
-
51
- Shows:
52
- - Current model
53
- - Theme settings
54
- - Auto-accept preferences
55
- - Plan mode status
56
-
57
- ### Change Model
58
-
59
- ```bash
60
- /model
61
- ```
62
-
63
- Opens a picker to select from available Google Gemini models:
64
- - **gemini-2.5-flash** - Fast and efficient (recommended)
65
- - **gemini-2.5-pro** - Most capable, slower
66
- - **gemini-2.0-flash-exp** - Experimental features
67
- - **gemini-1.5-pro** - Previous generation, high quality
68
- - **gemini-1.5-flash** - Previous generation, fast
69
-
70
- Or set directly:
71
- ```bash
72
- /model gemini-2.5-flash
73
- ```
74
-
75
- Your model preference is saved and persists across sessions.
76
-
77
- ## Authentication
78
-
79
- ### Sign In (Required)
80
-
81
- Authentication is required to use Centaurus CLI. When you first run the CLI, you'll be prompted to sign in with Google:
82
-
83
- **What You Get:**
84
- - ✅ Secure access to AI models
85
- - ✅ Conversation history across devices
86
- - ✅ Settings synchronization
87
- - ✅ Web search capabilities
88
- - ✅ No local API key management
89
-
90
- ### Sign Out
91
-
92
- ```bash
93
- /logout
94
- ```
95
-
96
- Clears your session and exits the CLI. You'll need to sign in again the next time you start the CLI.
97
-
98
- ## Configuration File Location
99
-
100
- Your configuration is stored at:
101
- - **Windows**: `C:\Users\YourName\.centaurus\config.json`
102
- - **macOS/Linux**: `~/.centaurus/config.json`
103
-
104
- ### Config File Structure
105
-
106
- ```json
107
- {
108
- "model": "gemini-2.5-flash",
109
- "theme": "default",
110
- "autoAccept": false,
111
- "planMode": false
112
- }
113
- ```
114
-
115
- **Note:** API keys are no longer stored in the CLI configuration. They are managed by the backend service.
116
-
117
- ## Web Search
118
-
119
- Web search is handled by the backend and requires:
120
- 1. Authentication (sign in with Google)
121
- 2. Backend server running with Serper API key configured
122
-
123
- **No client-side configuration needed!**
124
-
125
- The backend administrator manages the Serper API key server-side.
126
-
127
- ## Troubleshooting
128
-
129
- ### "Authentication required"
130
-
131
- All AI features require authentication. To sign in:
132
- 1. Restart the CLI
133
- 2. Choose "Yes" when prompted to sign in
134
- 3. Complete the Google OAuth flow in your browser
135
- 4. Return to the CLI
136
-
137
- ### "Backend API is not reachable"
138
-
139
- This error means the CLI cannot connect to the backend service.
140
-
141
- **Check your `.env` file:**
142
- ```env
143
- BACKEND_API_URL=http://localhost:3000/api
144
- ```
145
-
146
- **Verify backend is running:**
147
- ```bash
148
- cd backend
149
- npm start
150
- ```
151
-
152
- **Common causes:**
153
- - Backend service is not running
154
- - Incorrect backend URL in `.env`
155
- - Network connectivity issues
156
- - Firewall blocking the connection
157
- - Backend is deployed but not accessible from your network
158
-
159
- **For production deployments:**
160
- Ensure the backend URL points to your deployed backend:
161
- ```env
162
- BACKEND_API_URL=https://api.yourapp.com/api
163
- ```
164
-
165
- ### "Rate limit exceeded"
166
-
167
- The backend has exhausted its API quota with Google. This is managed by the backend administrator.
168
-
169
- **What to do:**
170
- - Wait a few moments and try again
171
- - Contact your backend administrator if the issue persists
172
- - The backend may need additional API keys configured for rotation
173
-
174
- ### "Invalid model"
175
-
176
- The model you selected is not supported by the backend.
177
-
178
- **Solution:**
179
- ```bash
180
- /model
181
- ```
182
-
183
- Select a valid Google Gemini model from the list.
184
-
185
- ### Reset Configuration
186
-
187
- To start fresh, delete the config file:
188
-
189
- **Windows:**
190
- ```cmd
191
- del %USERPROFILE%\.centaurus\config.json
192
- ```
193
-
194
- **macOS/Linux:**
195
- ```bash
196
- rm ~/.centaurus/config.json
197
- ```
198
-
199
- Then restart the CLI. You'll need to sign in again and reconfigure your preferences.
200
-
201
- ## Security Best Practices
202
-
203
- 1. **Never commit `.env` files** - Add to `.gitignore`
204
- 2. **Use environment-specific URLs** - Different URLs for dev/prod
205
- 3. **Sign out on shared machines** - Use `/logout` command
206
- 4. **Keep your session secure** - Don't share authentication tokens
207
- 5. **Backend security** - API keys are managed server-side for enhanced security
208
-
209
- ## Advanced Configuration
210
-
211
- ### Custom Backend URL
212
-
213
- For development or self-hosted backends:
214
-
215
- ```env
216
- BACKEND_API_URL=http://localhost:3000/api
217
- ```
218
-
219
- For production:
220
-
221
- ```env
222
- BACKEND_API_URL=https://api.centaurus.app/api
223
- ```
224
-
225
- **Backend Requirements:**
226
- - Must be configured with Google API keys (managed by backend admin)
227
- - Must support the `/api/ai/chat` endpoint for streaming
228
- - Must handle authentication and session management
229
- - Should implement API key rotation for rate limit handling
230
-
231
- ## Getting Help
232
-
233
- ```bash
234
- /help
235
- ```
236
-
237
- Shows all available commands and their usage.
238
-
239
- ## Next Steps
240
-
241
- 1. Ensure backend is running and accessible
242
- 2. Configure backend URL in `.env`
243
- 3. Sign in with Google (required)
244
- 4. Choose your preferred model
245
- 5. Start chatting with the AI!
246
-
247
- For more information, see:
248
- - [README.md](./README.md) - General CLI documentation
249
- - [MIGRATION.md](./MIGRATION.md) - Upgrading from previous versions