{"id":13475983,"url":"https://github.com/jozsefsallai/ask","last_synced_at":"2025-07-13T16:05:53.234Z","repository":{"id":43006414,"uuid":"264735313","full_name":"jozsefsallai/ask","owner":"jozsefsallai","description":"interactive command-line prompts for deno","archived":false,"fork":false,"pushed_at":"2024-10-27T23:34:43.000Z","size":89,"stargazers_count":51,"open_issues_count":5,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-20T02:07:01.301Z","etag":null,"topics":["cli","command-line","deno","prompt"],"latest_commit_sha":null,"homepage":"https://jsr.io/@sallai/ask","language":"TypeScript","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/jozsefsallai.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":"2020-05-17T18:53:31.000Z","updated_at":"2025-05-06T20:00:29.000Z","dependencies_parsed_at":"2024-10-27T22:07:40.763Z","dependency_job_id":"de27a960-8f60-4d2b-bd04-02799cc6eb6b","html_url":"https://github.com/jozsefsallai/ask","commit_stats":{"total_commits":20,"total_committers":7,"mean_commits":2.857142857142857,"dds":0.65,"last_synced_commit":"badf6068e9eca6ea9725c37cdc57b41b9320cc1a"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/jozsefsallai/ask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jozsefsallai%2Fask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jozsefsallai%2Fask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jozsefsallai%2Fask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jozsefsallai%2Fask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jozsefsallai","download_url":"https://codeload.github.com/jozsefsallai/ask/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jozsefsallai%2Fask/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265167502,"owners_count":23721455,"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":["cli","command-line","deno","prompt"],"created_at":"2024-07-31T16:01:25.363Z","updated_at":"2025-07-13T16:05:53.213Z","avatar_url":"https://github.com/jozsefsallai.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","others"],"sub_categories":[],"readme":"# ask\n\nInteractive command-line prompts for Deno.\n\n![Demo](.github/assets/demo.gif)\n\n## Description\n\n`ask` is a slick Deno module that allows you to create interactive command-line\napplications, similar to what you'd achieve with\n[inquirer](https://www.npmjs.com/package/inquirer) in Node.js.\n\n## Overview\n\n- **Supported prompts:**\n  - `input` (plain text)\n  - `number` (integer or float)\n  - `password` (hidden/masked input)\n  - `confirm` (yes/no)\n  - `editor` (open an editor to write longer text)\n  - `select` (pick one item from a list)\n  - `checkbox` (pick multiple items from a list)\n- Elegant output.\n- Familiar, inquirer-like syntax.\n- Easily configurable.\n- Strong type-safety.\n\n## Basic Usage\n\nFirst, install the package from JSR:\n\n```sh\ndeno add jsr:@sallai/ask\n```\n\nThen just create an `Ask` instance and use the `prompt()` method to enumerate\nyour questions.\n\n```ts\nimport { Ask } from \"@sallai/ask\";\n\nconst ask = new Ask(); // global options are also supported!\n\nconst answers = await ask.prompt([\n  {\n    name: \"name\",\n    type: \"input\",\n    message: \"Name:\",\n  },\n  {\n    name: \"age\",\n    type: \"number\",\n    message: \"Age:\",\n  },\n] as const);\n\nconsole.log(answers); // { name: \"Joe\", age: 19 }\n```\n\nYou can also just ask a single question:\n\n```ts\nconst { name } = await ask.input({\n  name: \"name\",\n  message: \"Name:\",\n} as const);\n\nconsole.log(name); // Joe\n```\n\n\u003e **Note:** The `as const` assertion is necessary to ensure that the `name`\n\u003e property is not widened to `string`. This is necessary for the type-checking\n\u003e to work properly.\n\n## Documentation and API\n\nPlease visit the [JSR documentation page][docs] for more information on how to\nuse the library.\n\n## License\n\nMIT.\n\n[docs]: https://jsr.io/@sallai/ask/doc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjozsefsallai%2Fask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjozsefsallai%2Fask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjozsefsallai%2Fask/lists"}