Metadata-Version: 2.1
Name: llm-complete-command
Version: 2.2.0
Summary: Use LLM to generate commands for your shell
Author: Ryan Patterson, Scott Hyndman
License: Apache-2.0
Classifier: License :: OSI Approved :: Apache Software License
Project-URL: Homepage, https://github.com/shyndman/llm-complete-command
Project-URL: Changelog, https://github.com/shyndman/llm-complete-command/releases
Project-URL: Issues, https://github.com/shyndman/llm-complete-command/issues
Requires-Dist: better-exceptions>=0.3.3
Requires-Dist: llm
Requires-Dist: loguru>=0.7.3
Requires-Dist: platformdirs>=4.5.1
Requires-Dist: prompt_toolkit>=3.0.43
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: yaspin>=3.4.0
Description-Content-Type: text/markdown

# Shell completion using LLM

Use LLM to generate and execute commands in your shell.

https://github.com/user-attachments/assets/c10d7a0f-48c3-4904-bb1b-4a1ce9f9ff8d

## Installation

Install this plugin in the same environment as [LLM](https://llm.datasette.io/).
```bash
llm install llm-complete-command
```
Then install the shell integration for your preferred shell.

- **Fish**: place `share/llm-complete-command.fish` in `~/.config/fish/conf.d/`.
- **Zsh**: source `share/llm-complete-command.zsh` in your `~/.zshrc`.
- **Bash**: source `share/llm-complete-command.bash` in your `~/.bashrc`.

## Usage

1. Start typing a command.
2. Activate the key binding (Alt-Backslash by default).
3. Wait for the LLM to complete the command.
4. Press enter if you are happy. Otherwise give feedback on the command and repeat from step 3.
5. The LLM's command replaces the previous command you were writing.

Neat ways you can use this feature:

- **Type a command in English, convert it to bash.**<br />
  `find all files larger than 100MB`<br />
  🪄 `find . -type f -size +100M`
- **Give extra instructions as comments.**<br />
  `sed -i '' 's/search/replace/g' file.go # Now do it for all go files in the project`<br />
  🪄 `find . -name '*.go' -exec sed -i '' 's/search/replace/g' {} +`

## Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

```bash
cd llm-cmd
python3 -m venv venv
source venv/bin/activate
```

Now install the dependencies and test dependencies:

```bash
pip install llm
llm install -e .
```
