{"id":17381871,"url":"https://github.com/timkitch/ai-shell-command-generator","last_synced_at":"2025-02-27T10:30:50.182Z","repository":{"id":250357271,"uuid":"831902188","full_name":"timkitch/ai-shell-command-generator","owner":"timkitch","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-10T13:27:04.000Z","size":98,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-09-11T12:52:48.175Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timkitch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-22T00:12:17.000Z","updated_at":"2024-09-10T13:28:12.000Z","dependencies_parsed_at":"2024-07-26T20:12:33.299Z","dependency_job_id":"d05c1c1b-ab3f-456e-99db-8bea75f39eba","html_url":"https://github.com/timkitch/ai-shell-command-generator","commit_stats":null,"previous_names":["timkitch/ai-shell-command-generator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkitch%2Fai-shell-command-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkitch%2Fai-shell-command-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkitch%2Fai-shell-command-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkitch%2Fai-shell-command-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timkitch","download_url":"https://codeload.github.com/timkitch/ai-shell-command-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219842836,"owners_count":16556565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-16T07:02:02.824Z","updated_at":"2024-10-16T07:04:57.769Z","avatar_url":"https://github.com/timkitch.png","language":"Python","readme":"# Shell Command Generator\n\n## Description\n\nThis application is a CLI tool that generates shell commands based on natural language task descriptions. It supports multiple shell environments (Windows Command Prompt, PowerShell, and Bash) and uses OpenAI's GPT-4 model to generate accurate and context-appropriate commands.\n\n## Features\n\n- Supports multiple shell environments (cmd, PowerShell, Bash)\n- Uses natural language processing to understand task descriptions\n- Generates shell commands using OpenAI's GPT-4o mini model\n- Colorized output for better readability\n- Option to copy generated commands to clipboard\n\n## Core Technologies\n\n- Python 3.11+\n- LangChain for AI model integration\n- OpenAI's GPT-4o mini model (multimodal capabilities)\n- Colorama for terminal color output\n- Pyperclip for clipboard functionality\n\n## Installation\n\n1. Clone the repository:\n   ```\n   git clone https://github.com/timkitch/ai-shell-command-generator\n   cd shell-command-generator\n   ```\n\n2. Create and activate a virtual environment:\n   ```\n   python -m venv venv\n   source venv/bin/activate  # On Windows, use `venv\\Scripts\\activate`\n   ```\n\n3. Install the required packages:\n   ```\n   pip install -r requirements.txt\n   ```\n\n4. Set up your OpenAI API key:\n   - Copy `.env-example` to `.env`\n   - Replace the placeholder API key in `.env` with your actual OpenAI API key\n\n5. Obtaining an OpenAI API key:\n   - Go to https://platform.openai.com/signup\n   - Create an account or sign in\n   - Navigate to the API keys section\n   - Generate a new API key\n   - Copy the key and paste it into your `.env` file\n\n## Usage\n\nRun the application using the following command:\n\n```\npython cli.py\n```\n\nYou will be prompted to:\n1. Select your shell environment (cmd, PowerShell, or Bash)\n2. Describe the task you want to perform\n\nThe application will then generate a suitable command and display it with formatting. You'll have the option to copy the command to your clipboard.\n\nAlternatively, you can specify the shell and task directly as command-line arguments:\n\n```\npython cli.py --shell bash --task \"list all files in the current directory\"\n```\n\n## Development\n\nTo run tests and verify the setup:\n\n1. Run the query processor tests:\n   ```\n   python query_processor.py\n   ```\n\n2. Run the output formatter tests:\n   ```\n   python output_formatter.py\n   ```\n\n3. Run the LangChain integration tests:\n   ```\n   python langchain_integration.py\n   ```\n\n4. Verify the development environment setup:\n   ```\n   python verify_setup.py\n   ```\n\n5. Ensure your `.env` file is properly configured with your OpenAI API key\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimkitch%2Fai-shell-command-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimkitch%2Fai-shell-command-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimkitch%2Fai-shell-command-generator/lists"}