trace.ai-cli 1.0.1 → 1.0.3
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/README.markdown +0 -13
- package/index.js +33 -19
- package/package.json +7 -3
package/README.markdown
CHANGED
|
@@ -135,19 +135,6 @@ trace-ai ask "What is the purpose of a manifest.json file?"
|
|
|
135
135
|
- **Images**: JPG, PNG, GIF, WebP, BMP, SVG.
|
|
136
136
|
- **Other**: JSON, YAML, Markdown, SQL, Shell scripts, and more.
|
|
137
137
|
|
|
138
|
-
## Contributing
|
|
139
|
-
|
|
140
|
-
Contributions are welcome! To contribute:
|
|
141
|
-
|
|
142
|
-
1. Fork the repository: https://github.com/yourusername/trace-ai-cli
|
|
143
|
-
2. Create a feature branch: `git checkout -b feature-name`
|
|
144
|
-
3. Commit your changes: `git commit -m "Add feature-name"`
|
|
145
|
-
4. Push to the branch: `git push origin feature-name`
|
|
146
|
-
5. Open a pull request.
|
|
147
|
-
|
|
148
|
-
Please include tests and update documentation as needed.
|
|
149
|
-
|
|
150
|
-
---
|
|
151
138
|
|
|
152
139
|
Powered by Mixkey\
|
|
153
140
|
Built with ❤️ by Dukeindustries7.
|
package/index.js
CHANGED
|
@@ -4,6 +4,8 @@ const fs = require('fs').promises;
|
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const readline = require('readline');
|
|
6
6
|
const fetch = require('node-fetch');
|
|
7
|
+
const figlet = require('figlet');
|
|
8
|
+
const chalk = require('chalk');
|
|
7
9
|
|
|
8
10
|
// Core encryption/decryption logic from background.js
|
|
9
11
|
const ENCRYPTION_KEY = 'AlzaSyCVKlzUxK';
|
|
@@ -451,25 +453,37 @@ class TraceAI {
|
|
|
451
453
|
}
|
|
452
454
|
|
|
453
455
|
async start() {
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
console.log(
|
|
462
|
-
console.log('
|
|
463
|
-
console.log('
|
|
464
|
-
console.log('
|
|
465
|
-
|
|
466
|
-
console.log('
|
|
467
|
-
console.log(' /file
|
|
468
|
-
console.log(' /
|
|
469
|
-
console.log(' /
|
|
470
|
-
console.log(' /
|
|
471
|
-
console.log(' /
|
|
472
|
-
|
|
456
|
+
// Create ASCII art for "Trace.A"
|
|
457
|
+
const asciiArt = figlet.textSync('Trace.Ai', {
|
|
458
|
+
font: 'Big',
|
|
459
|
+
horizontalLayout: 'default',
|
|
460
|
+
verticalLayout: 'default'
|
|
461
|
+
});
|
|
462
|
+
|
|
463
|
+
console.log(chalk.cyan(asciiArt));
|
|
464
|
+
console.log(chalk.gray('═'.repeat(60)));
|
|
465
|
+
console.log(chalk.bold.green('Welcome to Trace.Ai CLI - AI powered CLI tool!'));
|
|
466
|
+
console.log(chalk.gray('═'.repeat(60)));
|
|
467
|
+
|
|
468
|
+
console.log(chalk.bold.yellow('\n📋 Commands:'));
|
|
469
|
+
console.log(chalk.magenta(' /file "path" question ') + chalk.gray('- Analyze a file with optional question'));
|
|
470
|
+
console.log(chalk.magenta(' /folder "path" question ') + chalk.gray('- Analyze a folder structure with optional question'));
|
|
471
|
+
console.log(chalk.magenta(' /image "path" question ') + chalk.gray('- Analyze an image'));
|
|
472
|
+
console.log(chalk.magenta(' /context <text> ') + chalk.gray('- Set text context for conversations'));
|
|
473
|
+
console.log(chalk.magenta(' /context-file "path" ') + chalk.gray('- Add file context'));
|
|
474
|
+
console.log(chalk.magenta(' /view-context ') + chalk.gray('- View all contexts'));
|
|
475
|
+
console.log(chalk.magenta(' /clear [text|file "path"] ') + chalk.gray('- Clear specific or all contexts'));
|
|
476
|
+
console.log(chalk.magenta(' /exit ') + chalk.gray('- Exit the application'));
|
|
477
|
+
console.log(chalk.magenta(' Or just type your question directly'));
|
|
478
|
+
|
|
479
|
+
console.log(chalk.bold.blue('\n💡 Examples:'));
|
|
480
|
+
console.log(chalk.magenta(' /file "path/app.js" ') + chalk.italic('explain this code in simple terms'));
|
|
481
|
+
console.log(chalk.magenta(' /image "path/image.png" ') + chalk.italic('what is this image about?'));
|
|
482
|
+
console.log(chalk.magenta(' /folder "path/src" ') + chalk.italic('what is the purpose of this project?'));
|
|
483
|
+
console.log(chalk.gray('\n' + '─'.repeat(60)));
|
|
484
|
+
console.log(chalk.green('Ready to assist! Type your command or question below:'));
|
|
485
|
+
console.log();
|
|
486
|
+
|
|
473
487
|
this.promptUser();
|
|
474
488
|
}
|
|
475
489
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trace.ai-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "A powerful AI-powered CLI tool",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -30,9 +30,13 @@
|
|
|
30
30
|
"author": "Dukeindustries7",
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"node-fetch": "^2.6.7"
|
|
33
|
+
"node-fetch": "^2.6.7",
|
|
34
|
+
"figlet": "^1.7.0",
|
|
35
|
+
"chalk": "^4.1.2",
|
|
36
|
+
"cli-spinners": "^2.9.2",
|
|
37
|
+
"ora": "^5.4.1"
|
|
34
38
|
},
|
|
35
39
|
"engines": {
|
|
36
40
|
"node": ">=14.0.0"
|
|
37
41
|
}
|
|
38
|
-
}
|
|
42
|
+
}
|