iCMD is a local AI-powered command-line assistant that turns natural language prompts into Linux shell commands, runs the generated command, and prints the result back to your terminal.
It uses a fine-tuned Qwen-based GGUF model hosted on Hugging Face and runs inference fully locally by downloading the appropriate llama-cli executable for your operating system.
- Converts plain-English requests into bash commands using a fine-tuned local model
- Executes commands directly from the CLI with a simple
icmd "..."interface - Downloads the fine-tuned model and appropriate
llama-cliexecutable automatically on first run - Runs fully locally using
llama-cliand GGUF weights - Includes basic safety blocking for dangerous commands and shell operators
- Works offline without a hosted LLM API after the first run downloads
icmd "list all files in this directory"
icmd "print the current working directory"
icmd "show hidden files"
icmd --authorExample output:
$ icmd "print the current working directory"
/home/your_root_directoryBefore using iCMD, make sure the target system has:
- Python 3.8 or newer
pip,uv, orpipxfor installation- Network access on first run so
iCMDcan download the fine-tuned model and execution binary. - A Linux, macOS, or Windows environment.
iCMD uses the fine-tuned model published at:
MSDeepak718/qwen-icmd
The downloaded model file is:
qwen-icmd-q4.ggufOn first run, iCMD downloads the model to:
~/.icmd_model/qwen-icmd-q4.gguf
After that, inference runs locally using the llama-cli executable, which is also downloaded dynamically based on your operating system.
For CLI tools, uv tool install is the cleanest option:
uv tool install icmd-cliAfter installation:
icmd "list all files"To upgrade later:
uv tool upgrade icmd-clipipx install icmd-cli- You pass a natural-language prompt to
icmd. - If needed, the app downloads the fine-tuned GGUF model from Hugging Face.
- The app runs the prompt locally through the dynamically downloaded
llama-clibinary. - The command is cleaned and checked against a small denylist of dangerous commands and shell symbols.
- If the command is allowed,
iCMDexecutes it and prints the output.
iCMD includes basic filtering, but it should still be treated as a developer tool and used carefully.
The current safety layer blocks commands involving items such as:
- destructive filesystem tools like
rmandmkfs - privilege escalation commands like
sudoandsu - remote/network-oriented commands like
curl,wget,scp, andssh - shell operators such as
;,|,&, and output redirection
This is a simple safety layer, not a security sandbox.
Run a natural-language request:
icmd "your query"Print the package author:
icmd --authorIf no argument is provided, the CLI shows:
Usage: icmd "your query"icmd/
├── executor.py
├── llm.py
├── main.py
├── safety.py
└── utils.py
pyproject.toml
README.md
Your system Python is managed by the OS. Use a virtual environment, uv, or pipx instead of installing globally with pip.
This is expected. iCMD downloads the fine-tuned model the first time you use it.
Make sure you have working network access and that Hugging Face is reachable from your machine.
If icmd fails to download the llama-cli binary on the first run, make sure your internet connection is active, or download it manually and place it in ~/.icmd_model/bin/.
Check that:
~/.icmd_model/qwen-icmd-q4.gguf
- the model file exists locally in
~/.icmd_model/ - the installed package version is the latest one you published
- the
llama-clibinary was successfully downloaded to~/.icmd_model/bin/
Built with ❤️ By Deepak Karthick