{"id":15653820,"url":"https://github.com/fvictorio/completely","last_synced_at":"2025-07-21T12:40:40.951Z","repository":{"id":51528304,"uuid":"221775002","full_name":"fvictorio/completely","owner":"fvictorio","description":"Generate shell completion scripts from a JSON description of a command.","archived":false,"fork":false,"pushed_at":"2021-05-11T11:12:29.000Z","size":152,"stargazers_count":28,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-13T20:00:13.269Z","etag":null,"topics":["autocomplete","cli","completion","shell","typescript"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fvictorio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-14T19:50:40.000Z","updated_at":"2024-03-16T16:17:33.000Z","dependencies_parsed_at":"2022-08-03T06:01:21.786Z","dependency_job_id":null,"html_url":"https://github.com/fvictorio/completely","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/fvictorio/completely","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvictorio%2Fcompletely","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvictorio%2Fcompletely/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvictorio%2Fcompletely/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvictorio%2Fcompletely/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fvictorio","download_url":"https://codeload.github.com/fvictorio/completely/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvictorio%2Fcompletely/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266303700,"owners_count":23908375,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["autocomplete","cli","completion","shell","typescript"],"created_at":"2024-10-03T12:47:10.893Z","updated_at":"2025-07-21T12:40:40.934Z","avatar_url":"https://github.com/fvictorio.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# completely\n\nGenerate shell completion scripts from a JSON description of a command.\n\n## Usage\n\nYou can use the CLI to generate scripts:\n\n```\nnpm i -g @completely/cli\ncompletely --shell bash completion.json \u003e completion.sh\n```\n\n(Only bash and zsh are supported at the moment.)\n\nFor example, given this JSON description:\n\n```json\n{\n  \"command\": \"my-command\",\n  \"subcommands\": [\n    {\n      \"command\": \"draw\",\n      \"args\": [],\n      \"flags\": [{\n        \"type\": \"string\",\n        \"name\": \"color\",\n        \"completion\": {\n          \"type\": \"oneOf\",\n          \"values\": [\"red\", \"green\", \"blue\"]\n        }\n      }]\n    }\n  ]\n}\n```\n\nIf you generate a `completion.sh` file and source it, you'll get some completion suggestions:\n\n```bash\nsource completion.sh\nmy-command # pressing \u003ctab\u003e will complete \"draw\"\nmy-command draw --color # pressing \u003ctab\u003e\u003ctab\u003e will suggest \"red\", \"green\" and \"blue\"\n```\n\nYou can also use the library directly:\n\n```\nnpm i @completely/bash-generator\n```\n\n```typescript\nimport { generate } from '@completely/bash-generator'\nimport completionSpec from './completion.json'\n\nconst script = generate(completionSpec)\nconsole.log(script)\n```\n\n## JSON description\n\nYou can check the [spec package](packages/spec) to learn more about how to describe a command with a JSON file. Ideally you wouldn't need to do this manually, since this JSON is meant to be an internal representation generated by other means.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvictorio%2Fcompletely","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffvictorio%2Fcompletely","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvictorio%2Fcompletely/lists"}