Skip to main content

llmdo

llmdo is a Python application that leverages Large Language Models (LLMs) to translate English requests into shell commands. It provides a convenient way to interact with your system using natural language.

Features

  • Translates English requests into corresponding shell commands
  • Supports multiple LLMs for command generation
  • Customizable configuration file
  • Verbose mode for debugging
  • YOLO mode for running commands without confirmation

Installation

pip install llmdo

Usage

llmdo uses OpenAI, Claude, and local LLM APIs to generate shell commands based on the user's requests. For OpenAI and Claude, you will need to have an API key to use this tool.

To use llmdo, run the following command followed by your request:

llmdo [options] <request>

Options

  • -h, --help: Show the help message and exit.
  • -c CONFIG, --config CONFIG: Specify the path to the configuration file. Default is ~/.config/llmdo/llmdo.json.
  • -l, --list-models: List the available LLMs.
  • -m MODEL, --model MODEL: Specify which LLM to use for command generation.
  • -v, --verbose: Print verbose debug information.
  • -y, --yolo: Run the generated command without confirmation.

Examples

  1. Translate a request to a shell command:
llmdo "list all files in the current directory"
  1. Use a specific LLM for command generation:
llmdo -m gpt-3.5-turbo "find all Python files in the project"
  1. Run the generated command without confirmation:
llmdo -y "delete all temporary files"

Configuration

The configuration file for llmdo is located at ~/.config/llmdo/llmdo.json by default. You can specify a different path using the -c or --config option.

The configuration file allows you to customize the behavior of llmdo, such as specifying the default LLM, setting API keys, and defining custom aliases.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the GPLv3.

Disclaimer

llmdo is an experimental tool that relies on LLMs for generating shell commands. While it can be helpful, it's important to review and understand the generated commands before executing them, especially when using the YOLO mode. The developers are not responsible for any damages or unintended consequences resulting from the use of this tool.

This project is not affiliated with OpenAI, Claude, or my employer in any way. It is an independent project created for educational and research purposes.

Metadata

Release files for llmdo 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 llmdo 0.2.1
File Size Uploaded
llmdo-0.2.1.tar.gz 22.7 kB Details

Release files / llmdo-0.2.1.tar.gz

Download URL llmdo-0.2.1.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6614b9690e3e3b66c513e4e914cb14916f545f9ec9a11ea113ebcacb0048a7ea
BLAKE2b-256 checksum
How to use checksums
982c4022be64e60e746775a5d89eb6f77f1e46b44b89ebed586b6734ee1092d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file

0.2.0

1 release file

0.1.0

1 release file

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