{"id":13395173,"url":"https://github.com/openautocomplete/openautocomplete","last_synced_at":"2025-03-13T20:31:56.351Z","repository":{"id":44516003,"uuid":"265221356","full_name":"openautocomplete/openautocomplete","owner":"openautocomplete","description":"OpenAutoComplete -- CLI autocomplete specification","archived":false,"fork":false,"pushed_at":"2023-01-09T02:01:13.000Z","size":41,"stargazers_count":263,"open_issues_count":8,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-07-31T17:23:37.386Z","etag":null,"topics":["autocomplete","shell","specification"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openautocomplete.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}},"created_at":"2020-05-19T10:53:11.000Z","updated_at":"2024-07-01T07:17:52.000Z","dependencies_parsed_at":"2023-02-08T08:15:52.319Z","dependency_job_id":null,"html_url":"https://github.com/openautocomplete/openautocomplete","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openautocomplete%2Fopenautocomplete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openautocomplete%2Fopenautocomplete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openautocomplete%2Fopenautocomplete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openautocomplete%2Fopenautocomplete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openautocomplete","download_url":"https://codeload.github.com/openautocomplete/openautocomplete/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243478320,"owners_count":20297235,"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","shell","specification"],"created_at":"2024-07-30T17:01:45.037Z","updated_at":"2025-03-13T20:31:56.031Z","avatar_url":"https://github.com/openautocomplete.png","language":null,"funding_links":[],"categories":["Others","shell","Tools"],"sub_categories":[],"readme":"# OpenAutoComplete :pencil:\n\n\u003e Shell-agnostic, declarative CLI autocomplete specification\n\n![markdownlint](https://github.com/GamePad64/openautocomplete/workflows/markdownlint/badge.svg)\n\n**Specification: [SPECIFICATION.md](SPECIFICATION.md)**\n\nNowadays, app developers have to provide autocompletion scripts for their applications for every shell possible by\nthemselves. Usually, they provide autocompletions for bash, zsh and fish, and other shells have to support these\ncompletions (and this task is not easy, if even possible).\n\nWe want to have a single way an application could provide its autocompletion specification for the user's shell.\n\nReady-to-use definition files can be located here: https://github.com/openautocomplete/completions.\n\n## Basic principles\n\n### Declarative\n\nThe spec should have means to create CLI autocompletion in a declarative way, *mostly* without using shell scripting.\n\n### Shell-agnostic\n\nThere should not be a great problem to write autocompletion module for every shell available with minimum usage of\nnon-standard tools. Our target shells: bash, zsh, fish, PowerShell and others.\n\n### Standards-based\n \nOAC uses JSON, so the **Runtime** implementers can use `jq` for Unix shells, `ConvertFrom-Json` in PowerShell and other\ncommon approaches to parse OAC document.\n\n### Backwards-compatible with legacy applications\n\nThe spec should have means to describe most of the today's application CLIs.\n\n## Roadmap\n\nEvery single item in the roadmap is a subject for discussion\n\n### Enumerations support\n\nArgument completion with values, being a part of some sort of enumeration:\n\n- path (file/directory) (with regex/wildcard filter)\n- storage-volume -- mounted volume. On Unix-like: \"/home\", \"/\" (use `df`?)\n- packages (installed/not installed). Tricky one.\n- PIDs\n- process names\n- something else\n\n### Enumerations from command output\n\nThis is for commands, like tar, thar can provide some machine-readable list, that could be parsed using a simple regex,\nand turned into an enumeration list. Also, this could be used for commands, that can provide their own autocompletion\nlists, like `dotnet`.\n\n### Delegation to another OAC instance\n\nThis could be used for delegating command autocompletion to another instance.\nBetter with an example.\n\nConsider a Python Django package.\n`python -m django \u003cTAB\u003e\u003cTAB\u003e`\n\nWe provide python autocompletion by ourselves, and after `-m \u003carg\u003e` it contains *delegation* pattern. When the user\ninvokes autocompletion (double TAB), the Runtime gets definitions for `python`, then proceeds to a command inside\n*delegation*, and tries to get OAC definitions for django package (how?). If successful, it returns a list of currently\navailable django commands:\n`[check, compilemessages, createcachetable, dbshell, diffsettings, dumpdata, flush, inspectdb, ...]`\n\n### shell-dependent scripting for delegations or enumerations\nWell, to make completions more powerful, some sort of shell-dependent scriptiong would be useful (but discouraged). We should think about safety considerations, though.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenautocomplete%2Fopenautocomplete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenautocomplete%2Fopenautocomplete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenautocomplete%2Fopenautocomplete/lists"}