sphereai-cli 1.0.16 → 1.0.18
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/.sphereignore +46 -0
- package/README.md +282 -258
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +71 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/language.d.ts +3 -0
- package/dist/commands/language.d.ts.map +1 -0
- package/dist/commands/language.js +55 -0
- package/dist/commands/language.js.map +1 -0
- package/dist/i18n/index.d.ts +11 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +26 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/translations/en.d.ts +93 -0
- package/dist/i18n/translations/en.d.ts.map +1 -0
- package/dist/i18n/translations/en.js +105 -0
- package/dist/i18n/translations/en.js.map +1 -0
- package/dist/i18n/translations/pt.d.ts +93 -0
- package/dist/i18n/translations/pt.d.ts.map +1 -0
- package/dist/i18n/translations/pt.js +105 -0
- package/dist/i18n/translations/pt.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/services/api-client.d.ts.map +1 -1
- package/dist/services/api-client.js +4 -1
- package/dist/services/api-client.js.map +1 -1
- package/package.json +3 -2
package/.sphereignore
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# .sphereignore - Files and directories to exclude from tracking
|
|
2
|
+
# Similar to .gitignore syntax
|
|
3
|
+
|
|
4
|
+
# Dependencies
|
|
5
|
+
node_modules/
|
|
6
|
+
bower_components/
|
|
7
|
+
|
|
8
|
+
# Build outputs
|
|
9
|
+
dist/
|
|
10
|
+
build/
|
|
11
|
+
out/
|
|
12
|
+
*.js.map
|
|
13
|
+
|
|
14
|
+
# Environment variables
|
|
15
|
+
.env
|
|
16
|
+
.env.*
|
|
17
|
+
|
|
18
|
+
# Logs
|
|
19
|
+
*.log
|
|
20
|
+
logs/
|
|
21
|
+
npm-debug.log*
|
|
22
|
+
|
|
23
|
+
# IDE / Editor
|
|
24
|
+
.vscode/
|
|
25
|
+
.idea/
|
|
26
|
+
*.swp
|
|
27
|
+
*.swo
|
|
28
|
+
*~
|
|
29
|
+
|
|
30
|
+
# OS files
|
|
31
|
+
.DS_Store
|
|
32
|
+
Thumbs.db
|
|
33
|
+
Desktop.ini
|
|
34
|
+
|
|
35
|
+
# Testing
|
|
36
|
+
coverage/
|
|
37
|
+
.nyc_output/
|
|
38
|
+
|
|
39
|
+
# Temporary files
|
|
40
|
+
*.tmp
|
|
41
|
+
*.temp
|
|
42
|
+
.cache/
|
|
43
|
+
|
|
44
|
+
# Git
|
|
45
|
+
.git/
|
|
46
|
+
.gitignore
|
package/README.md
CHANGED
|
@@ -1,258 +1,282 @@
|
|
|
1
|
-
# SphereAI CLI
|
|
2
|
-
|
|
3
|
-
Official command-line interface for interacting with SphereAI services.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install -g sphereai-cli
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Quick Start
|
|
12
|
-
|
|
13
|
-
### 1. Authenticate
|
|
14
|
-
|
|
15
|
-
Login using your UserChannelKey (provided by your administrator):
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
sphereai auth login YOUR_USER_CHANNEL_KEY
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### 2. Verify Authentication
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
sphereai auth whoami
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### 3. Start Using
|
|
28
|
-
|
|
29
|
-
You're ready to use SphereAI CLI commands.
|
|
30
|
-
|
|
31
|
-
## Commands
|
|
32
|
-
|
|
33
|
-
###
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
|
38
|
-
|
|
39
|
-
| `sphereai
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
|
63
|
-
|
|
64
|
-
| `sphereai
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
| `sphereai
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
sphereai files
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
sphereai files
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
sphereai files
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
#
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
#
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
##
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
1
|
+
# SphereAI CLI
|
|
2
|
+
|
|
3
|
+
Official command-line interface for interacting with SphereAI services.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g sphereai-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
### 1. Authenticate
|
|
14
|
+
|
|
15
|
+
Login using your UserChannelKey (provided by your administrator):
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
sphereai auth login YOUR_USER_CHANNEL_KEY
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### 2. Verify Authentication
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
sphereai auth whoami
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 3. Start Using
|
|
28
|
+
|
|
29
|
+
You're ready to use SphereAI CLI commands.
|
|
30
|
+
|
|
31
|
+
## Commands
|
|
32
|
+
|
|
33
|
+
### Initialization
|
|
34
|
+
|
|
35
|
+
Initialize SphereAI in your project directory.
|
|
36
|
+
|
|
37
|
+
| Command | Description |
|
|
38
|
+
|---------|-------------|
|
|
39
|
+
| `sphereai init` | Create a default .sphereignore file |
|
|
40
|
+
|
|
41
|
+
**Options:**
|
|
42
|
+
|
|
43
|
+
| Option | Description |
|
|
44
|
+
|--------|-------------|
|
|
45
|
+
| `-f, --force` | Overwrite existing .sphereignore file |
|
|
46
|
+
|
|
47
|
+
**Examples:**
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Initialize with default .sphereignore
|
|
51
|
+
sphereai init
|
|
52
|
+
|
|
53
|
+
# Overwrite existing .sphereignore
|
|
54
|
+
sphereai init --force
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Authentication
|
|
58
|
+
|
|
59
|
+
| Command | Description |
|
|
60
|
+
|---------|-------------|
|
|
61
|
+
| `sphereai auth login <key>` | Authenticate with your UserChannelKey |
|
|
62
|
+
| `sphereai auth logout` | Sign out and clear stored credentials |
|
|
63
|
+
| `sphereai auth whoami` | Display your current user information |
|
|
64
|
+
| `sphereai auth config` | Display current configuration |
|
|
65
|
+
|
|
66
|
+
**Examples:**
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Login
|
|
70
|
+
sphereai auth login YOUR_USER_CHANNEL_KEY
|
|
71
|
+
|
|
72
|
+
# Check who you are logged in as
|
|
73
|
+
sphereai auth whoami
|
|
74
|
+
|
|
75
|
+
# View as JSON
|
|
76
|
+
sphereai auth whoami --output json
|
|
77
|
+
|
|
78
|
+
# Logout
|
|
79
|
+
sphereai auth logout
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Prompts
|
|
83
|
+
|
|
84
|
+
List and view available AI prompts.
|
|
85
|
+
|
|
86
|
+
| Command | Description |
|
|
87
|
+
|---------|-------------|
|
|
88
|
+
| `sphereai prompts list` | List all available prompts |
|
|
89
|
+
| `sphereai prompts get <id>` | Get details of a specific prompt by ID |
|
|
90
|
+
|
|
91
|
+
**Examples:**
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# List all prompts
|
|
95
|
+
sphereai prompts list
|
|
96
|
+
|
|
97
|
+
# List prompts in JSON format
|
|
98
|
+
sphereai prompts list --output json
|
|
99
|
+
|
|
100
|
+
# Get details of a specific prompt
|
|
101
|
+
sphereai prompts get 123
|
|
102
|
+
|
|
103
|
+
# Get prompt details in JSON format
|
|
104
|
+
sphereai prompts get 123 --output json
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### File Management
|
|
108
|
+
|
|
109
|
+
Track files for AI processing. Works similar to git staging.
|
|
110
|
+
|
|
111
|
+
| Command | Description |
|
|
112
|
+
|---------|-------------|
|
|
113
|
+
| `sphereai files add [path]` | Add files to tracking |
|
|
114
|
+
| `sphereai files list` | List all tracked files |
|
|
115
|
+
| `sphereai files remove <path>` | Remove a file from tracking |
|
|
116
|
+
| `sphereai files clear --force` | Clear all tracked files |
|
|
117
|
+
| `sphereai files status` | Show status of tracked files |
|
|
118
|
+
| `sphereai files ignore` | Show current ignore patterns |
|
|
119
|
+
|
|
120
|
+
### AI Command Execution
|
|
121
|
+
|
|
122
|
+
Execute AI commands with your tracked files.
|
|
123
|
+
|
|
124
|
+
| Command | Description |
|
|
125
|
+
|---------|-------------|
|
|
126
|
+
| `sphereai execute -p <id>` | Execute AI command with tracked files |
|
|
127
|
+
|
|
128
|
+
**File Management Examples:**
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Add all files from current directory
|
|
132
|
+
sphereai files add .
|
|
133
|
+
|
|
134
|
+
# Add a specific file
|
|
135
|
+
sphereai files add myfile.txt
|
|
136
|
+
|
|
137
|
+
# Add files from a directory
|
|
138
|
+
sphereai files add src/
|
|
139
|
+
|
|
140
|
+
# List tracked files
|
|
141
|
+
sphereai files list
|
|
142
|
+
|
|
143
|
+
# List with details (size, date)
|
|
144
|
+
sphereai files list --verbose
|
|
145
|
+
|
|
146
|
+
# Check status
|
|
147
|
+
sphereai files status
|
|
148
|
+
|
|
149
|
+
# Remove a file from tracking
|
|
150
|
+
sphereai files remove myfile.txt
|
|
151
|
+
|
|
152
|
+
# Clear all tracked files
|
|
153
|
+
sphereai files clear --force
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Execution Examples:**
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Execute AI command with tracked files
|
|
160
|
+
sphereai execute --prompt-id 123
|
|
161
|
+
|
|
162
|
+
# Execute with JSON output
|
|
163
|
+
sphereai execute --prompt-id 123 --output json
|
|
164
|
+
|
|
165
|
+
# Save detailed response to a specific directory
|
|
166
|
+
sphereai execute --prompt-id 123 --save-dir ./responses
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
#### Complete Workflow Example
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# 1. Login
|
|
173
|
+
sphereai auth login YOUR_USER_CHANNEL_KEY
|
|
174
|
+
|
|
175
|
+
# 2. List available prompts to find the one you need
|
|
176
|
+
sphereai prompts list
|
|
177
|
+
|
|
178
|
+
# 3. Get details of a specific prompt
|
|
179
|
+
sphereai prompts get 123
|
|
180
|
+
|
|
181
|
+
# 4. Add files to track
|
|
182
|
+
sphereai files add .
|
|
183
|
+
|
|
184
|
+
# 5. Check what files are tracked
|
|
185
|
+
sphereai files list
|
|
186
|
+
|
|
187
|
+
# 6. Execute AI command with tracked files
|
|
188
|
+
sphereai execute --prompt-id 123
|
|
189
|
+
|
|
190
|
+
# 7. The detailed response is automatically saved to a markdown file
|
|
191
|
+
# 8. Clear tracked files when done
|
|
192
|
+
sphereai files clear --force
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### .sphereignore File
|
|
196
|
+
|
|
197
|
+
Create a `.sphereignore` file in your project root to exclude files from tracking. It works like `.gitignore`.
|
|
198
|
+
|
|
199
|
+
**Example `.sphereignore`:**
|
|
200
|
+
|
|
201
|
+
```gitignore
|
|
202
|
+
# Dependencies
|
|
203
|
+
node_modules/
|
|
204
|
+
|
|
205
|
+
# Build outputs
|
|
206
|
+
dist/
|
|
207
|
+
build/
|
|
208
|
+
|
|
209
|
+
# Environment files
|
|
210
|
+
.env
|
|
211
|
+
.env.*
|
|
212
|
+
|
|
213
|
+
# Logs
|
|
214
|
+
*.log
|
|
215
|
+
|
|
216
|
+
# IDE files
|
|
217
|
+
.vscode/
|
|
218
|
+
.idea/
|
|
219
|
+
|
|
220
|
+
# OS files
|
|
221
|
+
.DS_Store
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
If no `.sphereignore` file exists, common patterns are ignored by default (node_modules, .git, dist, build, .env, etc.).
|
|
225
|
+
|
|
226
|
+
## Output Formats
|
|
227
|
+
|
|
228
|
+
All commands support two output formats:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# Table format (default) - human readable
|
|
232
|
+
sphereai auth whoami
|
|
233
|
+
|
|
234
|
+
# JSON format - for scripting
|
|
235
|
+
sphereai auth whoami --output json
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## Global Options
|
|
239
|
+
|
|
240
|
+
| Option | Description |
|
|
241
|
+
|--------|-------------|
|
|
242
|
+
| `--output <format>` | Output format: `table` (default) or `json` |
|
|
243
|
+
| `--help` | Show help for any command |
|
|
244
|
+
| `--version` | Show CLI version |
|
|
245
|
+
|
|
246
|
+
## Configuration
|
|
247
|
+
|
|
248
|
+
Your credentials are stored securely in your user configuration directory. Use `sphereai auth config` to view the current configuration.
|
|
249
|
+
|
|
250
|
+
## Troubleshooting
|
|
251
|
+
|
|
252
|
+
### Token Expired
|
|
253
|
+
|
|
254
|
+
Re-authenticate with your UserChannelKey:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
sphereai auth login YOUR_USER_CHANNEL_KEY
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Clear All Data
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
sphereai auth logout
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Check Your Configuration
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
sphereai auth config
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## Requirements
|
|
273
|
+
|
|
274
|
+
- Node.js 14.0.0 or higher
|
|
275
|
+
|
|
276
|
+
## Support
|
|
277
|
+
|
|
278
|
+
For issues and questions, please contact your SphereAI administrator.
|
|
279
|
+
|
|
280
|
+
## License
|
|
281
|
+
|
|
282
|
+
ISC
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBpC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAuB1D"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.registerInitCommand = registerInitCommand;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const formatters_1 = require("../utils/formatters");
|
|
40
|
+
function getDefaultSphereIgnoreContent() {
|
|
41
|
+
// Read from the template file bundled with the package
|
|
42
|
+
const templatePath = path.join(__dirname, '..', '..', '.sphereignore');
|
|
43
|
+
if (fs.existsSync(templatePath)) {
|
|
44
|
+
return fs.readFileSync(templatePath, 'utf-8');
|
|
45
|
+
}
|
|
46
|
+
throw new Error('Default .sphereignore template not found');
|
|
47
|
+
}
|
|
48
|
+
function registerInitCommand(program) {
|
|
49
|
+
program
|
|
50
|
+
.command('init')
|
|
51
|
+
.description('Initialize SphereAI in the current directory')
|
|
52
|
+
.option('-f, --force', 'Overwrite existing .sphereignore file')
|
|
53
|
+
.action((options) => {
|
|
54
|
+
const sphereignorePath = path.join(process.cwd(), '.sphereignore');
|
|
55
|
+
if (fs.existsSync(sphereignorePath) && !options.force) {
|
|
56
|
+
(0, formatters_1.warning)('.sphereignore already exists. Use --force to overwrite.');
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
const content = getDefaultSphereIgnoreContent();
|
|
61
|
+
fs.writeFileSync(sphereignorePath, content, 'utf-8');
|
|
62
|
+
(0, formatters_1.success)('Created .sphereignore file');
|
|
63
|
+
(0, formatters_1.info)('You can now customize the ignore patterns for your project.');
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
(0, formatters_1.error)('Failed to create .sphereignore file: ' + err.message);
|
|
67
|
+
process.exit(1);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;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CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../src/commands/language.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgD9D"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerLanguageCommand = registerLanguageCommand;
|
|
4
|
+
const config_service_1 = require("../services/config-service");
|
|
5
|
+
const formatters_1 = require("../utils/formatters");
|
|
6
|
+
const i18n_1 = require("../i18n");
|
|
7
|
+
const AVAILABLE_LANGUAGES = [
|
|
8
|
+
{ code: 'en', name: 'English' },
|
|
9
|
+
{ code: 'pt', name: 'Portuguese' },
|
|
10
|
+
];
|
|
11
|
+
function registerLanguageCommand(program) {
|
|
12
|
+
const language = program
|
|
13
|
+
.command('language')
|
|
14
|
+
.alias('lang')
|
|
15
|
+
.description('Manage CLI language settings');
|
|
16
|
+
language
|
|
17
|
+
.command('set <lang>')
|
|
18
|
+
.description('Set the CLI language (en, pt)')
|
|
19
|
+
.action((lang) => {
|
|
20
|
+
const normalizedLang = lang.toLowerCase();
|
|
21
|
+
if (normalizedLang !== 'en' && normalizedLang !== 'pt') {
|
|
22
|
+
console.error(i18n_1.i18n.t.language.invalid);
|
|
23
|
+
console.log('\n' + i18n_1.i18n.t.language.available);
|
|
24
|
+
AVAILABLE_LANGUAGES.forEach(({ code, name }) => {
|
|
25
|
+
console.log(` ${code} - ${name}`);
|
|
26
|
+
});
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
config_service_1.configService.setLanguage(normalizedLang);
|
|
30
|
+
(0, formatters_1.success)(i18n_1.i18n.format(i18n_1.i18n.t.language.changed, { language: normalizedLang }));
|
|
31
|
+
});
|
|
32
|
+
language
|
|
33
|
+
.command('get')
|
|
34
|
+
.description('Show current language setting')
|
|
35
|
+
.action(() => {
|
|
36
|
+
const currentLang = config_service_1.configService.getLanguage();
|
|
37
|
+
const langInfo = AVAILABLE_LANGUAGES.find(l => l.code === currentLang);
|
|
38
|
+
(0, formatters_1.info)(i18n_1.i18n.format(i18n_1.i18n.t.language.current, {
|
|
39
|
+
language: `${currentLang} (${langInfo?.name || currentLang})`
|
|
40
|
+
}));
|
|
41
|
+
});
|
|
42
|
+
language
|
|
43
|
+
.command('list')
|
|
44
|
+
.alias('ls')
|
|
45
|
+
.description('List available languages')
|
|
46
|
+
.action(() => {
|
|
47
|
+
const currentLang = config_service_1.configService.getLanguage();
|
|
48
|
+
console.log(i18n_1.i18n.t.language.available);
|
|
49
|
+
AVAILABLE_LANGUAGES.forEach(({ code, name }) => {
|
|
50
|
+
const marker = code === currentLang ? ' (current)' : '';
|
|
51
|
+
console.log(` ${code} - ${name}${marker}`);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=language.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language.js","sourceRoot":"","sources":["../../src/commands/language.ts"],"names":[],"mappings":";;AAUA,0DAgDC;AAzDD,+DAAqE;AACrE,oDAAoD;AACpD,kCAA+B;AAE/B,MAAM,mBAAmB,GAAuC;IAC9D,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;IAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE;CACnC,CAAC;AAEF,SAAgB,uBAAuB,CAAC,OAAgB;IACtD,MAAM,QAAQ,GAAG,OAAO;SACrB,OAAO,CAAC,UAAU,CAAC;SACnB,KAAK,CAAC,MAAM,CAAC;SACb,WAAW,CAAC,8BAA8B,CAAC,CAAC;IAE/C,QAAQ;SACL,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AO,EAAE;YACxC,QAAQ,EAAE,GAAG,WAAW,KAAK,QAAQ,EAAE,IAAI,IAAI,WAAW,GAAG;SAC9D,CAAC,CAAC,CAAC;IACN,CAAC,CAAC,CAAC;IAEL,QAAQ;SACL,OAAO,CAAC,MAAM,CAAC;SACf,KAAK,CAAC,IAAI,CAAC;SACX,WAAW,CAAC,0BAA0B,CAAC;SACvC,MAAM,CAAC,GAAG,EAAE;QACX,MAAM,WAAW,GAAG,8BAAa,CAAC,WAAW,EAAE,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,WAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACvC,mBAAmB,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE;YAC7C,MAAM,MAAM,GAAG,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;YACxD,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Language } from '../services/config-service';
|
|
2
|
+
import { en } from './translations/en';
|
|
3
|
+
type TranslationKeys = typeof en;
|
|
4
|
+
declare class I18nService {
|
|
5
|
+
private getCurrentTranslations;
|
|
6
|
+
get t(): TranslationKeys;
|
|
7
|
+
format(template: string, params: Record<string, string | number>): string;
|
|
8
|
+
}
|
|
9
|
+
export declare const i18n: I18nService;
|
|
10
|
+
export { Language };
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAGvC,KAAK,eAAe,GAAG,OAAO,EAAE,CAAC;AAOjC,cAAM,WAAW;IACf,OAAO,CAAC,sBAAsB;IAK9B,IAAI,CAAC,IAAI,eAAe,CAEvB;IAED,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM;CAK1E;AAED,eAAO,MAAM,IAAI,aAAoB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.i18n = void 0;
|
|
4
|
+
const config_service_1 = require("../services/config-service");
|
|
5
|
+
const en_1 = require("./translations/en");
|
|
6
|
+
const pt_1 = require("./translations/pt");
|
|
7
|
+
const translations = {
|
|
8
|
+
en: en_1.en,
|
|
9
|
+
pt: pt_1.pt,
|
|
10
|
+
};
|
|
11
|
+
class I18nService {
|
|
12
|
+
getCurrentTranslations() {
|
|
13
|
+
const language = config_service_1.configService.getLanguage();
|
|
14
|
+
return translations[language] || translations.en;
|
|
15
|
+
}
|
|
16
|
+
get t() {
|
|
17
|
+
return this.getCurrentTranslations();
|
|
18
|
+
}
|
|
19
|
+
format(template, params) {
|
|
20
|
+
return template.replace(/{(\w+)}/g, (_, key) => {
|
|
21
|
+
return params[key]?.toString() ?? `{${key}}`;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.i18n = new I18nService();
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":";;;AAAA,+DAAqE;AACrE,0CAAuC;AACvC,0CAAuC;AAIvC,MAAM,YAAY,GAAsC;IACtD,EAAE,EAAF,OAAE;IACF,EAAE,EAAF,OAAE;CACH,CAAC;AAEF,MAAM,WAAW;IACP,sBAAsB;QAC5B,MAAM,QAAQ,GAAG,8BAAa,CAAC,WAAW,EAAE,CAAC;QAC7C,OAAO,YAAY,CAAC,QAAQ,CAAC,IAAI,YAAY,CAAC,EAAE,CAAC;IACnD,CAAC;IAED,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,sBAAsB,EAAE,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,QAAgB,EAAE,MAAuC;QAC9D,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;YAC7C,OAAO,MAAM,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,IAAI,GAAG,GAAG,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAEY,QAAA,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export declare const en: {
|
|
2
|
+
notAuthenticated: string;
|
|
3
|
+
operationCancelled: string;
|
|
4
|
+
auth: {
|
|
5
|
+
loginSuccess: string;
|
|
6
|
+
loginFailed: string;
|
|
7
|
+
logoutSuccess: string;
|
|
8
|
+
tokenSet: string;
|
|
9
|
+
tokenRequired: string;
|
|
10
|
+
keyRequired: string;
|
|
11
|
+
invalidKey: string;
|
|
12
|
+
currentUser: string;
|
|
13
|
+
notLoggedIn: string;
|
|
14
|
+
configPath: string;
|
|
15
|
+
currentConfig: string;
|
|
16
|
+
};
|
|
17
|
+
prompts: {
|
|
18
|
+
fetchingPrompts: string;
|
|
19
|
+
fetchingPrompt: string;
|
|
20
|
+
noPromptsFound: string;
|
|
21
|
+
promptNotFound: string;
|
|
22
|
+
pagination: string;
|
|
23
|
+
};
|
|
24
|
+
files: {
|
|
25
|
+
addingFiles: string;
|
|
26
|
+
filesAdded: string;
|
|
27
|
+
noFilesAdded: string;
|
|
28
|
+
fileNotFound: string;
|
|
29
|
+
trackedFiles: string;
|
|
30
|
+
noTrackedFiles: string;
|
|
31
|
+
filesCleared: string;
|
|
32
|
+
fileRemoved: string;
|
|
33
|
+
fileNotTracked: string;
|
|
34
|
+
confirmClear: string;
|
|
35
|
+
status: string;
|
|
36
|
+
exists: string;
|
|
37
|
+
missing: string;
|
|
38
|
+
ignored: string;
|
|
39
|
+
ignoredFiles: string;
|
|
40
|
+
};
|
|
41
|
+
execute: {
|
|
42
|
+
executing: string;
|
|
43
|
+
noPromptId: string;
|
|
44
|
+
noFilesTracked: string;
|
|
45
|
+
executionComplete: string;
|
|
46
|
+
executionFailed: string;
|
|
47
|
+
};
|
|
48
|
+
debug: {
|
|
49
|
+
enabled: string;
|
|
50
|
+
disabled: string;
|
|
51
|
+
status: string;
|
|
52
|
+
on: string;
|
|
53
|
+
off: string;
|
|
54
|
+
};
|
|
55
|
+
language: {
|
|
56
|
+
current: string;
|
|
57
|
+
changed: string;
|
|
58
|
+
invalid: string;
|
|
59
|
+
available: string;
|
|
60
|
+
english: string;
|
|
61
|
+
portuguese: string;
|
|
62
|
+
};
|
|
63
|
+
errors: {
|
|
64
|
+
unknown: string;
|
|
65
|
+
network: string;
|
|
66
|
+
unauthorized: string;
|
|
67
|
+
forbidden: string;
|
|
68
|
+
notFound: string;
|
|
69
|
+
serverError: string;
|
|
70
|
+
timeout: string;
|
|
71
|
+
};
|
|
72
|
+
table: {
|
|
73
|
+
field: string;
|
|
74
|
+
value: string;
|
|
75
|
+
id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
email: string;
|
|
78
|
+
role: string;
|
|
79
|
+
customerId: string;
|
|
80
|
+
customerName: string;
|
|
81
|
+
active: string;
|
|
82
|
+
createdAt: string;
|
|
83
|
+
updatedAt: string;
|
|
84
|
+
path: string;
|
|
85
|
+
size: string;
|
|
86
|
+
addedAt: string;
|
|
87
|
+
temperature: string;
|
|
88
|
+
shortDescription: string;
|
|
89
|
+
yes: string;
|
|
90
|
+
no: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=en.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/i18n/translations/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Gd,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.en = void 0;
|
|
4
|
+
exports.en = {
|
|
5
|
+
// General
|
|
6
|
+
notAuthenticated: 'Not authenticated. Please run: sphereai auth login <key>',
|
|
7
|
+
operationCancelled: 'Operation cancelled',
|
|
8
|
+
// Auth commands
|
|
9
|
+
auth: {
|
|
10
|
+
loginSuccess: 'Successfully authenticated!',
|
|
11
|
+
loginFailed: 'Authentication failed',
|
|
12
|
+
logoutSuccess: 'Successfully logged out',
|
|
13
|
+
tokenSet: 'Token set successfully',
|
|
14
|
+
tokenRequired: 'Token is required',
|
|
15
|
+
keyRequired: 'UserChannelKey is required',
|
|
16
|
+
invalidKey: 'Invalid UserChannelKey',
|
|
17
|
+
currentUser: 'Current user:',
|
|
18
|
+
notLoggedIn: 'Not logged in',
|
|
19
|
+
configPath: 'Configuration file:',
|
|
20
|
+
currentConfig: 'Current configuration:',
|
|
21
|
+
},
|
|
22
|
+
// Prompts commands
|
|
23
|
+
prompts: {
|
|
24
|
+
fetchingPrompts: 'Fetching prompts...',
|
|
25
|
+
fetchingPrompt: 'Fetching prompt details...',
|
|
26
|
+
noPromptsFound: 'No prompts found',
|
|
27
|
+
promptNotFound: 'Prompt not found',
|
|
28
|
+
pagination: 'Page {page} of {totalPages} (Total: {total} prompts)',
|
|
29
|
+
},
|
|
30
|
+
// Files commands
|
|
31
|
+
files: {
|
|
32
|
+
addingFiles: 'Adding files...',
|
|
33
|
+
filesAdded: '{count} file(s) added to tracking',
|
|
34
|
+
noFilesAdded: 'No files were added',
|
|
35
|
+
fileNotFound: 'File not found: {path}',
|
|
36
|
+
trackedFiles: 'Tracked files:',
|
|
37
|
+
noTrackedFiles: 'No files are being tracked',
|
|
38
|
+
filesCleared: 'All tracked files cleared',
|
|
39
|
+
fileRemoved: 'Removed {path} from tracking',
|
|
40
|
+
fileNotTracked: 'File is not being tracked: {path}',
|
|
41
|
+
confirmClear: 'Are you sure you want to clear all tracked files?',
|
|
42
|
+
status: 'Status',
|
|
43
|
+
exists: 'Exists',
|
|
44
|
+
missing: 'Missing',
|
|
45
|
+
ignored: 'Ignored',
|
|
46
|
+
ignoredFiles: 'Currently ignored patterns:',
|
|
47
|
+
},
|
|
48
|
+
// Execute commands
|
|
49
|
+
execute: {
|
|
50
|
+
executing: 'Executing command...',
|
|
51
|
+
noPromptId: 'Prompt ID is required',
|
|
52
|
+
noFilesTracked: 'No files are being tracked. Use "sphereai files add" first.',
|
|
53
|
+
executionComplete: 'Execution complete',
|
|
54
|
+
executionFailed: 'Execution failed',
|
|
55
|
+
},
|
|
56
|
+
// Debug commands
|
|
57
|
+
debug: {
|
|
58
|
+
enabled: 'Debug mode enabled',
|
|
59
|
+
disabled: 'Debug mode disabled',
|
|
60
|
+
status: 'Debug mode is currently: {status}',
|
|
61
|
+
on: 'ON',
|
|
62
|
+
off: 'OFF',
|
|
63
|
+
},
|
|
64
|
+
// Language commands
|
|
65
|
+
language: {
|
|
66
|
+
current: 'Current language: {language}',
|
|
67
|
+
changed: 'Language changed to: {language}',
|
|
68
|
+
invalid: 'Invalid language. Available options: en, pt',
|
|
69
|
+
available: 'Available languages:',
|
|
70
|
+
english: 'English',
|
|
71
|
+
portuguese: 'Portuguese',
|
|
72
|
+
},
|
|
73
|
+
// Errors
|
|
74
|
+
errors: {
|
|
75
|
+
unknown: 'An unknown error occurred',
|
|
76
|
+
network: 'Network error. Please check your connection.',
|
|
77
|
+
unauthorized: 'Unauthorized. Please login again.',
|
|
78
|
+
forbidden: 'Access forbidden',
|
|
79
|
+
notFound: 'Resource not found',
|
|
80
|
+
serverError: 'Server error. Please try again later.',
|
|
81
|
+
timeout: 'Request timeout. Please try again.',
|
|
82
|
+
},
|
|
83
|
+
// Table headers
|
|
84
|
+
table: {
|
|
85
|
+
field: 'Field',
|
|
86
|
+
value: 'Value',
|
|
87
|
+
id: 'ID',
|
|
88
|
+
name: 'Name',
|
|
89
|
+
email: 'Email',
|
|
90
|
+
role: 'Role',
|
|
91
|
+
customerId: 'Customer ID',
|
|
92
|
+
customerName: 'Customer Name',
|
|
93
|
+
active: 'Active',
|
|
94
|
+
createdAt: 'Created At',
|
|
95
|
+
updatedAt: 'Updated At',
|
|
96
|
+
path: 'Path',
|
|
97
|
+
size: 'Size',
|
|
98
|
+
addedAt: 'Added At',
|
|
99
|
+
temperature: 'Temperature',
|
|
100
|
+
shortDescription: 'Short Description',
|
|
101
|
+
yes: 'Yes',
|
|
102
|
+
no: 'No',
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=en.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.js","sourceRoot":"","sources":["../../../src/i18n/translations/en.ts"],"names":[],"mappings":";;;AAAa,QAAA,EAAE,GAAG;IAChB,UAAU;IACV,gBAAgB,EAAE,0DAA0D;IAC5E,kBAAkB,EAAE,qBAAqB;IAEzC,gBAAgB;IAChB,IAAI,EAAE;QACJ,YAAY,EAAE,6BAA6B;QAC3C,WAAW,EAAE,uBAAuB;QACpC,aAAa,EAAE,yBAAyB;QACxC,QAAQ,EAAE,wBAAwB;QAClC,aAAa,EAAE,mBAAmB;QAClC,WAAW,EAAE,4BAA4B;QACzC,UAAU,EAAE,wBAAwB;QACpC,WAAW,EAAE,eAAe;QAC5B,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,qBAAqB;QACjC,aAA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8C;QACvD,YAAY,EAAE,mCAAmC;QACjD,SAAS,EAAE,kBAAkB;QAC7B,QAAQ,EAAE,oBAAoB;QAC9B,WAAW,EAAE,uCAAuC;QACpD,OAAO,EAAE,oCAAoC;KAC9C;IAED,gBAAgB;IAChB,KAAK,EAAE;QACL,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,OAAO;QACd,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,MAAM;QACZ,UAAU,EAAE,aAAa;QACzB,YAAY,EAAE,eAAe;QAC7B,MAAM,EAAE,QAAQ;QAChB,SAAS,EAAE,YAAY;QACvB,SAAS,EAAE,YAAY;QACvB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,UAAU;QACnB,WAAW,EAAE,aAAa;QAC1B,gBAAgB,EAAE,mBAAmB;QACrC,GAAG,EAAE,KAAK;QACV,EAAE,EAAE,IAAI;KACT;CACF,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export declare const pt: {
|
|
2
|
+
notAuthenticated: string;
|
|
3
|
+
operationCancelled: string;
|
|
4
|
+
auth: {
|
|
5
|
+
loginSuccess: string;
|
|
6
|
+
loginFailed: string;
|
|
7
|
+
logoutSuccess: string;
|
|
8
|
+
tokenSet: string;
|
|
9
|
+
tokenRequired: string;
|
|
10
|
+
keyRequired: string;
|
|
11
|
+
invalidKey: string;
|
|
12
|
+
currentUser: string;
|
|
13
|
+
notLoggedIn: string;
|
|
14
|
+
configPath: string;
|
|
15
|
+
currentConfig: string;
|
|
16
|
+
};
|
|
17
|
+
prompts: {
|
|
18
|
+
fetchingPrompts: string;
|
|
19
|
+
fetchingPrompt: string;
|
|
20
|
+
noPromptsFound: string;
|
|
21
|
+
promptNotFound: string;
|
|
22
|
+
pagination: string;
|
|
23
|
+
};
|
|
24
|
+
files: {
|
|
25
|
+
addingFiles: string;
|
|
26
|
+
filesAdded: string;
|
|
27
|
+
noFilesAdded: string;
|
|
28
|
+
fileNotFound: string;
|
|
29
|
+
trackedFiles: string;
|
|
30
|
+
noTrackedFiles: string;
|
|
31
|
+
filesCleared: string;
|
|
32
|
+
fileRemoved: string;
|
|
33
|
+
fileNotTracked: string;
|
|
34
|
+
confirmClear: string;
|
|
35
|
+
status: string;
|
|
36
|
+
exists: string;
|
|
37
|
+
missing: string;
|
|
38
|
+
ignored: string;
|
|
39
|
+
ignoredFiles: string;
|
|
40
|
+
};
|
|
41
|
+
execute: {
|
|
42
|
+
executing: string;
|
|
43
|
+
noPromptId: string;
|
|
44
|
+
noFilesTracked: string;
|
|
45
|
+
executionComplete: string;
|
|
46
|
+
executionFailed: string;
|
|
47
|
+
};
|
|
48
|
+
debug: {
|
|
49
|
+
enabled: string;
|
|
50
|
+
disabled: string;
|
|
51
|
+
status: string;
|
|
52
|
+
on: string;
|
|
53
|
+
off: string;
|
|
54
|
+
};
|
|
55
|
+
language: {
|
|
56
|
+
current: string;
|
|
57
|
+
changed: string;
|
|
58
|
+
invalid: string;
|
|
59
|
+
available: string;
|
|
60
|
+
english: string;
|
|
61
|
+
portuguese: string;
|
|
62
|
+
};
|
|
63
|
+
errors: {
|
|
64
|
+
unknown: string;
|
|
65
|
+
network: string;
|
|
66
|
+
unauthorized: string;
|
|
67
|
+
forbidden: string;
|
|
68
|
+
notFound: string;
|
|
69
|
+
serverError: string;
|
|
70
|
+
timeout: string;
|
|
71
|
+
};
|
|
72
|
+
table: {
|
|
73
|
+
field: string;
|
|
74
|
+
value: string;
|
|
75
|
+
id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
email: string;
|
|
78
|
+
role: string;
|
|
79
|
+
customerId: string;
|
|
80
|
+
customerName: string;
|
|
81
|
+
active: string;
|
|
82
|
+
createdAt: string;
|
|
83
|
+
updatedAt: string;
|
|
84
|
+
path: string;
|
|
85
|
+
size: string;
|
|
86
|
+
addedAt: string;
|
|
87
|
+
temperature: string;
|
|
88
|
+
shortDescription: string;
|
|
89
|
+
yes: string;
|
|
90
|
+
no: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=pt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pt.d.ts","sourceRoot":"","sources":["../../../src/i18n/translations/pt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Gd,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pt = void 0;
|
|
4
|
+
exports.pt = {
|
|
5
|
+
// General
|
|
6
|
+
notAuthenticated: 'Nao autenticado. Por favor execute: sphereai auth login <key>',
|
|
7
|
+
operationCancelled: 'Operacao cancelada',
|
|
8
|
+
// Auth commands
|
|
9
|
+
auth: {
|
|
10
|
+
loginSuccess: 'Autenticado com sucesso!',
|
|
11
|
+
loginFailed: 'Falha na autenticacao',
|
|
12
|
+
logoutSuccess: 'Logout realizado com sucesso',
|
|
13
|
+
tokenSet: 'Token definido com sucesso',
|
|
14
|
+
tokenRequired: 'Token e obrigatorio',
|
|
15
|
+
keyRequired: 'UserChannelKey e obrigatorio',
|
|
16
|
+
invalidKey: 'UserChannelKey invalido',
|
|
17
|
+
currentUser: 'Usuario atual:',
|
|
18
|
+
notLoggedIn: 'Nao esta logado',
|
|
19
|
+
configPath: 'Arquivo de configuracao:',
|
|
20
|
+
currentConfig: 'Configuracao atual:',
|
|
21
|
+
},
|
|
22
|
+
// Prompts commands
|
|
23
|
+
prompts: {
|
|
24
|
+
fetchingPrompts: 'Buscando prompts...',
|
|
25
|
+
fetchingPrompt: 'Buscando detalhes do prompt...',
|
|
26
|
+
noPromptsFound: 'Nenhum prompt encontrado',
|
|
27
|
+
promptNotFound: 'Prompt nao encontrado',
|
|
28
|
+
pagination: 'Pagina {page} de {totalPages} (Total: {total} prompts)',
|
|
29
|
+
},
|
|
30
|
+
// Files commands
|
|
31
|
+
files: {
|
|
32
|
+
addingFiles: 'Adicionando arquivos...',
|
|
33
|
+
filesAdded: '{count} arquivo(s) adicionado(s) ao rastreamento',
|
|
34
|
+
noFilesAdded: 'Nenhum arquivo foi adicionado',
|
|
35
|
+
fileNotFound: 'Arquivo nao encontrado: {path}',
|
|
36
|
+
trackedFiles: 'Arquivos rastreados:',
|
|
37
|
+
noTrackedFiles: 'Nenhum arquivo esta sendo rastreado',
|
|
38
|
+
filesCleared: 'Todos os arquivos rastreados foram removidos',
|
|
39
|
+
fileRemoved: '{path} removido do rastreamento',
|
|
40
|
+
fileNotTracked: 'Arquivo nao esta sendo rastreado: {path}',
|
|
41
|
+
confirmClear: 'Tem certeza que deseja limpar todos os arquivos rastreados?',
|
|
42
|
+
status: 'Status',
|
|
43
|
+
exists: 'Existe',
|
|
44
|
+
missing: 'Ausente',
|
|
45
|
+
ignored: 'Ignorado',
|
|
46
|
+
ignoredFiles: 'Padroes ignorados atualmente:',
|
|
47
|
+
},
|
|
48
|
+
// Execute commands
|
|
49
|
+
execute: {
|
|
50
|
+
executing: 'Executando comando...',
|
|
51
|
+
noPromptId: 'ID do prompt e obrigatorio',
|
|
52
|
+
noFilesTracked: 'Nenhum arquivo esta sendo rastreado. Use "sphereai files add" primeiro.',
|
|
53
|
+
executionComplete: 'Execucao concluida',
|
|
54
|
+
executionFailed: 'Falha na execucao',
|
|
55
|
+
},
|
|
56
|
+
// Debug commands
|
|
57
|
+
debug: {
|
|
58
|
+
enabled: 'Modo debug ativado',
|
|
59
|
+
disabled: 'Modo debug desativado',
|
|
60
|
+
status: 'Modo debug esta atualmente: {status}',
|
|
61
|
+
on: 'LIGADO',
|
|
62
|
+
off: 'DESLIGADO',
|
|
63
|
+
},
|
|
64
|
+
// Language commands
|
|
65
|
+
language: {
|
|
66
|
+
current: 'Idioma atual: {language}',
|
|
67
|
+
changed: 'Idioma alterado para: {language}',
|
|
68
|
+
invalid: 'Idioma invalido. Opcoes disponiveis: en, pt',
|
|
69
|
+
available: 'Idiomas disponiveis:',
|
|
70
|
+
english: 'Ingles',
|
|
71
|
+
portuguese: 'Portugues',
|
|
72
|
+
},
|
|
73
|
+
// Errors
|
|
74
|
+
errors: {
|
|
75
|
+
unknown: 'Ocorreu um erro desconhecido',
|
|
76
|
+
network: 'Erro de rede. Verifique sua conexao.',
|
|
77
|
+
unauthorized: 'Nao autorizado. Por favor, faca login novamente.',
|
|
78
|
+
forbidden: 'Acesso negado',
|
|
79
|
+
notFound: 'Recurso nao encontrado',
|
|
80
|
+
serverError: 'Erro no servidor. Tente novamente mais tarde.',
|
|
81
|
+
timeout: 'Tempo limite da requisicao. Tente novamente.',
|
|
82
|
+
},
|
|
83
|
+
// Table headers
|
|
84
|
+
table: {
|
|
85
|
+
field: 'Campo',
|
|
86
|
+
value: 'Valor',
|
|
87
|
+
id: 'ID',
|
|
88
|
+
name: 'Nome',
|
|
89
|
+
email: 'Email',
|
|
90
|
+
role: 'Funcao',
|
|
91
|
+
customerId: 'ID do Cliente',
|
|
92
|
+
customerName: 'Nome do Cliente',
|
|
93
|
+
active: 'Ativo',
|
|
94
|
+
createdAt: 'Criado em',
|
|
95
|
+
updatedAt: 'Atualizado em',
|
|
96
|
+
path: 'Caminho',
|
|
97
|
+
size: 'Tamanho',
|
|
98
|
+
addedAt: 'Adicionado em',
|
|
99
|
+
temperature: 'Temperatura',
|
|
100
|
+
shortDescription: 'Descricao Curta',
|
|
101
|
+
yes: 'Sim',
|
|
102
|
+
no: 'Nao',
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=pt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pt.js","sourceRoot":"","sources":["../../../src/i18n/translations/pt.ts"],"names":[],"mappings":";;;AAAa,QAAA,EAA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AAE,oBAAoB;QAC7B,QAAQ,EAAE,uBAAuB;QACjC,MAAM,EAAE,sCAAsC;QAC9C,EAAE,EAAE,QAAQ;QACZ,GAAG,EAAE,WAAW;KACjB;IAED,oBAAoB;IACpB,QAAQ,EAAE;QACR,OAAO,EAAE,0BAA0B;QACnC,OAAO,EAAE,kCAAkC;QAC3C,OAAO,EAAE,6CAA6C;QACtD,SAAS,EAAE,sBAAsB;QACjC,OAAO,EAAE,QAAQ;QACjB,UAAU,EAAE,WAAW;KACxB;IAED,SAAS;IACT,MAAM,EAAE;QACN,OAAO,EAAE,8BAA8B;QACvC,OAAO,EAAE,sCAAsC;QAC/C,YAAY,EAAE,kDAAkD;QAChE,SAAS,EAAE,eAAe;QAC1B,QAAQ,EAAE,wBAAwB;QAClC,WAAW,EAAE,+CAA+C;QAC5D,OAAO,EAAE,8CAA8C;KACxD;IAED,gBAAgB;IAChB,KAAK,EAAE;QACL,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,OAAO;QACd,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,eAAe;QAC3B,YAAY,EAAE,iBAAiB;QAC/B,MAAM,EAAE,OAAO;QACf,SAAS,EAAE,WAAW;QACtB,SAAS,EAAE,eAAe;QAC1B,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,eAAe;QACxB,WAAW,EAAE,aAAa;QAC1B,gBAAgB,EAAE,iBAAiB;QACnC,GAAG,EAAE,KAAK;QACV,EAAE,EAAE,KAAK;KACV;CACF,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,7 @@ const prompts_1 = require("./commands/prompts");
|
|
|
16
16
|
const files_1 = require("./commands/files");
|
|
17
17
|
const execute_1 = require("./commands/execute");
|
|
18
18
|
const debug_1 = require("./commands/debug");
|
|
19
|
+
const init_1 = require("./commands/init");
|
|
19
20
|
const config_service_1 = require("./services/config-service");
|
|
20
21
|
const api_client_1 = require("./services/api-client");
|
|
21
22
|
const package_json_1 = __importDefault(require("../package.json"));
|
|
@@ -51,6 +52,7 @@ program
|
|
|
51
52
|
(0, files_1.registerFilesCommands)(program);
|
|
52
53
|
(0, execute_1.registerExecuteCommand)(program);
|
|
53
54
|
(0, debug_1.registerDebugCommand)(program);
|
|
55
|
+
(0, init_1.registerInitCommand)(program);
|
|
54
56
|
// Add help examples
|
|
55
57
|
program.addHelpText('after', `
|
|
56
58
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AACA,oDAA4B;AAC5B,gDAAwB;AAExB,gBAAM,CAAC,MAAM,CAAC;IACZ,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC;CACzC,CAAC,CAAC;AAEH,yCAAoC;AACpC,0CAAuD;AACvD,gDAA6D;AAC7D,4CAAyD;AACzD,gDAA4D;AAC5D,4CAAwD;AACxD,8DAA0D;AAC1D,sDAAkD;AAClD,mEAA0C;AAG1C,8BAA8B;AAC9B,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CAAC,gDAAgD,CAAC;KAC7D,OAAO,CAAC,sBAAW,CAAC,OAAO,CAAC;KAC5B,MAAM,CAAC,iBAAiB,EAAE,sCAAsC,CAAC;KACjE,IAAI,CAAC,WAAW,EAAE,CAAC,WAAW,EAAE,EAAE;IACjC,gDAAgD;IAChD,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;IAEhC,+BAA+B;IAC/B,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QAChB,8BAAa,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;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C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../../src/services/api-client.ts"],"names":[],"mappings":"AAAA,OAAc,EAAiB,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EACL,IAAI,EAEJ,cAAc,EACd,iBAAiB,EAElB,MAAM,oBAAoB,CAAC;AAG5B,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAgB;gBAElB,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;IA8B5C,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIjC,cAAc,IAAI,IAAI;IAItB,cAAc,IAAI,IAAI;IAsChB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,CAAC,CAAC;IAMlD,UAAU,IAAI,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../../src/services/api-client.ts"],"names":[],"mappings":"AAAA,OAAc,EAAiB,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EACL,IAAI,EAEJ,cAAc,EACd,iBAAiB,EAElB,MAAM,oBAAoB,CAAC;AAG5B,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAgB;gBAElB,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;IA8B5C,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIjC,cAAc,IAAI,IAAI;IAItB,cAAc,IAAI,IAAI;IAsChB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,CAAC,CAAC;IAMlD,UAAU,IAAI,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IASxD,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;CAIzD;AAGD,eAAO,MAAM,SAAS,WAAkB,CAAC;AAGzC,eAAe,SAAS,CAAC"}
|
|
@@ -73,7 +73,10 @@ class ApiClient {
|
|
|
73
73
|
}
|
|
74
74
|
// Prompts API
|
|
75
75
|
async getPrompts() {
|
|
76
|
-
|
|
76
|
+
var params = {
|
|
77
|
+
_size: 100
|
|
78
|
+
};
|
|
79
|
+
const response = await this.client.get('/api/v1/Prompts', { params });
|
|
77
80
|
return response.data;
|
|
78
81
|
}
|
|
79
82
|
async getPromptById(id) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../../src/services/api-client.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAiE;AACjE,qDAAiD;AAQjD,sDAAgH;AAEhH,MAAa,SAAS;IAGpB,YAAY,OAAgB,EAAE,KAAc;QAC1C,MAAM,MAAM,GAAG,OAAO,IAAI,8BAAa,CAAC,SAAS,EAAE,CAAC;QACpD,MAAM,SAAS,GAAG,KAAK,IAAI,8BAAa,CAAC,QAAQ,EAAE,CAAC;QAEpD,IAAI,CAAC,MAAM,GAAG,eAAK,CAAC,MAAM,CAAC;YACzB,OAAO,EAAE,MAAM;YACf,OAAO,EAAE,KAAK;YACd,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAC,CAAC;QAEH,8BAA8B;QAC9B,IAAI,SAAS,EAAE,CAAC;YACd,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QAC/B,CAAC;QAED,wCAAwC;QACxC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAClC,qCAAuB,EACvB,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CACjC,CAAC;QAEF,4DAA4D;QAC5D,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CACnC,sCAAwB,EACxB,mCAAqB,CACtB,CAAC;I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kBAAe,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sphereai-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "CLI tool for interacting with the SphereAI API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"files": [
|
|
46
46
|
"dist",
|
|
47
|
-
".env"
|
|
47
|
+
".env",
|
|
48
|
+
".sphereignore"
|
|
48
49
|
]
|
|
49
50
|
}
|