{"id":20806091,"url":"https://github.com/nowayhecodes/wtf","last_synced_at":"2026-04-19T21:08:03.580Z","repository":{"id":261620875,"uuid":"884844157","full_name":"nowayhecodes/wtf","owner":"nowayhecodes","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-08T12:24:37.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-26T09:58:11.385Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nowayhecodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-07T13:46:23.000Z","updated_at":"2024-11-08T05:55:25.000Z","dependencies_parsed_at":"2025-03-12T03:30:58.334Z","dependency_job_id":"bd49ea4a-c15c-45ff-9c1b-f4adf7bf4c35","html_url":"https://github.com/nowayhecodes/wtf","commit_stats":null,"previous_names":["nowayhecodes/wtf"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nowayhecodes/wtf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowayhecodes%2Fwtf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowayhecodes%2Fwtf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowayhecodes%2Fwtf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowayhecodes%2Fwtf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nowayhecodes","download_url":"https://codeload.github.com/nowayhecodes/wtf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowayhecodes%2Fwtf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32022604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T19:18:08.270Z","updated_at":"2026-04-19T21:08:03.562Z","avatar_url":"https://github.com/nowayhecodes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## WTF\n\nA blazing fast command-line tool that automatically detects errors in previously executed console commands, suggests corrections, and provides an option to re-execute the corrected commands.\n\n### Features\n\n- 🚀 **Blazing Fast**: Reads only the last command from history without scanning the entire file\n- 🎯 **Smart Suggestions**: Provides intelligent corrections for common typos and mistakes\n- 🔄 **Quick Re-execution**: Re-run corrected commands with a simple confirmation\n- ⚙️ **Customizable**: Define your own correction rules via configuration\n- 🛡️ **Safe**: Asks for confirmation before executing any corrected command\n- 🔌 **Shell Support**: Works with bash, zsh, and other common shells\n\n### Installation\n\n```bash\ngo install github.com/nowayhecodes/wtf@latest\n```\n\nOr quickly install using the install script:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/nowayhecodes/wtf/main/install.sh | sh\n```\n\nOr build from source:\n\n```bash\ngit clone https://github.com/nowayhecodes/wtf.git\ncd wtf\ngo build -o bin/wtf cmd/wtf/main.go\n```\n\n### Usage\n\nAfter a failed command, simply run:\n\n```bash\nwtf\n```\n\nThe tool will:\n1. Detect the last failed command\n2. Suggest a correction\n3. Execute the corrected command with your confirmation\n\n#### Examples\n\n```bash\n$ gti status\ngit: command not found\n\n$ wtf\nDid you mean: git status? [Y/n] y\n# Executes: git status\n```\n\n```bash\n$ grpe \"pattern\" file.txt\ngrpe: command not found\n\n$ wtf\nDid you mean: grep \"pattern\" file.txt? [Y/n] y\n# Executes: grep \"pattern\" file.txt\n```\n\n### Configuration\n\nCreate a `.wtf.json` file in your home directory:\n\n```json\n{\n    \"customRules\": {\n        \"gti\": \"git\",\n        \"sl\": \"ls\"\n    },\n    \"shellType\": \"bash\",\n    \"maxSuggestions\": 3,\n    \"levenThreshold\": 2\n}\n```\n\n#### Configuration Options\n\n- `customRules`: Map of custom corrections\n- `shellType`: Your shell type (bash, zsh)\n- `maxSuggestions`: Maximum number of suggestions to show\n- `levenThreshold`: Maximum edit distance for suggestions\n\n### Development\n\nRequirements:\n- Go 1.22 or newer\n- Make or Task (for build automation)\n\nSetup:\n\n```bash\n# Clone the repository\ngit clone https://github.com/nowayhecodes/wtf.git\n\n# Install dependencies\ngo mod download\n\n# Run tests\ngo test ./...\n\n# Build\ntask build\n```\n\n### Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n### Acknowledgments\n\n- Inspired by various command-line tools that improve developer productivity\n\n### Author\n\n[@nowayhecodes](https://github.com/nowayhecodes)\n\n### Support\n\nIf you like this project, please give it a ⭐️!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowayhecodes%2Fwtf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnowayhecodes%2Fwtf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowayhecodes%2Fwtf/lists"}