Metadata-Version: 2.4
Name: wtf-cli
Version: 0.2.0
Summary: WTF is a command-line tool that leverages LLMs to correct and enhance previously executed terminal commands. 
Project-URL: Homepage, https://github.com/Asugawara/WhatTheFuck
Project-URL: Repository, https://github.com/Asugawara/WhatTheFuck
Author-email: Asugawara <asgasw@gmail.com>
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: anthropic-haystack>=1.2.1
Requires-Dist: google-vertex-haystack>=4.0.1
Requires-Dist: haystack-ai>=2.8.0
Requires-Dist: logzero>=1.7.0
Requires-Dist: pyte>=0.8.2
Requires-Dist: requests-html-playwright>=0.13.0
Requires-Dist: rich>=13.9.4
Requires-Dist: trafilatura>=2.0.0
Description-Content-Type: text/markdown

[![Test wtf](https://github.com/Asugawara/WhatTheFuck/actions/workflows/run_test.yml/badge.svg)](https://github.com/Asugawara/WhatTheFuck/actions/workflows/run_test.yml)
![PyPI](https://img.shields.io/pypi/v/wtf-cli?color=green)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/wtf-cli)
![GitHub](https://img.shields.io/github/license/Asugawara/WhatTheFuck)

# WhatTheFuck

**WhatTheFuck** is a command-line tool that leverages LLMs to correct and enhance previously executed terminal commands. Inspired by [`wut`](https://github.com/shobrook/wut) and [`The Fuck`](https://github.com/nvbn/thefuck), it’s designed to save your time and sanity by fixing errors, summarizing logs, and more.

# Example
```bash
$ (wtf): git brnch
git: 'brnch' is not a git command. See 'git --help'.

The most similar command is
	branch
$ (wtf): wtf
The error message indicates that 'brnch' is not recognized as a valid Git command. The correct command is 'branch', which is likely what you intended to use to list, create,
or delete branches in your repository. The suggestion for 'branch' highlights this common typo. To avoid such errors, ensure command spelling is accurate.
Run `git branch`? [y/N]: y
* main
```
※LLM's streamed outputs are omitted for simplicity

# Features

- **LLM Switching**: Easily switch between different llms.(OpanAI, Anthropic, Vertex)
- **Instant Command Fixes**: Detect and fix incorrect terminal commands effortlessly.
- **One-Click Execution**: Run corrected commands seamlessly.
- **Log Summarization**: Summarize logs from previous terminal commands for quick insights.
- **Web Search Integration**: Perform real-time web searches to gather relevant information or troubleshoot issues directly from the tool.

> [!NOTE]
> WTF utilizes [`script(Unix)`](https://en.wikipedia.org/wiki/Script_(Unix)) to log and analyze the previously executed command.

# Installation
```bash
$ pip install wtf-cli
# or
$ uv add wtf-cli
# or
$ poetry add wtf-cli
```



# Versioning
This repo uses [Semantic Versioning](https://semver.org/).

# License
**WhatTheFuck** is released under the MIT License. See [LICENSE](/LICENSE) for additional details.
