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.2.tar.gz (78.5 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.2-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wtf_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a598c5e602a4cc356939f1f2dcb17c124ef41fea615d43868052c3fc815c6f71
MD5 5a26309bfd6d33e0ab494b85c8feaaa5
BLAKE2b-256 109c8d568697ca748ae09f9ae8b57b275a1ec57ce3eda025d3f94a231edb8883

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wtf_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3ddab7dbd2e49b20fa8f2546c323448c8aec50fa28cc971d50e1b0699ff1d58f
MD5 12d54e16a14f69cc84be9f129c47e887
BLAKE2b-256 f1eca798c50d3cccb144bd1f3e38e86cfc51b53703cd234b4c724079b03a9a48

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