Skip to main content

WTF is a command-line tool that leverages LLMs to correct and enhance previously executed terminal commands.

Project description

Test wtf PyPI PyPI - Python Version GitHub

WhatTheFuck

WhatTheFuck is a command-line tool that leverages LLMs to correct and enhance previously executed terminal commands. Inspired by wut and The Fuck, it’s designed to save your time and sanity by fixing errors, summarizing logs, and more.

Example

$ (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.

[!NOTE] WTF utilizes script(Unix) to log and analyze the previously executed command.

Installation

$ pip install wtf-cli
# or
$ uv add wtf-cli
# or
$ poetry add wtf-cli

Versioning

This repo uses Semantic Versioning.

License

WhatTheFuck is released under the MIT License. See LICENSE for additional details.

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

wtf_cli-0.1.0.tar.gz (77.8 kB view details)

Uploaded Source

Built Distribution

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

wtf_cli-0.1.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file wtf_cli-0.1.0.tar.gz.

File metadata

  • Download URL: wtf_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 77.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for wtf_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9ce13c54358aec708f989b35fe49bbc08ae7770fdbab2383d7b699b1692cf630
MD5 fa4f7d526ecc96dda51a1a9439a4966c
BLAKE2b-256 4085975d33f988deded507bec5e6039c0b8a6d0614fd0972ba1cbaffe007a6f9

See more details on using hashes here.

File details

Details for the file wtf_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: wtf_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for wtf_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 efa36318f005b490a1d7750c426361a46a291cc1805dced08b4757a8d2895c13
MD5 febf40264848bfcc4dde6039c4c12cef
BLAKE2b-256 7c2dc7d71f3766e7cf7224601636746856a50a107aaf9d042c166fd826e3cebc

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