{"id":17082248,"url":"https://github.com/crazy-complete/crazy-complete","last_synced_at":"2026-03-05T13:06:32.519Z","repository":{"id":257826039,"uuid":"861291194","full_name":"crazy-complete/crazy-complete","owner":"crazy-complete","description":"Generate shell auto completion files","archived":false,"fork":false,"pushed_at":"2024-12-03T16:33:38.000Z","size":508,"stargazers_count":6,"open_issues_count":9,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-03T17:44:09.822Z","etag":null,"topics":["autocomplete","bash","bash-completion","cli","fish","fish-completion","shell","terminal","zsh","zsh-completion"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crazy-complete.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-09-22T14:09:21.000Z","updated_at":"2024-12-03T16:37:53.000Z","dependencies_parsed_at":"2024-10-26T22:19:45.010Z","dependency_job_id":"c6b7c89a-ba25-48ac-8fd1-a1cd0c6aed02","html_url":"https://github.com/crazy-complete/crazy-complete","commit_stats":{"total_commits":62,"total_committers":2,"mean_commits":31.0,"dds":"0.032258064516129004","last_synced_commit":"af2cd3b8775f25f512cf6e9dc96662f8afbbc920"},"previous_names":["crazy-complete/crazy-complete"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-complete%2Fcrazy-complete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-complete%2Fcrazy-complete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-complete%2Fcrazy-complete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-complete%2Fcrazy-complete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crazy-complete","download_url":"https://codeload.github.com/crazy-complete/crazy-complete/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227979443,"owners_count":17850773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["autocomplete","bash","bash-completion","cli","fish","fish-completion","shell","terminal","zsh","zsh-completion"],"created_at":"2024-10-14T13:00:23.646Z","updated_at":"2026-03-05T13:06:32.507Z","avatar_url":"https://github.com/crazy-complete.png","language":"Shell","readme":"crazy-complete\n==============\n\nEvery program should have autocompletion in the shell to enhance user experience and productivity. crazy-complete helps solve this task by generating robust and reliable autocompletion scripts.\n\n**Key Features**:\n- **Generates Robust Scripts**: Ensures that the autocompletion scripts are reliable and efficient.\n- **Multi-Shell Support**: Works seamlessly with **Bash**, **Fish**, and **Zsh**, providing flexibility across different environments.\n- **Minimal Dependencies**: The only external dependency is PyYAML.\n- **Configurable and Extendable**: The generated autocompletion scripts are highly configurable and can be easily extended to suit your specific needs.\n- **Standalone Scripts**: The generated scripts are standalone and do not depend on modified environments, unlike some alternatives like argcomplete.\n- **Easy to Use**: Simple and intuitive to set up, allowing you to quickly add autocompletion functionality to your programs.\n\nWith crazy-complete, adding autocompletion to your programs has never been easier. Try it out and see the difference it makes in your command-line applications!\n\nTable of Contents\n=================\n\n- [Benefits of Using crazy-complete](#benefits-of-using-crazy-complete)\n- [Disadvantages of crazy-complete](#disadvantages-of-crazy-complete)\n- [Installation](#installation)\n- [Synposis](#synopsis)\n- [Usage examples](#usage-examples)\n- [Definition file examples](#definition-file-examples)\n- [Documentation](#documentation)\n- [Comparision with other auto-complete generators](#comparision-with-other-auto-complete-generators)\n- [Questions or problems](#questions-or-problems)\n\nBenefits of Using crazy-complete\n================================\n\n- **Focus on what matters:**\n  crazy-complete generates the basic structure of your autocompletion scripts,\n  so you can focus entirely on defining options and their completions instead of dealing with repetitive setup code.\n\n- **Cross-shell consistency:**\n  Write your completion logic once and get reliable completions for **Bash**, **Zsh**, and **Fish**, with identical behavior across all shells.\n\n- **Powerful argument completion:**\n  crazy-complete provides a rich set of [built-in](docs/documentation.md#built-in-commands) helpers for argument completion and makes it simple to define your own [custom argument handlers](docs/documentation.md#user-defined-commands).\n\n- **Arbitrary levels of subcommands:**\n  No matter how deeply nested your CLI structure is, crazy-complete can handle it.\n  You can define completions for commands, subcommands, and even sub-subcommands without extra effort.\n\n- **Full control over options:**\n  - **Repeatable / non-repeatable options**: control whether options can be used once or multiple times.\n  - **Mutually exclusive options**: ensure that incompatible options cannot appear together.\n  - **Conditional options**: only suggest options when certain conditions are met.\n  - **Final options**: options that prevent any further options from being completed.\n  - **Hidden options**: completable options that are not shown in the suggestion list.\n  - **Capturing options**: collect options and their values to enable advanced, context-sensitive completions.\n\nDisadvantages of crazy-complete\n===============================\n\nWhile crazy-complete offers many advantages, there are some trade-offs to be aware of:\n\n- **Code size and verbosity:**\n  Its biggest strength - **secure, fully controlled completions** - can also be its biggest weakness.\n  - For **Bash**, this means the generated scripts contain a significant amount of boilerplate code for parsing options and positional arguments.\n  - For **Fish**, large command-line definitions (more than 500 options) may result in slower completions, although performance is usually acceptable for most use cases.\n  - **Mitigation:** There are ways to reduce script size and improve performance. See [Tips And Tricks](docs/documentation.md#tips-and-tricks) for more details.\n- **Not as optimized as hand-written scripts:**\n   The generated scripts prioritize correctness and reliability over minimal size or maximum performance. Hand-written scripts may be more compact and slightly faster in some cases.\n\nInstallation\n============\n\n- Using Arch Linux:\n\n  Use the \\*.pkg.tar.zst file that has been released in this repository.\n\n  Or use:\n  ```\n  git clone https://github.com/crazy-complete/crazy-complete\n  cd crazy-complete\n  makepkg -c \u0026\u0026 sudo pacman -U python-crazy-complete*.pkg.*\n  ```\n\n- Using Debian:\n\n  Use the \\*.deb file that has been released in this repository.\n\n- Using Fedora / OpenSuse:\n\n  Use the \\*.rpm file that has been released in this repository.\n\n- For other Linux distributions:\n  ```\n  git clone https://github.com/crazy-complete/crazy-complete\n  cd crazy-complete\n  python3 -m pip install .\n  ```\n\nSynopsis\n========\n\n\u003e `crazy-complete [OPTIONS] {bash,fish,zsh,yaml,json} \u003cDEFINITION_FILE\u003e`\n\nSee [docs/documentation.md#options](docs/documentation.md#options) for a list of options.\n\nCompletions for crazy-complete\n==============================\n\nTo install system-wide completion files for crazy-complete, execute the following:\n\n```\nsudo crazy-complete --input-type=python -i bash \"$(which crazy-complete)\"\nsudo crazy-complete --input-type=python -i fish \"$(which crazy-complete)\"\nsudo crazy-complete --input-type=python -i zsh  \"$(which crazy-complete)\"\n```\n\nIf you want to uninstall the completion files, pass `-u` to crazy-complete:\n\n```\nsudo crazy-complete --input-type=python -u bash \"$(which crazy-complete)\"\nsudo crazy-complete --input-type=python -u fish \"$(which crazy-complete)\"\nsudo crazy-complete --input-type=python -u zsh  \"$(which crazy-complete)\"\n```\n\nUsage examples\n==============\n\nConverting a Python script to YAML:\n\n```\ncrazy-complete --input-type=python yaml my_program.py\n```\n\nGenerate a YAML file from help text:\n\n```\ngrep --help \u003e help_file\ncrazy-complete --input-type=help yaml help_file\n- or -\ngrep --help | crazy-complete --input-type=help yaml /dev/stdin\n```\n\nGenerate shell auto completions for Bash:\n\n```\ncrazy-complete --input-type=yaml --include-file my_program.bash bash my_program.yaml\n```\n\nDefinition file examples\n========================\n\nSee [examples](https://github.com/crazy-complete/crazy-complete/tree/main/examples) for examples.\n\nSee [completions](https://github.com/crazy-complete/completions) for real world applications of crazy-complete.\n\nYou can even have a look at the [tests](https://github.com/crazy-complete/crazy-complete/tree/main/test).\n\nDocumentation\n=============\n\nSee [docs/documentation.md](docs/documentation.md).\n\nComparision with other auto-complete generators\n===============================================\n\nSee [docs/comparision.md](docs/comparision.md) for a comparision with other tools.\n\nQuestions or problems\n=====================\n\nDon't hesitate to open an issue on [GitHub](https://github.com/crazy-complete/crazy-complete/issues).\n","funding_links":[],"categories":["Other Resources","Recently Updated"],"sub_categories":["ZSH Tools","[Oct 14, 2024](/content/2024/10/14/README.md)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazy-complete%2Fcrazy-complete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrazy-complete%2Fcrazy-complete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazy-complete%2Fcrazy-complete/lists"}