sphereai-cli 1.0.17 → 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 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
- ### Authentication
34
-
35
- | Command | Description |
36
- |---------|-------------|
37
- | `sphereai auth login <key>` | Authenticate with your UserChannelKey |
38
- | `sphereai auth logout` | Sign out and clear stored credentials |
39
- | `sphereai auth whoami` | Display your current user information |
40
- | `sphereai auth config` | Display current configuration |
41
-
42
- **Examples:**
43
-
44
- ```bash
45
- # Login
46
- sphereai auth login YOUR_USER_CHANNEL_KEY
47
-
48
- # Check who you are logged in as
49
- sphereai auth whoami
50
-
51
- # View as JSON
52
- sphereai auth whoami --output json
53
-
54
- # Logout
55
- sphereai auth logout
56
- ```
57
-
58
- ### Prompts
59
-
60
- List and view available AI prompts.
61
-
62
- | Command | Description |
63
- |---------|-------------|
64
- | `sphereai prompts list` | List all available prompts |
65
- | `sphereai prompts get <id>` | Get details of a specific prompt by ID |
66
-
67
- **Examples:**
68
-
69
- ```bash
70
- # List all prompts
71
- sphereai prompts list
72
-
73
- # List prompts in JSON format
74
- sphereai prompts list --output json
75
-
76
- # Get details of a specific prompt
77
- sphereai prompts get 123
78
-
79
- # Get prompt details in JSON format
80
- sphereai prompts get 123 --output json
81
- ```
82
-
83
- ### File Management
84
-
85
- Track files for AI processing. Works similar to git staging.
86
-
87
- | Command | Description |
88
- |---------|-------------|
89
- | `sphereai files add [path]` | Add files to tracking |
90
- | `sphereai files list` | List all tracked files |
91
- | `sphereai files remove <path>` | Remove a file from tracking |
92
- | `sphereai files clear --force` | Clear all tracked files |
93
- | `sphereai files status` | Show status of tracked files |
94
- | `sphereai files ignore` | Show current ignore patterns |
95
-
96
- ### AI Command Execution
97
-
98
- Execute AI commands with your tracked files.
99
-
100
- | Command | Description |
101
- |---------|-------------|
102
- | `sphereai execute -p <id>` | Execute AI command with tracked files |
103
-
104
- **File Management Examples:**
105
-
106
- ```bash
107
- # Add all files from current directory
108
- sphereai files add .
109
-
110
- # Add a specific file
111
- sphereai files add myfile.txt
112
-
113
- # Add files from a directory
114
- sphereai files add src/
115
-
116
- # List tracked files
117
- sphereai files list
118
-
119
- # List with details (size, date)
120
- sphereai files list --verbose
121
-
122
- # Check status
123
- sphereai files status
124
-
125
- # Remove a file from tracking
126
- sphereai files remove myfile.txt
127
-
128
- # Clear all tracked files
129
- sphereai files clear --force
130
- ```
131
-
132
- **Execution Examples:**
133
-
134
- ```bash
135
- # Execute AI command with tracked files
136
- sphereai execute --prompt-id 123
137
-
138
- # Execute with JSON output
139
- sphereai execute --prompt-id 123 --output json
140
-
141
- # Save detailed response to a specific directory
142
- sphereai execute --prompt-id 123 --save-dir ./responses
143
- ```
144
-
145
- #### Complete Workflow Example
146
-
147
- ```bash
148
- # 1. Login
149
- sphereai auth login YOUR_USER_CHANNEL_KEY
150
-
151
- # 2. List available prompts to find the one you need
152
- sphereai prompts list
153
-
154
- # 3. Get details of a specific prompt
155
- sphereai prompts get 123
156
-
157
- # 4. Add files to track
158
- sphereai files add .
159
-
160
- # 5. Check what files are tracked
161
- sphereai files list
162
-
163
- # 6. Execute AI command with tracked files
164
- sphereai execute --prompt-id 123
165
-
166
- # 7. The detailed response is automatically saved to a markdown file
167
- # 8. Clear tracked files when done
168
- sphereai files clear --force
169
- ```
170
-
171
- ### .sphereignore File
172
-
173
- Create a `.sphereignore` file in your project root to exclude files from tracking. It works like `.gitignore`.
174
-
175
- **Example `.sphereignore`:**
176
-
177
- ```gitignore
178
- # Dependencies
179
- node_modules/
180
-
181
- # Build outputs
182
- dist/
183
- build/
184
-
185
- # Environment files
186
- .env
187
- .env.*
188
-
189
- # Logs
190
- *.log
191
-
192
- # IDE files
193
- .vscode/
194
- .idea/
195
-
196
- # OS files
197
- .DS_Store
198
- ```
199
-
200
- If no `.sphereignore` file exists, common patterns are ignored by default (node_modules, .git, dist, build, .env, etc.).
201
-
202
- ## Output Formats
203
-
204
- All commands support two output formats:
205
-
206
- ```bash
207
- # Table format (default) - human readable
208
- sphereai auth whoami
209
-
210
- # JSON format - for scripting
211
- sphereai auth whoami --output json
212
- ```
213
-
214
- ## Global Options
215
-
216
- | Option | Description |
217
- |--------|-------------|
218
- | `--output <format>` | Output format: `table` (default) or `json` |
219
- | `--help` | Show help for any command |
220
- | `--version` | Show CLI version |
221
-
222
- ## Configuration
223
-
224
- Your credentials are stored securely in your user configuration directory. Use `sphereai auth config` to view the current configuration.
225
-
226
- ## Troubleshooting
227
-
228
- ### Token Expired
229
-
230
- Re-authenticate with your UserChannelKey:
231
-
232
- ```bash
233
- sphereai auth login YOUR_USER_CHANNEL_KEY
234
- ```
235
-
236
- ### Clear All Data
237
-
238
- ```bash
239
- sphereai auth logout
240
- ```
241
-
242
- ### Check Your Configuration
243
-
244
- ```bash
245
- sphereai auth config
246
- ```
247
-
248
- ## Requirements
249
-
250
- - Node.js 14.0.0 or higher
251
-
252
- ## Support
253
-
254
- For issues and questions, please contact your SphereAI administrator.
255
-
256
- ## License
257
-
258
- ISC
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,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerInitCommand(program: Command): void;
3
+ //# sourceMappingURL=init.d.ts.map
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,kDAuBC;AAtCD,uCAAyB;AACzB,2CAA6B;AAC7B,oDAAoE;AAEpE,SAAS,6BAA6B;IACpC,uDAAuD;IACvD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;IAEvE,IAAI,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAChC,OAAO,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;AAC9D,CAAC;AAED,SAAgB,mBAAmB,CAAC,OAAgB;IAClD,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,8CAA8C,CAAC;SAC3D,MAAM,CAAC,aAAa,EAAE,uCAAuC,CAAC;SAC9D,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;QAClB,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,eAAe,CAAC,CAAC;QAEnE,IAAI,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YACtD,IAAA,oBAAO,EAAC,yDAAyD,CAAC,CAAC;YACnE,OAAO;QACT,CAAC;QAED,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,6BAA6B,EAAE,CAAC;YAChD,EAAE,CAAC,aAAa,CAAC,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACrD,IAAA,oBAAO,EAAC,4BAA4B,CAAC,CAAC;YACtC,IAAA,iBAAI,EAAC,6DAA6D,CAAC,CAAC;QACtE,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAA,kBAAK,EAAC,uCAAuC,GAAI,GAAa,CAAC,OAAO,CAAC,CAAC;YACxE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerLanguageCommand(program: Command): void;
3
+ //# sourceMappingURL=language.d.ts.map
@@ -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,OAAO,CAAC,YAAY,CAAC;SACrB,WAAW,CAAC,+BAA+B,CAAC;SAC5C,MAAM,CAAC,CAAC,IAAY,EAAE,EAAE;QACvB,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAE1C,IAAI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M,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,aAAa,EAAE,wBAAwB;KACxC;IAED,mBAAmB;IACnB,OAAO,EAAE;QACP,eAAe,EAAE,qBAAqB;QACtC,cAAc,EAAE,4BAA4B;QAC5C,cAAc,EAAE,kBAAkB;QAClC,cAAc,EAAE,kBAAkB;QAClC,UAAU,EAAE,sDAAsD;KACnE;IAED,iBAAiB;IACjB,KAAK,EAAE;QACL,WAAW,EAAE,iBAAiB;QAC9B,UAAU,EAAE,mCAAmC;QAC/C,YAAY,EAAE,qBAAqB;QACnC,YAAY,EAAE,wBAAwB;QACtC,YAAY,EAAE,gBAAgB;QAC9B,cAAc,EAAE,4BAA4B;QAC5C,YAAY,EAAE,2BAA2B;QACzC,WAAW,EAAE,8BAA8B;QAC3C,cAAc,EAAE,mCAAmC;QACnD,YAAY,EAAE,mDAAmD;QACjE,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,SAAS;QAClB,YAAY,EAAE,6BAA6B;KAC5C;IAED,mBAAmB;IACnB,OAAO,EAAE;QACP,SAAS,EAAE,sBAAsB;QACjC,UAAU,EAAE,uBAAuB;QACnC,cA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ginSuccess: 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,EAAE,GAAG;IAChB,UAAU;IACV,gBAAgB,EAAE,+DAA+D;IACjF,kBAAkB,EAAE,oBAAoB;IAExC,gBAAgB;IAChB,IAAI,EAAE;QACJ,YAAY,EAAE,0BAA0B;QACxC,WAAW,EAAE,uBAAuB;QACpC,aAAa,EAAE,8BAA8B;QAC7C,QAAQ,EAAE,4BAA4B;QACtC,aAAa,EAAE,qBAAqB;QACpC,WAAW,EAAE,8BAA8B;QAC3C,UAAU,EAAE,yBAAyB;QACrC,WAAW,EAAE,gBAAgB;QAC7B,WAAW,EAAE,iBAAiB;QAC9B,UAAU,EAAE,0BAA0B;QACtC,aAAa,EAAE,qBAAqB;KACrC;IAED,mBAAmB;IACnB,OAAO,EAAE;QACP,eAAe,EAAE,qBAAqB;QACtC,cAAc,EAAE,gCAAgC;QAChD,cAAc,EAAE,0BAA0B;QAC1C,cAAc,EAAE,uBAAuB;QACvC,UAAU,EAAE,wDAAwD;KACrE;IAED,iBAAiB;IACjB,KAAK,EAAE;QACL,WAAW,EAAE,yBAAyB;QACtC,UAAU,EAAE,kDAAkD;QAC9D,YAAY,EAAE,+BAA+B;QAC7C,YAAY,EAAE,gCAAgC;QAC9C,YAAY,EAAE,sBAAsB;QACpC,cAAc,EAAE,qCAAqC;QACrD,YAAY,EAAE,8CAA8C;QAC5D,WAAW,EAAE,iCAAiC;QAC9C,cAAc,EAAE,0CAA0C;QAC1D,YAAY,EAAE,6DAA6D;QAC3E,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,SAA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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,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AAO,CAAC,CAAC;AAC/B,IAAA,gCAAsB,EAAC,OAAO,CAAC,CAAC;AAChC,IAAA,4BAAoB,EAAC,OAAO,CAAC,CAAC;AAC9B,IAAA,0BAAmB,EAAC,OAAO,CAAC,CAAC;AAE7B,oBAAoB;AACpB,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6C5B,CAAC,CAAC;AAEH,+BAA+B;AAC/B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,mCAAmC;AACnC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sphereai-cli",
3
- "version": "1.0.17",
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
  }