{"id":23414240,"url":"https://github.com/josxa/kit-utils","last_synced_at":"2026-02-10T03:32:32.857Z","repository":{"id":238195356,"uuid":"796068923","full_name":"JosXa/kit-utils","owner":"JosXa","description":"Script Kit environment with UI utilities and other scripting goodies","archived":false,"fork":false,"pushed_at":"2025-02-20T19:40:09.000Z","size":1732,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-17T23:29:01.772Z","etag":null,"topics":["kenv","npm-package","scriptkit"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@josxa/kit-utils","language":"TypeScript","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/JosXa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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-05-04T20:58:43.000Z","updated_at":"2025-02-20T19:40:13.000Z","dependencies_parsed_at":"2024-05-10T21:52:52.694Z","dependency_job_id":"fd24b654-b93b-4420-b662-23d74b779d83","html_url":"https://github.com/JosXa/kit-utils","commit_stats":null,"previous_names":["josxa/kit-utils"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosXa%2Fkit-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosXa%2Fkit-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosXa%2Fkit-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosXa%2Fkit-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JosXa","download_url":"https://codeload.github.com/JosXa/kit-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250507558,"owners_count":21442022,"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":["kenv","npm-package","scriptkit"],"created_at":"2024-12-22T19:57:48.884Z","updated_at":"2026-02-10T03:32:31.061Z","avatar_url":"https://github.com/JosXa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kit-utils\n\nA [Script Kit](https://scriptkit.com) environment ([what is a Kenv?](https://gist.github.com/BeSpunky/4595a7a783b74802b8cb5301d91efa55)) with UI \nutilities and other scripting goodies.\n\nExcept for some demos, this repo does not contain any runnable scripts and is meant to be used as a TypeScript library you\ncan reference in your own scripts.\n\n## Installation\n\n\n\u003e [!TIP]\n\u003e This package can either be used as a [kenv](https://gist.github.com/BeSpunky/4595a7a783b74802b8cb5301d91efa55), or be \n\u003e installed via NPM. \n\u003e \n\u003e #### Which should I choose?\n\u003e - If you want to run the Demo apps 👉 **Install as kenv**\n\u003e - If you expect to be making occasional changes to the utilities here 👉 **Install as kenv**\n\u003e - If you plan on contributing 👉 **Install as kenv**\n\u003e - Otherwise 👉 **Install from NPM**\n\n\n### Installing as a kenv\n\n1. Direct link: https://scriptkit.com/api/kenv?repo=JosXa/kit-utils\n2. Accept the risks and install\n3. Import utils directly from the kenv, usually `import {...} from '../kenvs/kit-utils'`\n\n### Using as an NPM library\n\nSimply paste\\\n`import {} from '@josxa/kit-utils'`\\\ninto one of your scripts and wait for Kit to prompt you to install it.\n\nOr install explicitly using `npm install @josxa/kit-utils`, you know the drill.\n\n## Demos\n\nAfter installation as a kenv, run the \"Show or Hide Demos\" script to get a feel for what's possible.\n\n## API\n\n### Prompt Helpers\n\n#### `crudArg`\n\nA wrapper around `arg` that remembers previous user choices, with actions to **c**reate, **r**ead, **u**pdate, and **d**elete cached entries.\n\n_Example:_\n\n```ts\nimport { crudArg } from '@josxa/kit-utils'\n\nconst city = await crudArg('Enter a city name')\n\nawait div(`You selected: ${city}`)\n```\n\n#### `refreshable`\n\nSee [Docstring](https://github.com/JosXa/kit-utils/tree/main/src/refreshable.ts#L6-L37)\n\n_Example:_\n\nSee [Demo](https://github.com/JosXa/kit-utils/tree/main/scripts/refreshable-demo.ts)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosxa%2Fkit-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosxa%2Fkit-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosxa%2Fkit-utils/lists"}