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.
  • Web Search Integration: Perform real-time web searches to gather relevant information or troubleshoot issues directly from the tool.

[!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.2.0.tar.gz (103.7 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.2.0-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wtf_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ffa59cf04bda26511c3243054b2c99fce8148ed8fbf154437848311bdd5b5cf1
MD5 fe9b52cf9bf565bba2c70c9c81cd3a77
BLAKE2b-256 f304641d057eed756b67ebb6852ea7a48088049d9f989ea65eac60cb3c1803a9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wtf_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 548303f8ea9d8d9fce617fc974b6cc11cd8a7197a9e8387313554787dac792b5
MD5 98a84ef519e798351e4eb5496a4b4d98
BLAKE2b-256 a98c3bde4fafe146e5136df979dfc06701a581973808d72ec5f978012c2bf3ff

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