Skip to main content

A shell interface for MLX models

Project description

querysh

A command-line interface that uses local, offline AI to help you write and execute shell commands. Powered by MLX-optimized Llama 3.2 1B Instruct model running entirely on your machine.

Features

  • Natural language to shell command conversion
  • Command validation and safety checks
  • Interactive command execution
  • Rich terminal interface
  • Support for command suggestions and modifications
  • Fully local and offline operation using MLX-optimized Llama 3.2 1B Instruct model
  • No internet connection or API keys required

Installation

Requirements

  • Python 3.8 or higher
  • macOS (for MLX support)

Dependencies

  • mlx-lm>=0.0.6
  • rich>=13.7.0

Install from PyPI

pip install querysh

Install from source

git clone https://github.com/pabl0cesar/querysh.git
cd querysh
pip install -e .

Usage

Simply run the querysh command in your terminal:

querysh

Then describe what you want to do in natural language. For example:

  • "List all files in the current directory"
  • "Find all Python files modified in the last week"
  • "Create a backup of my documents folder"

The AI will suggest appropriate shell commands, and you can choose to execute them or modify them.

Development

Setup

  1. Clone the repository:
git clone https://github.com/pabl0cesar/querysh.git
cd querysh
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install development dependencies:
pip install -e ".[dev]"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

querysh-0.1.7.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

querysh-0.1.7-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file querysh-0.1.7.tar.gz.

File metadata

  • Download URL: querysh-0.1.7.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for querysh-0.1.7.tar.gz
Algorithm Hash digest
SHA256 ff571bf931cb2888bfbba4b88f91511899c173d969176f9e8d516bc364925ea6
MD5 e739aee7fd450565a38784f0c7212adf
BLAKE2b-256 6e681a4ea17fa4cbed40d8ceb553a0b5e9d5d7fedc7d75b294edcaf76f5e9ee0

See more details on using hashes here.

File details

Details for the file querysh-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: querysh-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for querysh-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9882ab8a36ead5ed4c1b058e9d2ce5e6c80ac5cf884b7efaca4b0d329e9f3bfc
MD5 89b29209e4a9426a595f4d1e8c7508f8
BLAKE2b-256 a6e75285c20ca79086fab12a89c32be0858b2d317de1b6104a5ca14b576bbabe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page