{"_id":"@amirhosseinyavari/ccg","_rev":"8-0990f1e418ec37f82465e0465f8e6bde","name":"@amirhosseinyavari/ccg","dist-tags":{"latest":"3.1.3"},"versions":{"3.0.3":{"name":"@amirhosseinyavari/ccg","version":"3.0.3","_id":"@amirhosseinyavari/ccg@3.0.3","maintainers":[{"name":"amirhosseinyavari","email":"amirhosseinyavari61@gmail.com"}],"bin":{"ccg":"cmdgen-cli.js"},"dist":{"shasum":"2897820ecaa67ac16b8eae7f3f578b375089ae74","tarball":"https://registry.npmjs.org/@amirhosseinyavari/ccg/-/ccg-3.0.3.tgz","fileCount":6,"integrity":"sha512-2nUKSXrh63Xc1waepk19fkCIIskzL0L2gG43/2GCvG8Y8u/FCD3B7zeZ66jpTsS2GRTUxViBnxza9lf1uFu7Sw==","signatures":[{"sig":"MEUCIQCd7wLr+2Yno3Kq5VbbMarVoI6FW0lQva1qdJMgSZnF0AIgB3dgkAfs29UvSFmWJoeT8DOqBvz/7h93HWjh0sYCdaw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41974},"main":"cmdgen-cli.js","gitHead":"afd52af44b61d7048300d21b1b5e9206100a72f7","_npmUser":{"name":"amirhosseinyavari","email":"amirhosseinyavari61@gmail.com"},"_npmVersion":"10.9.2","description":"CCG (Cando Command Generator) - Your Intelligent Command-Line Assistant","directories":{},"_nodeVersion":"22.14.0","dependencies":{"diff":"^5.2.0","open":"^8.4.0","axios":"^1.7.2","chalk":"^4.1.2","yargs":"^17.7.2","semver":"^7.6.2","fs-extra":"^11.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ccg_3.0.3_1761335895102_0.9996250622236236","host":"s3://npm-registry-packages-npm-production"}},"3.0.6":{"name":"@amirhosseinyavari/ccg","version":"3.0.6","_id":"@amirhosseinyavari/ccg@3.0.6","maintainers":[{"name":"amirhosseinyavari","email":"amirhosseinyavari61@gmail.com"}],"bin":{"ccg":"cmdgen-cli.js"},"dist":{"shasum":"0acb882f3f95a9ed9385a666496102690a993e52","tarball":"https://registry.npmjs.org/@amirhosseinyavari/ccg/-/ccg-3.0.6.tgz","fileCount":6,"integrity":"sha512-TOfmRUHTxPOD+IpiC1uobqz3bD3T9tWv9UpdVQxP/xHnMZCEha3tyf1GZ8Ln8lt3IYaWETOSId2pXa4lOXoCww==","signatures":[{"sig":"MEUCIGvHACAJPrhRo9ZZlNuF0v8yd4NGnd3rUb1ub17fcORcAiEAz0guv/T1EvftSq/mITv3z6yrhF0SQAN3gBwCy9GeW6s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42853},"main":"cmdgen-cli.js","gitHead":"d3476fba4487774835955a2eace9647a0036e2c3","_npmUser":{"name":"amirhosseinyavari","email":"amirhosseinyavari61@gmail.com"},"_npmVersion":"10.9.2","description":"CCG (Cando Command Generator) - Your Intelligent Command-Line Assistant","directories":{},"_nodeVersion":"22.14.0","dependencies":{"diff":"^5.2.0","open":"^8.4.0","axios":"^1.7.2","chalk":"^4.1.2","yargs":"^17.7.2","semver":"^7.6.2","fs-extra":"^11.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ccg_3.0.6_1761425754048_0.6753559061196719","host":"s3://npm-registry-packages-npm-production"}},"3.0.8":{"name":"@amirhosseinyavari/ccg","version":"3.0.8","_id":"@amirhosseinyavari/ccg@3.0.8","maintainers":[{"name":"amirhosseinyavari","email":"amirhosseinyavari61@gmail.com"}],"bin":{"ccg":"cmdgen-cli.js"},"dist":{"shasum":"42ea638e7ad75f1bfe25bd34ae1bdc69cf78a7c4","tarball":"https://registry.npmjs.org/@amirhosseinyavari/ccg/-/ccg-3.0.8.tgz","fileCount":6,"integrity":"sha512-Jj2zOHDrZkCkDB6jjVtr3VYJmGfdJuAFd6R8T3gdNw7DOjB0z003uJRg3WZGw1HebB8k0U3ttKBgEcmjHtUWCg==","signatures":[{"sig":"MEYCIQD/tQoAFugQ4d34DCZTScaZ65IlVj14Vgzqvp4CoSpjtgIhAJ3gyIPsL2ldK9Wf26chqmZ0BXwp8z8eF/mxRLJcpFFA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42921},"main":"cmdgen-cli.js","gitHead":"bb68bff815710076a89e0c2dd43371071e53e1e4","_npmUser":{"name":"amirhosseinyavari","email":"amirhosseinyavari61@gmail.com"},"_npmVersion":"10.9.2","description":"CCG (Cando Command Generator) - Your Intelligent Command-Line Assistant","directories":{},"_nodeVersion":"22.14.0","dependencies":{"diff":"^5.2.0","open":"^8.4.0","axios":"^1.7.2","chalk":"^4.1.2","yargs":"^17.7.2","semver":"^7.6.2","fs-extra":"^11.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ccg_3.0.8_1761429085444_0.8657774728436147","host":"s3://npm-registry-packages-npm-production"}},"3.1.1":{"name":"@amirhosseinyavari/ccg","version":"3.1.1","author":{"name":"Amirhossein Yavari"},"license":"Proprietary","_id":"@amirhosseinyavari/ccg@3.1.1","maintainers":[{"name":"amirhosseinyavari","email":"amirhosseinyavari61@gmail.com"}],"bin":{"ccg":"bin/ccg"},"dist":{"shasum":"258815618f3d8104a3594d6f7b9be62d4a7b045c","tarball":"https://registry.npmjs.org/@amirhosseinyavari/ccg/-/ccg-3.1.1.tgz","fileCount":6,"integrity":"sha512-0+ma1kWbJEFUHemP/VUoHr3Pt7REcE3LnBw4G3mdz9uVGdxShcCORewJgj8qIOtSV6z6D3ywErdi69ImD1Ha9g==","signatures":[{"sig":"MEYCIQDpPJhO1W/Km+HS0kQMlMlcft6bFWFM11Cbc6Z0tD4oJwIhAJrk0os1ej9C2V6nO3+4SuALt4rx2O6Z1bYmOXehUBN0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14434},"gitHead":"39d5a7de6f29df259a4c0039607a39781bc0f5c1","scripts":{"postinstall":"node postinstall.js"},"_npmUser":{"name":"amirhosseinyavari","email":"amirhosseinyavari61@gmail.com"},"_npmVersion":"10.9.2","description":"CCG - Secure Installer","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ccg_3.1.1_1763747785848_0.5564452111176423","host":"s3://npm-registry-packages-npm-production"}},"3.1.2":{"name":"@amirhosseinyavari/ccg","version":"3.1.2","author":{"name":"Amirhossein Yavari"},"license":"Proprietary","_id":"@amirhosseinyavari/ccg@3.1.2","maintainers":[{"name":"amirhosseinyavari","email":"amirhosseinyavari61@gmail.com"}],"bin":{"ccg":"bin/ccg.cmd"},"dist":{"shasum":"e62ff51228da000b979c18a6e6c1e7cd993a8973","tarball":"https://registry.npmjs.org/@amirhosseinyavari/ccg/-/ccg-3.1.2.tgz","fileCount":6,"integrity":"sha512-MC+aPMuugQmbuM67gURECW4WFnfMWTxISFLFjqGUpGdupto4QCImXvMWoBJrvX2iPkNZQ6UdkprxVR5LCGjVHA==","signatures":[{"sig":"MEQCICCcz1rvjGgw3rxY6PLZxzOyR5z6kXErN8sNtBXitxjeAiAonQYf2LjJ30YAndxiMvs2tuw6WFsowG1TLxFZ1OCtLw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14605},"gitHead":"c9d8971793665b753b19faf99516d38ab99dc787","scripts":{"postinstall":"node postinstall.js"},"_npmUser":{"name":"amirhosseinyavari","email":"amirhosseinyavari61@gmail.com"},"_npmVersion":"10.9.2","description":"CCG - Secure Closed-Source CLI Installer","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ccg_3.1.2_1763748318489_0.778176234924288","host":"s3://npm-registry-packages-npm-production"}},"3.1.3":{"name":"@amirhosseinyavari/ccg","version":"3.1.3","description":"CCG - Secure Closed-Source CLI Installer","author":{"name":"Amirhossein Yavari"},"license":"Proprietary","bin":{"ccg":"bin/ccg.cmd"},"scripts":{"postinstall":"node postinstall.js"},"_id":"@amirhosseinyavari/ccg@3.1.3","gitHead":"2f918efb13f09864d16ddb8bd2fced3fa75457f2","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-H5dPbhz/O7cpX6kfwM7cyu5O53P2od64YvaOvlKyyLhcxJ7faqorVtNPcMN1URloMw5uOe/bOvlyWUnkF8TybA==","shasum":"b5aef33d2ff4fdbdbe8641f71cf076d452ece573","tarball":"https://registry.npmjs.org/@amirhosseinyavari/ccg/-/ccg-3.1.3.tgz","fileCount":6,"unpackedSize":14931,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCRg/nJgQHqNnPzxZg3NctmWIMILmBtIZd4iV8ajKOcbQIgGijh/v+FGn743AvoBFiun+LyhWJgF+3L3aKH5yHvu/8="}]},"_npmUser":{"name":"amirhosseinyavari","email":"amirhosseinyavari61@gmail.com"},"directories":{},"maintainers":[{"name":"amirhosseinyavari","email":"amirhosseinyavari61@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ccg_3.1.3_1763750810307_0.05415863225294504"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-24T19:58:15.036Z","modified":"2025-11-21T18:46:50.762Z","3.0.3":"2025-10-24T19:58:15.309Z","3.0.6":"2025-10-25T20:55:54.262Z","3.0.8":"2025-10-25T21:51:25.650Z","3.0.9":"2025-10-26T15:45:09.122Z","3.1.1":"2025-11-21T17:56:26.067Z","3.1.2":"2025-11-21T18:05:18.683Z","3.1.3":"2025-11-21T18:46:50.553Z"},"author":{"name":"Amirhossein Yavari"},"license":"Proprietary","description":"CCG - Secure Closed-Source CLI Installer","maintainers":[{"name":"amirhosseinyavari","email":"amirhosseinyavari61@gmail.com"}],"readme":"# CCG (Cando Command Generator) - Your Intelligent Command-Line Assistant\n\n[![Hosted by Cando Academy](https://img.shields.io/badge/Hosted%20by-Cando%20Academy-yellow)](https://cando.ac)\n[![License: Proprietary](https://img.shields.io/badge/License-Proprietary-red)](LICENSE)\n[![Version](https://img.shields.io/badge/Release-v3.1.1-8a2be2)](https://github.com/amirhosseinyavari021/CCG/releases)\n[![Website](https://img.shields.io/badge/Web_app-HERE-FFD700)](https://ccg.cando.ac)\n[![npm](https://img.shields.io/badge/Published_on-npm-dd1100)](https://www.npmjs.com/package/@amirhosseinyavari/ccg)\n\n\n🎉 **What's New in Version 3.1.1 – Smart Code Compare & AI Fallback!**\n\nThis major release introduces the **Smart Code Compare** feature for both the Web and CLI, adds new platforms (**FortiGate**, **MikroTik**), and implements a resilient AI backend with fallback support for local models.\n\n  - **✨ NEW: Smart Code Compare (Web & CLI)**: Compare two code snippets or files. The AI provides a logical difference analysis, a code quality & security review, and a suggested smart merge.\n  - **✨ NEW: CLI `compare` Command**: Use `ccg compare <fileA> <fileB>` for a full AI-powered comparison directly in your terminal.\n  - **✨ NEW: Platform Support**: Added full support for **FortiGate (FortiOS)** and **MikroTik (RouterOS)**.\n  - **✨ NEW: Resilient AI Backend**: The server now automatically falls back to a local model (like Ollama) if the primary AI service (OpenAI) fails, ensuring higher availability.\n  - **✨ NEW: CLI `update` Command**: Keep your tool up-to-date with a simple `ccg update` command.\n  - **✨ NEW: CLI `feedback` Command**: Open the feedback form directly using `ccg feedback`.\n\n✨ **Key Features**\n\n  - **AI-Powered Generation**: Describe what you want to do and get the exact command you need, tailored to your **OS**, **Device Type** (Cisco, FortiGate), and **Knowledge Level**.\n  - **Intelligent Scripting**: Turn multi-step tasks into ready-to-run scripts for PowerShell, Bash, and network devices.\n  - **In-depth Analysis**: Paste any command to get a detailed explanation customized to your level of expertise.\n  - **Error Debugging**: Got an error? CCG analyzes it and gives you a step-by-step solution.\n  - **NEW: Smart Code Compare**: Analyze the logical differences, review quality, and get merge suggestions for any two code snippets.\n  - **Cross-Platform Support**: Natively works on Windows, macOS, Linux, **Cisco**, **MikroTik**, and **FortiGate**.\n  - **Multi-Language Support**: Available in both **English** and **Persian (فارسی)**.\n  - **Interactive Mode (CLI)**: Directly execute generated commands, request more suggestions, or exit effortlessly.\n  - **Configuration Management**: Easily manage your default settings (OS, shell, language, knowledge level) with the `config` command.\n  - **Self-Update Mechanism**: Keep your tool up-to-date with a simple `ccg update` command.\n\n🚀 **Quick Install (Recommended)**\n\n**Administrator Privileges are typically required for global installation.**\n\n### **For macOS / Linux**\n\nThe recommended way to install and update is with NPM:\n\n```bash\nsudo npm install -g @amirhosseinyavari/ccg\n````\n\n*To update, run `ccg update` or re-run the install command.*\n\n### **For Windows**\n\nOpen PowerShell as **Administrator** and run:\n\n```powershell\nnpm install -g @amirhosseinyavari/ccg\n```\n\n*To update, run `ccg update` or re-run the install command.*\n\n✅ **Tip for Users Without Admin Rights**\nYou can use `npx` to run CCG without a global installation:\n\n```bash\nnpx @amirhosseinyavari/ccg generate \"list all files\"\n```\n\nAfter installation, open a **new terminal window** and verify by running: `ccg --help`\n\n-----\n\n**⚠️ Important Note on Running Downloaded Files (Manual Install)**\n\nIf you download the executable files (`ccg-win.exe`, `ccg-macos`, `ccg-linux`) directly from the **GitHub Releases** page, your operating system might show a security warning. This happens because the application is not \"Code Signed\" by Apple or Microsoft.\n\n**We assure you that this project is 100% safe.** This tool is endorsed, featured, and used by **Cando Academy (Cando.ac)**, one of the top IT training centers in the country. The full source code is also available in this repository for complete transparency.\n\n### **How to Bypass the Security Warning?**\n\n  * **On Windows (Windows Defender SmartScreen):**\n\n    1.  When the blue \"Windows protected your PC\" dialog appears, click on **'More info'**.\n    2.  A new button, **'Run anyway'**, will appear at the bottom. Click it to run the application.\n\n  * **On macOS (Gatekeeper):**\n\n    1.  If you get a warning that \"ccg-macos cannot be opened because it is from an unidentified developer,\" go to **System Settings \\> Privacy & Security**.\n    2.  Scroll down, and you will see a message about \"ccg-macos\". Click the **'Open Anyway'** button.\n    3.  *Alternatively:* **Right-click** the `ccg-macos` file, select **'Open'** from the context menu, and then click **'Open'** in the confirmation dialog.\n\n  * **On Linux:**\n\n    1.  You usually won't get a security warning, but you must make the file executable.\n    2.  Run the following command in your terminal: `chmod +x ./ccg-linux`\n\n-----\n\n⚙️ **How to Use**\n\n**Command Summary**\n\n| Command | Alias | Description |\n|---|---|---|\n| `generate <request>` | `g` | Generate command suggestions |\n| `script <request>` | `s` | Generate a full script |\n| `analyze <command>` | `a` | Understand what a command does |\n| `error <message>` | `e` | Help with an error message |\n| `compare <fileA> <fileB>` | `c` | Smart AI code compare |\n| `history` | `h` | Show recently generated items |\n| `feedback` | `f` | Provide feedback on the tool |\n| `config [action]` | | Manage settings (show, set, wizard) |\n| `update` | | Update CCG to the latest version |\n\n**1. Generate Commands (g)**\nStuck? Just ask.\n\n```bash\n# Get a simple FortiGate command for a beginner\nccg g \"show system interface\" --os fortigate --level beginner\n\n# Get an advanced command to find large files on Linux for an expert\nccg g \"find all files larger than 1GB\" --os ubuntu --level expert\n```\n\n**2. Create Scripts (s)**\nAutomate complex tasks instantly.\n\n```bash\n# Create a robust Cisco script to configure OSPF on a router\nccg s \"configure ospf with process id 1 and advertise 192.168.1.0/24 for area 0\" --os cisco --device router\n\n# Create a Bash script to back up a directory\nccg s \"create a backup of /etc/nginx\"\n```\n\n**3. Compare Code (c)**\nUnderstand changes between two files with AI.\n\n```bash\n# Compare two versions of a script\nccg compare ./old_script.py ./new_script.py\n```\n\n💻 **Web Version**\nPrefer a graphical interface? Use the web version instantly without any installation.\n→ [https://ccg.cando.ac/](https://ccg.cando.ac/)\n\nThe web version includes all features, including **Command Generation** and the new **Smart Code Compare** interface.\n\n-----\n\n## 🧑‍💻 About the Creator\n\nI'm **Amirhossein Yavari**, an IT enthusiast passionate about building helpful tools that simplify complex tasks. CCG is one of my personal projects designed to bridge the gap between natural language and the command line — making terminal usage faster, safer, and more accessible for everyone. This project is now proudly part of the Cando Academy toolkit.\n\n-----\n\n## ❓ Frequently Asked Questions (FAQ)\n\n**Q1: Is CCG safe and private?**\nYes. Both the web app and CLI send your prompts to the Cando server (`ccg.cando.ac`), which securely proxies the request to an upstream AI provider (like OpenAI) or a local model. **Your prompts are not stored.**\n\n**Q2: Can I use CCG without installing it?**\nAbsolutely\\! Visit the **web version** at [https://ccg.cando.ac/](https://ccg.cando.ac/) to use all core features instantly—no installation required.\n\n**Q3: How do I use the new network device support?**\nIn the CLI, use `--os cisco`, `--os mikrotik`, or `--os fortigate`. In the web app, select them from the \"Platform / OS\" dropdown menu. For Cisco, you can also specify `--device <type>` (router, switch, or firewall).\n\n**Q4: How does the Knowledge Level feature work?**\nSpecify your expertise (`beginner`, `intermediate`, or `expert`) using the `--level` flag in the CLI or the dropdown in the web app. The AI will adjust the complexity, explanation, and style of its response accordingly.\n\n**Q5: What platforms does CCG support?**\nCCG supports Windows (PowerShell, CMD), macOS (Bash, Zsh), Linux (Bash, Zsh), **Cisco** (CLI), **MikroTik** (CLI), and **FortiGate** (CLI).\n\n-----\n\n📜 **License**\nThis project is protected by an exclusive **Proprietary License Agreement**.\nCopyright (c) 2024 Amirhossein Yavari & Cando Academy. All Rights Reserved.\n\nUse is granted free of charge for personal, educational, research, and internal non-commercial operations. Commercial use, modification, and redistribution are strictly prohibited without a separate written agreement.\n\nSee the `LICENSE` file for full terms and contact details for commercial licensing.\n\n```\n```\n","readmeFilename":"README.md"}