commandor-ai 1.0.1__tar.gz

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.
@@ -0,0 +1,92 @@
1
+ # Commandor License
2
+
3
+ ## Open Source License with Commercial Attribution Requirements
4
+
5
+ This software is **free and open source** for all users, with specific attribution requirements for commercial use.
6
+
7
+ ### Personal/Individual Use (Free)
8
+
9
+ **Permission is hereby granted, free of charge, to any individual** to use, copy, modify, distribute, and contribute to this software for **personal, educational, or non-commercial purposes** without any restrictions or attribution requirements.
10
+
11
+ ### Commercial Use (Free with Attribution)
12
+
13
+ **Commercial use is permitted free of charge**, provided that commercial users comply with the following attribution requirements:
14
+
15
+ **Required Attribution:**
16
+ - Display **"Powered by Commandor"** prominently in your product interface, documentation, or about section
17
+ - Include a clickable link to the official repository: `https://github.com/ravin-d-27/Commandor`
18
+ - Mention Commandor in relevant marketing materials, press releases, or product announcements
19
+ - If feasible, submit a brief case study or testimonial about your usage for our community showcase
20
+
21
+ **Commercial use includes:**
22
+ - Use by organizations or businesses of any size
23
+ - Integration into commercial products or services
24
+ - Use that generates revenue or commercial benefit
25
+ - Use by government agencies or institutions
26
+
27
+ ### Contributions Welcome
28
+
29
+ **All contributions are welcome and encouraged:**
30
+ - Pull requests, bug reports, and feature suggestions are appreciated
31
+ - Contributors retain copyright to their contributions
32
+ - By contributing, you agree your contributions will be licensed under the same terms
33
+ - All contributors will be acknowledged in the project documentation
34
+
35
+ ### Reproduction and Redistribution
36
+
37
+ **Permitted:**
38
+ - ✅ Fork the repository and create derivatives
39
+ - ✅ Modify and distribute modified versions
40
+ - ✅ Use components in other projects
41
+ - ✅ Create packages or distributions
42
+
43
+ **Required for Reproduction/Redistribution:**
44
+ - ❌ **You may NOT claim this software as your own original work**
45
+ - ❌ **You may NOT remove or modify copyright notices**
46
+ - ❌ **You may NOT redistribute without including this license**
47
+ - ✅ **You MUST clearly indicate if changes were made**
48
+ - ✅ **You MUST provide attribution to the original project**
49
+
50
+ ### Attribution Requirements for Derivatives
51
+
52
+ If you create a derivative work or redistribute this software:
53
+ - Include original copyright notice and this license
54
+ - Clearly state that your work is based on Commandor
55
+ - Provide link to the original repository
56
+ - If you've made modifications, clearly indicate what was changed
57
+
58
+ ### Open Source Commitment
59
+
60
+ This project is committed to remaining **free and open source forever**:
61
+ - No future license changes that restrict existing freedoms
62
+ - Community-driven development
63
+ - Transparent decision making
64
+ - Welcoming to all contributors regardless of background
65
+
66
+ ### Enforcement and Compliance
67
+
68
+ - Attribution compliance is verified through community monitoring
69
+ - Non-compliance will result in polite contact requesting correction
70
+ - Repeated violations may result in license termination for that user
71
+ - Community members are encouraged to report non-compliance
72
+
73
+ ### Definitions
74
+
75
+ - **Personal Use**: Use by individuals for their own personal, educational, or research purposes
76
+ - **Commercial Use**: Any use by organizations, businesses, or for commercial advantage
77
+ - **Attribution**: Proper credit given to the original project and maintainers
78
+ - **Derivative Work**: Software that incorporates, modifies, or builds upon this project
79
+
80
+ ### Disclaimer
81
+
82
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
83
+
84
+ ---
85
+
86
+ **Copyright (c) 2025 Ravin D**
87
+
88
+ **This software is proudly open source and free for everyone!**
89
+
90
+ For questions about attribution requirements or to submit your case study, contact: [your-email@example.com]
91
+
92
+ **⭐ If this project helps you, please star it on GitHub to help others discover it!**
@@ -0,0 +1,12 @@
1
+ # Include the README and LICENSE files
2
+ include README.md
3
+ include LICENSE
4
+
5
+ # Include all files inside the commandor package that aren't .py
6
+ recursive-include commandor *
7
+
8
+ # Exclude unnecessary files (optional but good practice)
9
+ global-exclude *.pyc __pycache__ *.pyo *.pyd *.swp *.bak
10
+
11
+ # Include any other data files, e.g., configs/templates if you have them
12
+ # recursive-include commandor/templates *
@@ -0,0 +1,380 @@
1
+ Metadata-Version: 2.4
2
+ Name: commandor-ai
3
+ Version: 1.0.1
4
+ Summary: An intelligent terminal assistant that uses AI to convert natural language to shell commands
5
+ Home-page: https://github.com/ravin-d-27/Commandor
6
+ Author: Ravin D
7
+ Author-email: Ravin D <ravin.d3107@outlook.com>
8
+ License: Proprietary
9
+ Project-URL: Homepage, https://github.com/ravin-d-27/Commandor
10
+ Project-URL: BugReports, https://github.com/ravin-d-27/Commandor/issues
11
+ Project-URL: Source, https://github.com/ravin-d-27/Commandor
12
+ Project-URL: Documentation, https://github.com/ravin-d-27/Commandor#readme
13
+ Keywords: terminal,ai,shell,command-line,natural-language,gemini,assistant,automation,cli,productivity
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: System Administrators
17
+ Classifier: License :: Free for non-commercial use
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.7
21
+ Classifier: Programming Language :: Python :: 3.8
22
+ Classifier: Programming Language :: Python :: 3.9
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
+ Classifier: Topic :: System :: Shells
28
+ Classifier: Topic :: System :: System Shells
29
+ Classifier: Topic :: Terminals
30
+ Classifier: Topic :: Utilities
31
+ Requires-Python: >=3.7
32
+ Description-Content-Type: text/markdown
33
+ License-File: LICENSE
34
+ Requires-Dist: google-generativeai>=0.3.0
35
+ Requires-Dist: python-decouple>=3.6
36
+ Requires-Dist: colorama>=0.4.4
37
+ Provides-Extra: windows
38
+ Requires-Dist: pyreadline3>=3.4.1; extra == "windows"
39
+ Dynamic: author
40
+ Dynamic: home-page
41
+ Dynamic: license-file
42
+ Dynamic: requires-python
43
+
44
+ # Commandor
45
+
46
+ An intelligent terminal assistant that uses AI to convert natural language to shell commands and answer questions directly.
47
+
48
+ [![GitHub stars](https://img.shields.io/github/stars/ravin-d-27/Commandor?style=social)](https://github.com/ravin-d-27/Commandor/stargazers)
49
+ [![License](https://img.shields.io/badge/License-Open%20Source%20with%20Attribution-blue.svg)](LICENSE)
50
+ [![Python](https://img.shields.io/badge/Python-3.6%2B-blue.svg)](https://python.org)
51
+
52
+ ## ✨ Latest Features (v2.0)
53
+
54
+ ### 🤖 **Direct AI Chat with `/ask`**
55
+ Ask the AI assistant any question directly without generating commands! Perfect for:
56
+ - Getting programming help and explanations
57
+ - Learning new concepts and best practices
58
+ - Technical troubleshooting and advice
59
+ - General knowledge queries
60
+
61
+ ### 🎨 **Beautiful Colorful Interface**
62
+ - **Stunning ASCII art logo** with rainbow colors
63
+ - **Enhanced visual experience** with emojis and improved styling
64
+ - **Better color coding** for different command types
65
+ - **Professional yet fun** terminal presentation
66
+
67
+ ## Core Features
68
+
69
+ - **🧠 AI-powered natural language to shell command conversion**
70
+ - **💬 Direct AI questioning and assistance**
71
+ - **🌈 Colorized output and beautiful terminal interface**
72
+ - **📚 Command history with readline support**
73
+ - **🛡️ Safety checks for dangerous commands**
74
+ - **🖥️ Cross-platform support** (Windows, macOS, Linux)
75
+ - **📍 Context-aware suggestions** based on current directory
76
+
77
+ ## Installation
78
+
79
+ ### Install from Source (Recommended)
80
+
81
+ 1. **Clone or download the project files**
82
+ ```bash
83
+ git clone https://github.com/ravin-d-27/Commandor.git
84
+ cd commandor
85
+ ```
86
+
87
+ 2. **Verify the directory structure:**
88
+ ```
89
+ Commandor/
90
+ ├── setup.py
91
+ ├── requirements.txt
92
+ ├── README.md
93
+ ├── LICENSE
94
+ ├── .gitignore
95
+ └── commandor/
96
+ ├── __init__.py
97
+ ├── main.py
98
+ └── terminal.py
99
+ ```
100
+
101
+ 3. **Install the package:**
102
+ ```bash
103
+ pip install -e .
104
+ ```
105
+
106
+ 4. **Set up your environment:**
107
+ Create a `.env` file in your home directory or project directory:
108
+ ```bash
109
+ echo "GEMINI=your_gemini_api_key_here" > ~/.env
110
+ ```
111
+
112
+ ## Setup
113
+
114
+ 1. **Get a Gemini API Key:**
115
+ - Go to [Google AI Studio](https://makersuite.google.com/app/apikey)
116
+ - Create a new API key
117
+ - Copy the key
118
+
119
+ 2. **Configure the environment:**
120
+ Create a `.env` file in your home directory:
121
+ ```bash
122
+ echo "GEMINI=your_api_key_here" > ~/.env
123
+ ```
124
+
125
+ Or set it as an environment variable:
126
+ ```bash
127
+ export GEMINI=your_api_key_here
128
+ ```
129
+
130
+ ## Usage
131
+
132
+ Once installed, you can start Commandor from anywhere in your terminal:
133
+
134
+ ```bash
135
+ commandor
136
+ ```
137
+
138
+ ### Available Commands
139
+
140
+ | Command | Description | New! |
141
+ |---------|-------------|------|
142
+ | `/ai <instruction>` | Convert natural language to shell command | |
143
+ | `/ask <question>` | Ask AI any question directly | ✨ **NEW** |
144
+ | `/help` | Show help message | |
145
+ | `/info` | Show system information | |
146
+ | `/history` | Show command history | |
147
+ | `/clear` | Clear the screen | |
148
+ | `exit` or `Ctrl+C` | Exit Commandor | |
149
+
150
+ ### Command Generation Examples
151
+
152
+ ```bash
153
+ commandor
154
+ 🚀 COMMANDOR - Your AI-Powered Terminal Assistant 🚀
155
+
156
+ Commandor $ /ai list all python files
157
+ 🤖 AI → find . -name "*.py" -type f
158
+
159
+ Commandor $ /ai create a directory called projects
160
+ 🤖 AI → mkdir projects
161
+
162
+ Commandor $ /ai show disk usage
163
+ 🤖 AI → df -h
164
+
165
+ Commandor $ /ai find large files over 100MB
166
+ 🤖 AI → find . -type f -size +100M -exec ls -lh {} \;
167
+ ```
168
+
169
+ ### ✨ NEW: Direct AI Questions
170
+
171
+ Ask the AI assistant anything directly without generating commands:
172
+
173
+ ```bash
174
+ Commandor $ /ask What is the difference between Python and JavaScript?
175
+ 🤔 Thinking...
176
+
177
+ 🤖 AI Response:
178
+ ──────────────────────────────────────────────────
179
+ Python and JavaScript are both popular programming languages but serve different purposes:
180
+
181
+ **Python:**
182
+ - General-purpose language, great for data science, AI, web backends
183
+ - Interpreted, readable syntax
184
+ - Strong in scientific computing and automation
185
+ - Used for desktop applications, web servers, data analysis
186
+
187
+ **JavaScript:**
188
+ - Originally for web browsers, now also server-side (Node.js)
189
+ - Essential for web development and interactive websites
190
+ - Event-driven and asynchronous
191
+ - Used for frontend, backend, and mobile apps
192
+
193
+ Both are beginner-friendly but excel in different domains!
194
+ ──────────────────────────────────────────────────
195
+
196
+ Commandor $ /ask How do I optimize my Python code for better performance?
197
+ 🤔 Thinking...
198
+
199
+ 🤖 AI Response:
200
+ ──────────────────────────────────────────────────
201
+ Here are key strategies for Python optimization:
202
+
203
+ 1. **Use built-in functions** - They're implemented in C and much faster
204
+ 2. **List comprehensions** - Faster than traditional loops
205
+ 3. **Avoid global variables** - Local variables are accessed faster
206
+ 4. **Use appropriate data structures** - Sets for membership testing, deques for queues
207
+ 5. **Profile your code** - Use cProfile to find bottlenecks
208
+ 6. **NumPy for numerical operations** - Vectorized operations are much faster
209
+ 7. **Cache expensive function calls** - Use @lru_cache decorator
210
+ 8. **Use generators** - For memory-efficient iteration
211
+
212
+ Focus on the biggest bottlenecks first for maximum impact!
213
+ ──────────────────────────────────────────────────
214
+ ```
215
+
216
+ ### More `/ask` Examples
217
+
218
+ ```bash
219
+ # Programming Help
220
+ /ask Explain machine learning concepts for beginners
221
+ /ask What are Git best practices?
222
+ /ask How do I debug memory leaks in Python?
223
+
224
+ # System Administration
225
+ /ask What are the differences between various Linux distributions?
226
+ /ask How do I secure my server?
227
+ /ask Explain Docker vs Virtual Machines
228
+
229
+ # General Learning
230
+ /ask What is quantum computing?
231
+ /ask How does blockchain technology work?
232
+ /ask Explain REST APIs
233
+ ```
234
+
235
+ ## Troubleshooting
236
+
237
+ ### Command not found
238
+
239
+ If you get "commandor: command not found":
240
+
241
+ 1. **Check if the package is installed:**
242
+ ```bash
243
+ pip show commandor
244
+ ```
245
+
246
+ 2. **Check your PATH:**
247
+ ```bash
248
+ echo $PATH
249
+ ```
250
+
251
+ 3. **Find where pip installs scripts:**
252
+ ```bash
253
+ python -m site --user-base
254
+ ```
255
+
256
+ 4. **Add to PATH if needed (add to your `.bashrc` or `.zshrc`):**
257
+ ```bash
258
+ export PATH="$PATH:$(python -m site --user-base)/bin"
259
+ ```
260
+
261
+ ### API Key Issues
262
+
263
+ - Make sure your `.env` file contains: `GEMINI=your_actual_api_key`
264
+ - Verify the API key is valid at [Google AI Studio](https://makersuite.google.com/app/apikey)
265
+ - Check that the `.env` file is in your home directory or current working directory
266
+
267
+ ### Windows Users
268
+
269
+ For better experience on Windows, install pyreadline3:
270
+ ```bash
271
+ pip install pyreadline3
272
+ ```
273
+
274
+ ## What's New in v2.0
275
+
276
+ ### 🆕 Direct AI Assistant (`/ask`)
277
+ - **Ask any question** directly to the AI without generating commands
278
+ - **Perfect for learning** - get explanations, tutorials, and advice
279
+ - **Context-aware responses** - AI understands your system environment
280
+ - **Clean formatting** - Beautiful response display with visual separators
281
+
282
+ ### 🎨 Enhanced Visual Experience
283
+ - **Colorful ASCII art logo** - Eye-catching Commandor branding on startup
284
+ - **Rainbow color palette** - More vibrant and engaging interface
285
+ - **Emoji indicators** - Visual cues for different actions (🤖, 🧠, 💡, etc.)
286
+ - **Improved help system** - Better organized with examples for both features
287
+
288
+ ### 🚀 Better User Experience
289
+ - **Clearer command distinction** - Visual separation between `/ai` and `/ask`
290
+ - **Enhanced prompts** - More informative and colorful terminal prompts
291
+ - **Improved error messages** - Better feedback with emoji indicators
292
+ - **Professional presentation** - Polished interface that's both functional and beautiful
293
+
294
+ ## Contributing
295
+
296
+ We welcome contributions from everyone! Here's how you can help:
297
+
298
+ ### Ways to Contribute
299
+ - **Report bugs** by opening an issue
300
+ - **Suggest features** or improvements
301
+ - **Improve documentation**
302
+ - **Submit pull requests** with bug fixes or new features
303
+ - **Star the repository** to help others discover it
304
+
305
+ ### Development Setup
306
+
307
+ 1. **Fork and clone the repository:**
308
+ ```bash
309
+ git clone https://github.com/ravin-d-27/Commandor.git
310
+ cd commandor
311
+ ```
312
+
313
+ 2. **Install in development mode:**
314
+ ```bash
315
+ pip install -e .
316
+ ```
317
+
318
+ 3. **Make your changes and test:**
319
+ ```bash
320
+ commandor
321
+ ```
322
+
323
+ 4. **Submit a pull request**
324
+
325
+ ### Contribution Guidelines
326
+ - Follow existing code style
327
+ - Add tests for new features
328
+ - Update documentation as needed
329
+ - Be respectful and inclusive in discussions
330
+
331
+ ## License
332
+
333
+ Commandor is **free and open source** for everyone! 🎉
334
+
335
+ - ✅ **Personal use**: No attribution required
336
+ - ✅ **Commercial use**: Free with attribution requirement
337
+ - ✅ **Contributions**: Always welcome!
338
+ - ✅ **Modifications**: Allowed with proper attribution
339
+
340
+ ### Commercial Attribution Requirement
341
+
342
+ If you're using Commandor commercially, we just ask that you:
343
+ - Display **"Powered by Commandor"** in your product
344
+ - Include a link to this repository
345
+ - Consider sharing your use case with the community
346
+
347
+ See [LICENSE](LICENSE) for complete details.
348
+
349
+ ## Showcase
350
+
351
+ **Using Commandor in your project?** We'd love to feature you! Submit your use case by opening an issue or contacting us.
352
+
353
+ ### Featured Users
354
+ *Be the first to be featured here by using Commandor commercially and letting us know!*
355
+
356
+ ## Uninstallation
357
+
358
+ To uninstall Commandor:
359
+
360
+ ```bash
361
+ pip uninstall commandor
362
+ ```
363
+
364
+ ## Support & Contact
365
+
366
+ - 🐛 **Issues**: [GitHub Issues](https://github.com/ravin-d-27/Commandor/issues)
367
+ - 📧 **Email**: [ravin.d3107@outlook.com]
368
+ - 💬 **Discussions**: [GitHub Discussions](https://github.com/ravin-d-27/Commandor/discussions)
369
+
370
+ ## Acknowledgments
371
+
372
+ - Thanks to all contributors who help make Commandor better
373
+ - Built with Google's Gemini AI
374
+ - Inspired by the need for more intuitive terminal interactions
375
+
376
+ ---
377
+
378
+ **If Commandor helps you, please star this repository to help others discover it!**
379
+
380
+ **Made with ❤️ by Ravin D**