{"id":19388531,"url":"https://github.com/thinkthinkai/commandai","last_synced_at":"2025-10-09T08:50:31.280Z","repository":{"id":241052672,"uuid":"803128182","full_name":"ThinkThinkAI/CommandAI","owner":"ThinkThinkAI","description":"Experience the power of Command AI: your AI-powered command line companion that makes complex tasks simple and intuitive.","archived":false,"fork":false,"pushed_at":"2024-10-26T20:11:03.000Z","size":580,"stargazers_count":59,"open_issues_count":3,"forks_count":5,"subscribers_count":1,"default_branch":"pre-release","last_synced_at":"2025-08-28T23:38:50.813Z","etag":null,"topics":["ai","artificial-intelligence","chatgpt","cli","command-line","command-line-tool","database","mysql","postgres","software-development","software-engineering","sql","sqlite"],"latest_commit_sha":null,"homepage":"https://commandai.dev","language":"JavaScript","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/ThinkThinkAI.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,"zenodo":null}},"created_at":"2024-05-20T05:58:58.000Z","updated_at":"2025-08-23T02:37:16.000Z","dependencies_parsed_at":"2024-05-23T06:31:39.623Z","dependency_job_id":"75da705b-99d5-4a45-bfc3-3bc9f3220324","html_url":"https://github.com/ThinkThinkAI/CommandAI","commit_stats":null,"previous_names":["cmdlineai/ai-cli","commandai/ai-cli","thinkthinkai/commandai"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ThinkThinkAI/CommandAI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkThinkAI%2FCommandAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkThinkAI%2FCommandAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkThinkAI%2FCommandAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkThinkAI%2FCommandAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThinkThinkAI","download_url":"https://codeload.github.com/ThinkThinkAI/CommandAI/tar.gz/refs/heads/pre-release","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkThinkAI%2FCommandAI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001056,"owners_count":26082991,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ai","artificial-intelligence","chatgpt","cli","command-line","command-line-tool","database","mysql","postgres","software-development","software-engineering","sql","sqlite"],"created_at":"2024-11-10T10:12:53.683Z","updated_at":"2025-10-09T08:50:31.260Z","avatar_url":"https://github.com/ThinkThinkAI.png","language":"JavaScript","readme":"# 🎉 Command AI\n\n```text\n ██████╗ ██████╗ ███╗   ███╗███╗   ███╗ █████╗ ███╗   ██╗██████╗  █████╗ ██╗\n██╔════╝██╔═══██╗████╗ ████║████╗ ████║██╔══██╗████╗  ██║██╔══██╗██╔══██╗██║\n██║     ██║   ██║██╔████╔██║██╔████╔██║███████║██╔██╗ ██║██║  ██║███████║██║\n██║     ██║   ██║██║╚██╔╝██║██║╚██╔╝██║██╔══██║██║╚██╗██║██║  ██║██╔══██║██║\n╚██████╗╚██████╔╝██║ ╚═╝ ██║██║ ╚═╝ ██║██║  ██║██║ ╚████║██████╔╝██║  ██║██║\n ╚═════╝ ╚═════╝ ╚═╝     ╚═╝╚═╝     ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═════╝ ╚═╝  ╚═╝╚═╝\n```\n\n[![Maintainability](https://api.codeclimate.com/v1/badges/fb6299a2ae58c7570afa/maintainability)](https://codeclimate.com/github/CommandAI/ai-cli/maintainability) \u003ca href=\"https://discord.gg/bUE6hzdmrh\" style=\"float: right;\"\u003e\u003cimg src=\"https://img.shields.io/discord/1245952504341200957?style=flat\u0026label=Discord\"\u003e\u003c/a\u003e\n\n\n\nWelcome to Command AI, your new AI-powered command-line buddies! These programs makes handling tasks a breeze. Whether you need to automate routine tasks, set up new projects, run background operations, or simply start a chat. Just tell it what you want, and it'll get to work. Check out some cool things it can do:\n\n- **Automate Your Routine Tasks:** Need a cron job that checks your IP and pings a specific URL if it changes? Just ask!\n\n  ```bash\n  ai \"make a cron job that checks my IP and calls https://myipchanged.com when it changes\"\n  ```\n\n- **Set Up Projects on the Fly:** Want to start an npm project that spins up a configurable web server greeting you with \"hello world\"? No problem.\n\n  ```bash\n  ai \"create an npm project in ~/hello-world that starts a webserver saying 'hello world' and reads configs from a .env file\"\n  ```\n\n- **Run Background Jobs:** Need to list all the JavaScript files on your computer and save them in a file? It can handle that in the background.\n\n  ```bash\n  ai \"in the background, list all the JS files on this computer and put them in ~/js.txt\"\n  ```\n\n- **Query Databases with AI**: Want to interact with a database using natural language? Use `aiq`! Suports MYSQL, Postgres, and SQLite.\n\n```bash\n  aiq my_database \"list all users where age is over 30\"\n```\n\n\n- **Start an AI conversation:** Want to have a conversation with an AI? It can do that too.\n\n  ```bash\n  aic \"what is the meaning of life?\"\n  ```\n\nJust type your request into the CLI with `ai \"your requests here\"`, and watch the magic happen. It's like having a personal assistant for your terminal!\n\n## 🚧 ALPHA Stage Alert 🚧\n\nThis tool is still in its alpha stage, so expect some hiccups as we fine-tune our prompts for different models. The default settings show you execution plans and descriptions before running scripts to keep you in the loop / safe.\n\n## 🔥 Features\n\n- **AI Service Selection**: Pick between Ollama, ChatGPT, and any OpenAI compatable server.\n- **Easy Configuration**: Set everything up quickly with a few prompts.\n- **Command Line Power**: Ask the AI to do any task(s) you would want to do at the command line.\n- **DB Power**: Ask the AI for any information from your DB in plain language.\n- **Conversational AI**: Start a conversation with the AI.\n\n## 📋 Requirements\n\n- Node.js\n- npm\n\n## 🚀 Installation\n\n1. **Install globally via npm**:\n\n    ```bash\n    npm install -g command-ai\n    ```\n\n2. **Upgrade**:\n\n    ```bash\n    ai upgrade\n    ```\n\n## 🎮 Usage\n\n### Initial Setup\n\nThe first time you run it, you’ll set up your AI service and other settings. It saves everything in `~/.commandai/config.json`.\n\n```bash\nai\n```\n\n### Provide Command Input\n\nType your command either as an argument or enter it when prompted.\n\n```bash\nai \"your requests here\"\n\n# Example requests (use quotes if your shell needs them):\nai make a cron job that checks my IP and calls https://myipchanged.com when it changes\n\nai create an npm project in ~/hello-world that starts a webserver saying \"hello world\" and reads configs from a .env file\n\nai in the background, list all the JS files on this computer and put them in ~/js.txt\n\n# Start AI Database Query (first param is the database name, second is the query)\naiq my_database \"list all users where age is over 30\"\n# or\naiq my_database \"list all users where age is over 30\n\n# Don't start a AI Database Query Session.. Just get one response in JSON format.\naiq! my_database \"list all users where age is over 30\"\n\n# Start an AI conversation\naic \"what is the meaning of life?\"\n\n# Get only one response from AI\naic! \"what is the meaning of life?\"\n```\n\nMore commands..\n\n```bash\n# If you don't provide prompt, `ai` will just ask you to enter it.\nai\n\n# If you are feeling lucky an exclamation will execute without confirmation.\nai! list all the dot files\n\n# Reconfigure \nai config\naic config\n\n#configure db connections\naiq config\n\n# Upgrade Command AI\nai upgrade\n```\n\n### Execution Plans \u0026 Descriptions\n\nAfter you enter a command, Command AI will fetch a script and show you the plan and description. You decide if you want to run it!\n\n### Logging\n\nIf you turn logging on, commands and results are stored so you can revisit them anytime. (also please turn on and send if you open up a bug ticket)\n\n## ⚙️ Configuration\n\nAI Settings for all utilies are stored at `~/.commandai/config.json`. Here’s what it looks like:\n\n```json\n{\n  \"aiService\": \"\",                   // Pick \"Ollama\" \"ChatGPT\" \"OpenAI\"\n  \"ollamaUrl\": \"\",                   // Ollama server URL\n  \"ollamaModel\": \"\",                 // Model for Ollama\n  \"openAIApiKey\": \"\",                // ChatGPT / OpenAI API key\n  \"openAIModel\": \"\",                 // Model for OpenAI\n  \"openAIUrl\": \"\",                   // URL for OpenAI not needed for ChatGPT\n  \"showExecutionDescription\": true,  // Show descriptions\n  \"showExecutionPlan\": true,         // Show plans\n  \"enableLogging\": false             // Enable logging\n}\n```\n\nDB Settings for `aiq` are stored at `~/.commandai/db.json`. You can setup as many connections as you like. Here’s what it looks like:\n\n```json\n[\n  {\n    \"name\": \"PostgreSQL_Connection\",\n    \"type\": \"postgres\",\n    \"config\": {\n      \"user\": \"postgres_user\",\n      \"host\": \"localhost\",\n      \"database\": \"postgres_db\",\n      \"password\": \"postgres_password\",\n      \"port\": 5432\n    }\n  },\n  {\n    \"name\": \"MySQL_Connection\",\n    \"type\": \"mysql\",\n    \"config\": {\n      \"user\": \"mysql_user\",\n      \"host\": \"localhost\",\n      \"database\": \"mysql_db\",\n      \"password\": \"mysql_password\",\n      \"port\": 3306\n    }\n  },\n  {\n    \"name\": \"SQLite_Connection\",\n    \"type\": \"sqlite\",\n    \"config\": {\n      \"filename\": \"/path/to/sqlite.db\"\n    }\n  },\n  {\n    \"name\": \"MSSQL_Connection\",\n    \"type\": \"mssql\",\n    \"config\": {\n      \"user\": \"mssql_user\",\n      \"host\": \"localhost\",\n      \"database\": \"mssql_db\",\n      \"password\": \"mssql_password\",\n      \"port\": 1433\n    }\n  }\n]\n```\n\nNOTE! sqlite does not require to be in the config you can just list the file as the first param.\n\n## 💻 Development\n\nWant to help out? Great! Clone the repo and install dependencies:\n\n```bash\ngit clone https://github.com/username/command-ai.git\ncd command-ai\nnpm install\n```\n\nRun the project:\n\n```bash\nnpm start\n```\n\n## 🤝 Contributing\n\nWe’d love your help! Fork the repo, checkout the `pre-release` branch, make some changes, and send over a pull request. If you want to use the code for your local usage instead of installing it globally, follow these steps:\n\n1. **Clone your forked repo:**\n   ```sh\n   git clone https://github.com/your-username/command-ai.git\n   cd command-ai\n   ```\n2. **Checkout the `pre-release` branch:**\n    ```sh\n    git checkout pre-release\n    ```\n    This branch is where we merge all the new features and bug fixes before they are released.\n3. **Link the project locally:**\n    ```sh\n    npm link\n    ```\n    After these steps, you can use the commands (ai, aic, aiq, etc.) from your local development environment without installing the package globally.\n\n\n\n## 📜 License\n\nThis project is licensed under the MIT License.\n\n---\n\nEnjoy making your CLI life easier with Command AI!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkthinkai%2Fcommandai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkthinkai%2Fcommandai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkthinkai%2Fcommandai/lists"}