Generate and execute shell commands using AI models via Ollama
Project description
qcmd - AI-powered Command Generator
A simple command-line tool that generates shell commands using local AI models via Ollama.
Version 1.0.12
Overview
qcmd is a powerful command-line tool that generates shell commands using AI language models via Ollama. Simply describe what you want to do in natural language, and qcmd will generate the appropriate command.
Key Features
- Natural Language Inputs: Describe what you want to do in plain English
- Auto-fix Mode: Automatically fixes failed commands and retries
- AI Error Analysis: Explains errors and suggests solutions
- Interactive Shell: Continuous operation with command history
- Multiple Models: Works with any Ollama model (default: qwen2.5-coder:0.5b)
- Safety First: Always asks for confirmation before executing any command
- Log Analysis: Find and analyze system log files with real-time monitoring
Installation
Prerequisites
- Python 3.6 or higher
- Ollama installed and running
- At least one language model pulled (e.g., qwen2.5-coder:0.5b)
Install from PyPI
pip install ibrahimiq-qcmd
Make sure Ollama is running before using qcmd:
ollama serve
Basic Usage
# Generate and confirm a command
qcmd "list all files in the current directory"
# Auto-execute mode
qcmd -e "find large log files"
# Smart auto-fix mode
qcmd -A "find Python files modified today"
# Interactive shell
qcmd -s
What's New in 1.0.12
- Add support for customizing the UI elements via config and command-line flags
- Add banner font customization with support for all pyfiglet fonts
- Add progress bar customization options
- Add compact mode for minimal output
- Switch to JSON-based configuration storage for better flexibility
- Add command-line flags for quick UI customization:
--banner-font FONT- Set the banner font (e.g., starwars, doom, colossal)--no-banner- Disable the Iraq banner--no-progress- Disable progress animations--compact- Enable compact mode for minimal output
- Add new configuration options:
ui.banner_font- The font to use for the Iraq banner (any pyfiglet font)ui.show_progress_bar- Whether to show the progress barui.progress_delay- Control speed of progress animation
What's New in 1.0.11
- Add monitoring persistence across processes
- Improve error handling for monitor processes
- Add cleanup functionality for stale monitors
- Add status command to show active monitors
- Implement session tracking for interactive shells
- Fix bugs with log monitoring and watching
What's New in 1.0.10
- Added ability to toggle AI analysis on/off while monitoring logs (press 'a' key)
- Enhanced
/watchcommand to list all available log files when no path is provided - Enhanced
/monitorcommand to list all available log files when no path is provided - Added
/statuscommand and--statusflag to show system and QCMD status - Improved real-time log watching with keyboard control (press 'q' to quit, 'a' to toggle analysis)
- Added tracking of active log monitors and sessions
What's New in 1.0.9
- Added
--watchoption to monitor log files without AI analysis - Added
/watchcommand to interactive shell - Improved log monitoring functionality with separate watching and analysis modes
- Enhanced user experience with more file monitoring options
- Added ability to view log updates in real-time (like
tail -f)
What's New in 1.0.8
- Fixed shell mode bug on macOS and Python 3.12+
- Improved interactive shell functionality
- Fixed missing temperature parameter issue
- Enhanced user experience in interactive mode
What's New in 1.0.7
- Fixed compatibility with Python 3.12+ by removing pkg_resources dependency
- Improved version detection using Python standard library (importlib.metadata)
- Removed external dependency requirements for better cross-version compatibility
- Enhanced installation reliability across all Python versions
- Simplified update checking mechanism
What's New in 1.0.6
- Initial attempt at fixing Python 3.12+ compatibility issues
- Updated documentation for better clarity
- Minor code improvements
What's New in 1.0.5
- Implemented improved release automation workflow
- Enhanced package publishing process
- Updated GitHub Actions configuration
- Streamlined deployment process
- Documentation improvements for contributors
What's New in 1.0.4
- Fixed undefined variable errors in interactive shell and auto mode
- Improved error handling and command detection for dangerous operations
- Streamlined GitHub Actions workflow for Python 3.10 and 3.11
- Enhanced compatibility with continuous integration systems
- Fixed tab completion issues in interactive shell
What's New in 1.0.3
- Updated documentation with improved installation instructions
- Fixed package structure for better compatibility
- Added PyPI integration for easier installation
What's New in 1.0.2
- Fixed undefined variable errors in interactive shell and auto mode
- Improved error handling and command detection for dangerous operations
- Streamlined GitHub Actions workflow for Python 3.10 and 3.11
- Enhanced compatibility with continuous integration systems
- Fixed tab completion issues in interactive shell
What's New in 1.0.1
- Updated documentation with improved installation instructions
- Fixed package structure for better compatibility
- Added PyPI integration for easier installation
Release Notes
1.0.11
- Added color customization to personalize terminal output
- Added Iraq-themed banner and customizable UI settings
- Added
/configcommand to interactively manage settings - Added
--configargument for command-line configuration
1.0.10
- Fixed command-line argument handling to properly support utility commands like
--monitor,--watch, and--statuswithout requiring a prompt. - Improved monitor persistence tracking to show correct status across processes.
Full Documentation
For full documentation and source code, visit the GitHub repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ibrahimiq_qcmd-1.0.12.tar.gz.
File metadata
- Download URL: ibrahimiq_qcmd-1.0.12.tar.gz
- Upload date:
- Size: 33.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b6be98ab157e5700a16bc008c904a16668ea654be0030172a89408d4edb45a2
|
|
| MD5 |
bc1b83efab3649b0f6b25c9e6cab0b3e
|
|
| BLAKE2b-256 |
929e0319e4d20f1cf8874932e54b66f16c9f0b6cbc203defece3aa84dab8dcd1
|
File details
Details for the file ibrahimiq_qcmd-1.0.12-py3-none-any.whl.
File metadata
- Download URL: ibrahimiq_qcmd-1.0.12-py3-none-any.whl
- Upload date:
- Size: 31.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
629c7757a3b5d6416a6cdb43c81062766e29e62bf6ba7312f879370dd3c60b32
|
|
| MD5 |
b37580a9738d14297661990876ca6a6e
|
|
| BLAKE2b-256 |
57d1c0b2bdd03a4d33239ea920005c2ea3d608c9ba0202c7b960c7139cb9af1a
|