{"id":15287571,"url":"https://github.com/iffse/pay-respects","last_synced_at":"2026-04-24T23:01:28.476Z","repository":{"id":184884626,"uuid":"672605495","full_name":"iffse/pay-respects","owner":"iffse","description":"Command suggestions, command-not-found and thefuck replacement written in Rust","archived":false,"fork":false,"pushed_at":"2026-02-02T13:53:03.000Z","size":578,"stargazers_count":512,"open_issues_count":18,"forks_count":26,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-03T02:54:37.852Z","etag":null,"topics":["artificial-intelligence","bash","cli","command-line-tool","fish","nushell","powershell","productivity","quality-of-life","rust","shell","zsh"],"latest_commit_sha":null,"homepage":"https://codeberg.org/iff/pay-respects","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iffse.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["iffse"],"ko_fi":"iffse","liberapay":"iff"}},"created_at":"2023-07-30T16:43:42.000Z","updated_at":"2026-02-02T13:53:08.000Z","dependencies_parsed_at":"2023-09-26T11:03:26.346Z","dependency_job_id":"d9da5641-8117-4237-80d0-0767a82e312b","html_url":"https://github.com/iffse/pay-respects","commit_stats":{"total_commits":153,"total_committers":3,"mean_commits":51.0,"dds":"0.013071895424836555","last_synced_commit":"6f9b0c3369347bf09e6a12644282b18ce49ebe65"},"previous_names":["iffse/pay_respect"],"tags_count":70,"template":false,"template_full_name":null,"purl":"pkg:github/iffse/pay-respects","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iffse%2Fpay-respects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iffse%2Fpay-respects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iffse%2Fpay-respects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iffse%2Fpay-respects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iffse","download_url":"https://codeload.github.com/iffse/pay-respects/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iffse%2Fpay-respects/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29218769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T02:25:35.815Z","status":"ssl_error","status_checked_at":"2026-02-08T02:24:27.970Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["artificial-intelligence","bash","cli","command-line-tool","fish","nushell","powershell","productivity","quality-of-life","rust","shell","zsh"],"created_at":"2024-09-30T15:31:42.389Z","updated_at":"2026-04-24T23:01:28.468Z","avatar_url":"https://github.com/iffse.png","language":"Rust","funding_links":["https://github.com/sponsors/iffse","https://ko-fi.com/iffse","https://liberapay.com/iff","https://liberapay.com/iff/donate","https://www.paypal.com/donate/?hosted_button_id=QN7Z7ZHRAAFZL"],"categories":["Rust","Awesome Tools"],"sub_categories":["Terminal Tools"],"readme":"# Pay Respects\n\nTyped a wrong command or don't know what to do? Pay Respects will suggest a fix to your console command by simply pressing `F`!\n\n- 🚀 **Blazing fast suggestion**: Sub-millisecond (\u003c1ms) performance! See\n[benchmarks](#benchmarks).\n- 🎯 **Accurate results**: Suggestions are verified before being prompted to\nthe user, no `sudo` suggestions when you are using `doas`!\n- ✏️ **Easy to write rules**: You don't need to know Rust. The rules are\nwritten in a TOML format that gets parsed into Rust code!\n- 🦀 **Full Rust capability**: Raw Rust code can be used if TOML rules are not\nenough for complex situations!\n- 🔩 **Modular**: TOML and Rust not your taste? Add sources using your favorite\nlanguage with a custom module!\n- 🤖 **AI Support**: AI module comes in aid when there is no rule for your\nerror!\n- 🪶 **Tiny binary size**: Not even 1MB for core features!\n\n![showcase](https://raw.githubusercontent.com/iffse/static-assets/refs/heads/main/pay-respects/showcase.gif)\n\n## How to Pay Respects\n\nPlease follow the instruction for your shell:\n\n\u003cdetails\u003e\n\t\u003csummary\u003eBash / Zsh / Fish\u003c/summary\u003e\n\n\u003e Append the following line to your configuration file (`--alias` no longer\n\u003e required for v0.7+):\n\u003e ```sh\n\u003e eval \"$(pay-respects bash --alias)\"\n\u003e eval \"$(pay-respects zsh --alias)\"\n\u003e pay-respects fish --alias | source\n\u003e ```\n\u003e Arguments:\n\u003e - `--alias [alias]`: Alias to a custom key, defaults to `f`\n\u003e - `--nocnf`: Disables `command_not_found` handler\n\n\u003e Manual aliasing (**REMOVED** after v0.7):\n\u003e ```sh\n\u003e alias f=\"$(pay-respects bash)\"\n\u003e alias f=\"$(pay-respects zsh)\"\n\u003e alias f=\"$(pay-respects fish)\"\n\u003e ```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003eNushell\u003c/summary\u003e\n\n\u003e Add the following output to your configuration file:\n\u003e ```sh\n\u003e # replace `nu` for `nush` or `nushell` if your executable is named differently\n\u003e pay-respects nu --alias [\u003calias\u003e]\n\u003e ```\n\n\u003e Or save it as a file:\n\u003e ```sh\n\u003e pay-respects nu --alias [\u003calias\u003e] | save -f ~/.pay-respects.nu\n\u003e ```\n\u003e and source from your config file:\n\u003e ```sh\n\u003e source ~/.pay-respects.nu\n\u003e ```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003ePowerShell\u003c/summary\u003e\n\n\u003e Append the following output to your profile:\n\u003e ```pwsh\n\u003e # replace `pwsh` for `powershell` if your executable is named differently\n\u003e pay-respects pwsh --alias [\u003calias\u003e]\n\u003e ```\n\n\u003e Or directly pipe the output to your profile:\n\u003e ```pwsh\n\u003e pay-respects pwsh --alias [\u003calias\u003e] \u003e\u003e $PROFILE\n\u003e ```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003eCustom initialization for arbitrary shell\u003c/summary\u003e\n\n\u003e pay-respects only requires 2 environment variables to work:\n\u003e\n\u003e - `_PR_SHELL`: The binary name of the current working shell\n\u003e - `_PR_LAST_COMMAND`: The last command\n\u003e\n\u003e pay-respects echos back, if applicable, commands that should be evaluated by\n\u003e the working shell, such as `cd` commands to change the directory\n\u003e\n\u003e General example:\n\u003e ```sh\n\u003e eval $(_PR_SHELL=sh _PR_LAST_COMMAND=\"git comit\" pay-respects)\n\u003e ```\n\n\u003e Following variables are not required, but can be used to reduce unnecessary\n\u003e operations:\n\u003e\n\u003e - `_PR_ALIAS`: A list of aliases to commands. Separated by newlines with\n\u003e zsh-like formatting, e.g. `gc=git commit`\n\u003e - `_PR_ERROR_MSG`: Error message from the previous command. `pay-respects`\n\u003e will capture output from multiplexers or rerun previous command to get the\n\u003e error message if absent\n\u003e - `_PR_EXECUTABLES`: A space separated list of commands/executables.\n\u003e `pay-respects` will search for `$PATH` if absent\n\n\u003c/details\u003e\n\nYou can now **[Press `F` to Pay Respects]**!\n\n[Press `F` to Pay Respects]: https://en.wikipedia.org/wiki/Press_F_to_pay_respects\n\nYou will also have a key-binding available on `Ctrl+X` for **experimental\ninline mode**, on-the-fly correction with no execution:\n\n- `gitcommit` + `C-X` `C-X` → `git commit`\n- `z payrespe` + `C-X` `C-X` → `cd /home/iff/Code/pay-respects`\n\n\u003cdetails\u003e\n\t\u003csummary\u003eIntegrations with other tools\u003c/summary\u003e\n\n\u003e - **tmux**, **GNU Screen**, **Zellij**, **WezTerm**, **kitty**:\n\u003e \t- Command log capturing inside the session without the need to rerun commands\n\u003e to get error messages. **Requires English locale** (actually `LANG=C`, which\n\u003e output is used for matching) to guarantee correct logs.\n\u003e \t- Requires a prompt prefix before your command. Initialization templates\n\u003e set it for you automatically.\n\u003e - **zoxide**: Uses zoxide's database to navigate through directories.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003eEnvironment variable configurations\u003c/summary\u003e\n\n\u003e - `_PR_LIB`: Directory of modules, analogous to `PATH`. If not provided,\n\u003e   search in `PATH` or compile-time provided value\n\u003e - `_PR_PACKAGE_MANAGER`: Use defined package manager instead of\n\u003e auto-detecting alphabetically. Empty value disables package search\n\u003e functionality\n\u003e \t- `_DEF_PR_PACKAGE_MANAGER`: compile-time value\n\n\u003e You can specify different modes to run with `_PR_MODE`:\n\u003e\n\u003e - `noconfirm`: Execute suggestions without confirm\n\u003e - `inline`: Returns best fix with no execution\n\u003e - `echo`: Print suggestions to `stdout` without executing\n\u003e - `cnf`: Used for command not found hook\n\u003e\n\u003e Example usage with `noconfirm`:\n\u003e\n\u003e ```sh\n\u003e # new versions\n\u003e alias ff=\"__pr_main noconfirm\"\n\u003e\n\u003e # old versions\n\u003e function ff() {\n\u003e \t(\n\u003e \t\texport _PR_MODE=\"noconfirm\"\n\u003e \t\tf\n\u003e \t)\n\u003e }\n\u003e ```\n\u003e\n\u003e Relating to features:\n\u003e\n\u003e - `_PR_NO_CONFIG`: Don't load configurations\n\u003e - `_PR_NO_DESPERATE`: Disable desperate functions, which are slow but might\n\u003e give better results\n\u003e - `_PR_PREFIX`: Shell prefix before the command acting as identifier.\n\u003e Required for multiplexer command log capturing\n\u003e - Disabling integrations:\n\u003e \t- `_PR_NO_ZOXIDE`\n\u003e \t- `_PR_NO_MULTIPLEXER`: Equivalent of turning all the followings:\n\u003e \t\t- `_PR_NO_TMUX`\n\u003e \t\t- `_PR_NO_SCREEN`\n\u003e \t\t- `_PR_NO_ZELLIJ`\n\u003e \t\t- `_PR_NO_WEZTERM`\n\u003e \t\t- `_PR_NO_KITTY`\n\n\u003c/details\u003e\n\n## Installing\n\nInstall from your package manager if available:\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/pay-respects.svg)](https://repology.org/project/pay-respects/versions)\n\n\u003cdetails\u003e\n\t\u003csummary\u003eInstructions for package managers\u003c/summary\u003e\n\n\u003e | OS / Distribution | Repository      | Instructions                                      |\n\u003e |-------------------|-----------------|---------------------------------------------------|\n\u003e | Arch Linux        | [AUR]           | `paru -S pay-respects` (`-bin`)                   |\n\u003e | Arch Linux (ARM)  | [Arch Linux CN] | `sudo pacman -S pay-respects`                     |\n\u003e | MacOS / *Any*     | [timescam]      | `brew install timescam/homebrew-tap/pay-respects` |\n\u003e | NixOS / *Any*     | [nixpkgs]       | `nix-env -iA nixos.pay-respects`                  |\n\n[AUR]: https://aur.archlinux.org/\n[Arch Linux CN]: https://github.com/archlinuxcn/repo\n[nixpkgs]: https://github.com/NixOS/nixpkgs\n[timescam]: https://github.com/timescam/homebrew-tap\n\n\u003c/details\u003e\n\nAlternatively, install pre-built binaries from [GitHub releases]. Install\nscripts are available. For Unix:\n```sh\ncurl -sSfL https://raw.githubusercontent.com/iffse/pay-respects/main/install.sh | sh\n```\nFor Windows, with PowerShell:\n```pwsh\nirm https://raw.githubusercontent.com/iffse/pay-respects/main/install.ps1 | iex\n```\n\n[GitHub releases]: https://github.com/iffse/pay-respects/releases\n\n\u003cdetails\u003e\n\t\u003csummary\u003eCargo / Compile from source (any OS/architecture supported by Rust)\u003c/summary\u003e\n\n\u003e This installation requires you to have Cargo (the Rust package manager) installed.\n\n\u003e Install from [crates.io](https://crates.io/), modules are optional\n\u003e ```sh\n\u003e cargo install pay-respects\n\u003e cargo install pay-respects-module-runtime-rules\n\u003e cargo install pay-respects-module-request-ai\n\u003e ```\n\n\u003e Clone from git and install, suitable for adding custom compile-time rules:\n\u003e ```sh\n\u003e git clone --depth 1 https://github.com/iffse/pay-respects\n\u003e cd pay-respects\n\u003e cargo install --path core\n\u003e cargo install --path module-runtime-rules\n\u003e cargo install --path module-request-ai\n\u003e ```\n\n\u003c/details\u003e\n\n## Configuration\n\nSee [configuration](./config.md).\n\n## Rules \u0026 Modules\n\nSee the following pages:\n\n- [Writing rules (TOML or Rust)](./rules.md)\n- [Custom modules](./modules.md)\n\n## AI Integration\n\n\u003e **Disclaimer**: You are using AI generated content on your own risk. Please\n\u003e double-check its suggestions before accepting.\n\nAI suggestions should work out of the box with `request-ai` module installed.\nYou can disable it by setting `_PR_AI_DISABLE`:\n```sh\nexport _PR_AI_DISABLE=1\n```\n\nAn API key is included with the source (your distribution might have stripped\nthem out). It should always work unless I can no longer afford this public service or rate\nlimits are reached.\n\n[I don't track nor store\nanything.](https://github.com/iffse/pay-respects-serverless)\nIf it's useful to you, consider making a donation:\n\n\u003cdiv\u003e\n\t\u003ca\n\t\thref=\"https://liberapay.com/iff/donate\"\n\t\ttarget=\"_blank\"\n\t\trel=\"noreferrer\"\n\t\t\u003e\u003cimg\n\t\t\tsrc=\"https://liberapay.com/assets/widgets/donate.svg\"\n\t\t\talt=\"Donate using Liberapay\"\n\t\t/\u003e\u003c/a\n\t\u003e\n\t\u003ca href=\"https://ko-fi.com/iffse\" target=\"_blank\" rel=\"noreferrer\"\n\t\t\u003e\u003cimg\n\t\t\theight='30'\n\t\t\tsrc=\"https://www.vectorlogo.zone/logos/ko-fi/ko-fi-ar21.svg\"\n\t\t\talt=\"Donate using Ko-fi\"\n\t\t\tstyle=\"height: 30px;\"\n\t\t/\u003e\u003c/a\n\t\u003e\n\t\u003cbr /\u003e\n\t\u003ca href=\"https://iffse.eu.org/stripe\" target=\"_blank\" rel=\"noreferrer\"\n\t\t\u003e\u003cimg\n\t\t\theight='30'\n\t\t\tsrc=\"https://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Stripe_Logo%2C_revised_2016.svg/1280px-Stripe_Logo%2C_revised_2016.svg.png\"\n\t\t\talt=\"Donate using Stripe\"\n\t\t\tstyle=\"height: 30px;\"\n\t\t/\u003e\u003c/a\n\t\u003e\n\t\u003ca\n\t\thref=\"https://www.paypal.com/donate/?hosted_button_id=QN7Z7ZHRAAFZL\"\n\t\ttarget=\"_blank\"\n\t\trel=\"noreferrer\"\n\t\t\u003e\u003cimg\n\t\t\theight='30'\n\t\t\tsrc=\"https://upload.wikimedia.org/wikipedia/commons/b/b5/PayPal.svg\"\n\t\t\talt=\"Donate using PayPal\"\n\t\t\tstyle=\"height: 25px; margin-bottom: 3px;\"\n\t\t/\u003e\u003c/a\n\t\u003e\n\u003c/div\u003e\n\n[AI usages and API configurations](./module-request-ai/README.md)\n\n## Contributing\n\nCurrent option to write rules should cover most of the cases. We need more\nrules, contributions are welcomed!\n\nThere's also a [roadmap] for contribution opportunities.\n\n[roadmap]: ./roadmap.md\n\nThis project is hosted at various sites, you can choose the one that you feel\nmost comfortable with:\n\n- [Codeberg](https://codeberg.org/iff/pay-respects)\n- [GitHub](https://github.com/iffse/pay-respects)\n- [GitLab](https://gitlab.com/iffse/pay-respects)\n\n## Licenses\n\n- **Binaries**: AGPL-3.0\n\t- Core and modules\n- **Libraries**: MPL-2.0\n\t- Parser, utils, and select\n\n## Benchmarks\n\nBenchmark script can be executed with `make bench` using `hyperfine`. Here are\nthe results on my potato computer (AMD Ryzen 5 5600X, DDR4 2400 MHz, HDD 7200\nRPM with Btrfs transparent compression, glibc build), you can expect better\nresults on yours.\n\n| Case                      | Results             |\n|---------------------------|---------------------|\n| Initialization            | 493.7 µs ±  38.1 µs |\n| Privilege                 | 655.0 µs ± 100.4 µs |\n| Typo: Command             | 5.1 ms ±   0.2 ms   |\n| Typo: File path           | 3.6 ms ±   0.4 ms   |\n| RegEx: Command            | 3.3 ms ±   0.1 ms   |\n| RegEx: Options            | 3.3 ms ±   0.2 ms   |\n| RegEx: Error              | 3.3 ms ±   0.1 ms   |\n| Desperate: Fuzzy recovery | 703.5 µs ±  65.9 µs |\n| Desperate: File look up   | 3.4 ms ±   0.2 ms   |\n\nCaveats:\n\n- **Integrations are turned off**: In real usage you may feel a delay due to the\nexecution of `zoxide` itself, for instance, which takes 50ms.\n- Binaries are **optimized for size, not speed**, using regex-lite instead of\nregex because it's smaller, although slower. A smaller binary helps in\nloading times, specially for cold runs.\n\n## Flowchart\n\nHere's a flowchart on how this program works:\n\n![flowchart](https://raw.githubusercontent.com/iffse/static-assets/refs/heads/main/pay-respects/flowchart.svg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiffse%2Fpay-respects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiffse%2Fpay-respects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiffse%2Fpay-respects/lists"}