Skip to main content

iCMD

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.

Features

  • 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-cli executable automatically on first run
  • Runs fully locally using llama-cli and GGUF weights
  • Includes basic safety blocking for dangerous commands and shell operators
  • Works offline without a hosted LLM API after the first run downloads

Usage Examples

icmd "list all files in this directory"
icmd "print the current working directory"
icmd "show hidden files"
icmd --author

Example output:

$ icmd "print the current working directory"
/home/your_root_directory

Requirements

Before using iCMD, make sure the target system has:

  • Python 3.8 or newer
  • pip, uv, or pipx for installation
  • Network access on first run so iCMD can download the fine-tuned model and execution binary.
  • A Linux, macOS, or Windows environment.

Fine-Tuned Model

iCMD uses the fine-tuned model published at:

MSDeepak718/qwen-icmd

The downloaded model file is:

qwen-icmd-q4.gguf

On 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.

Installation

Install from PyPI with uv

For CLI tools, uv tool install is the cleanest option:

uv tool install icmd-cli

After installation:

icmd "list all files"

To upgrade later:

uv tool upgrade icmd-cli

Install with pipx

pipx install icmd-cli

How It Works

  1. You pass a natural-language prompt to icmd.
  2. If needed, the app downloads the fine-tuned GGUF model from Hugging Face.
  3. The app runs the prompt locally through the dynamically downloaded llama-cli binary.
  4. The command is cleaned and checked against a small denylist of dangerous commands and shell symbols.
  5. If the command is allowed, iCMD executes it and prints the output.

Safety Notes

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 rm and mkfs
  • privilege escalation commands like sudo and su
  • remote/network-oriented commands like curl, wget, scp, and ssh
  • shell operators such as ;, |, &, and output redirection

This is a simple safety layer, not a security sandbox.

CLI Reference

Run a natural-language request:

icmd "your query"

Print the package author:

icmd --author

If no argument is provided, the CLI shows:

Usage: icmd "your query"

Project Structure

icmd/
├── executor.py
├── llm.py
├── main.py
├── safety.py
└── utils.py
pyproject.toml
README.md

Troubleshooting

externally-managed-environment

Your system Python is managed by the OS. Use a virtual environment, uv, or pipx instead of installing globally with pip.

The first run takes time

This is expected. iCMD downloads the fine-tuned model the first time you use it.

Model download fails

Make sure you have working network access and that Hugging Face is reachable from your machine.

llama-cli download fails

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/.

The package installs but icmd fails at runtime

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-cli binary was successfully downloaded to ~/.icmd_model/bin/

Author

Built with ❤️ By Deepak Karthick

Metadata

Release files for icmd-cli 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for icmd-cli 0.2.1
File Size Uploaded Provenance Actions
icmd_cli-0.2.1.tar.gz 6.9 kB Without provenance Details for icmd_cli-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for icmd-cli 0.2.1
File Interpreter ABI Platform Actions
icmd_cli-0.2.1-py3-none-any.whl Python 3 none any Details for icmd_cli-0.2.1-py3-none-any.whl

Total release size: 14.7 kB

Release files / icmd_cli-0.2.1.tar.gz

Download URL icmd_cli-0.2.1.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4fd3e425a7c0cdec0ef033541c8de6be5601899eda78cacd1287573e6177e9a4
BLAKE2b-256 checksum
How to use checksums
e6db6aff022827e1047d6b29231f836975a755f4d041fc897d5538333fe8fa19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / icmd_cli-0.2.1-py3-none-any.whl

Download URL icmd_cli-0.2.1-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c10b4d20cab1cda4fdd3d4e4b396f01bebd0b35780cc26d5235a1eaebac5c4af
BLAKE2b-256 checksum
How to use checksums
8f8d6d9e1bce482a6fb0b9e00795ba3f4df4eb243b5a8739de60a998a9753ff4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for icmd-cli 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page