{"id":13683759,"url":"https://github.com/oclif/cli-ux","last_synced_at":"2026-01-15T00:01:46.964Z","repository":{"id":44676686,"uuid":"117707742","full_name":"oclif/cli-ux","owner":"oclif","description":"CLI IO utilities","archived":true,"fork":false,"pushed_at":"2022-01-31T16:23:52.000Z","size":1882,"stargazers_count":544,"open_issues_count":41,"forks_count":44,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-09T03:23:03.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/oclif.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2018-01-16T16:14:27.000Z","updated_at":"2024-09-26T02:44:39.000Z","dependencies_parsed_at":"2022-09-07T03:40:44.838Z","dependency_job_id":null,"html_url":"https://github.com/oclif/cli-ux","commit_stats":null,"previous_names":[],"tags_count":167,"template":false,"template_full_name":null,"purl":"pkg:github/oclif/cli-ux","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oclif%2Fcli-ux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oclif%2Fcli-ux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oclif%2Fcli-ux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oclif%2Fcli-ux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oclif","download_url":"https://codeload.github.com/oclif/cli-ux/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oclif%2Fcli-ux/sbom","scorecard":{"id":701477,"data":{"date":"2025-08-11","repo":{"name":"github.com/oclif/cli-ux","commit":"94a2dbfdc7571e879643430e85c12ecac7137eb8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":2,"reason":"Found 5/24 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/oclif/cli-ux/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/oclif/cli-ux/ci.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"22 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T05:18:43.759Z","repository_id":44676686,"created_at":"2025-08-22T05:18:43.759Z","updated_at":"2025-08-22T05:18:43.759Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28439606,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-08-02T13:02:30.521Z","updated_at":"2026-01-15T00:01:46.946Z","avatar_url":"https://github.com/oclif.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"cli-ux\n======\n\n# ========= This module has been deprecated in favor of [oclif/core](https://github.com/oclif/core) and will no longer be maintained. =========\n\ncli IO utilities\n\n[![Version](https://img.shields.io/npm/v/cli-ux.svg)](https://npmjs.org/package/cli-ux)\n[![CircleCI](https://circleci.com/gh/oclif/cli-ux/tree/main.svg?style=svg)](https://circleci.com/gh/oclif/cli-ux/tree/main)\n[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/cli-ux?branch=main\u0026svg=true)](https://ci.appveyor.com/project/heroku/cli-ux/branch/main)\n[![Known Vulnerabilities](https://snyk.io/test/npm/cli-ux/badge.svg)](https://snyk.io/test/npm/cli-ux)\n[![Downloads/week](https://img.shields.io/npm/dw/cli-ux.svg)](https://npmjs.org/package/cli-ux)\n[![License](https://img.shields.io/npm/l/cli-ux.svg)](https://github.com/oclif/cli-ux/blob/main/package.json)\n\n# Usage\n\nThe following assumes you have installed `cli-ux` to your project with `npm install cli-ux` or `yarn add cli-ux` and have it required in your script (TypeScript example):\n\n```typescript\nimport cli from 'cli-ux'\ncli.prompt('What is your name?')\n```\n\nJavaScript:\n\n```javascript\nconst {cli} = require('cli-ux')\n\ncli.prompt('What is your name?')\n```\n\n# cli.prompt()\n\nPrompt for user input.\n\n```typescript\n// just prompt for input\nawait cli.prompt('What is your name?')\n\n// mask input after enter is pressed\nawait cli.prompt('What is your two-factor token?', {type: 'mask'})\n\n// mask input on keypress (before enter is pressed)\nawait cli.prompt('What is your password?', {type: 'hide'})\n\n// yes/no confirmation\nawait cli.confirm('Continue?')\n\n// \"press any key to continue\"\nawait cli.anykey()\n```\n\n![prompt demo](assets/prompt.gif)\n\n# cli.url(text, uri)\n\nCreate a hyperlink (if supported in the terminal)\n\n```typescript\nawait cli.url('sometext', 'https://google.com')\n// shows sometext as a hyperlink in supported terminals\n// shows https://google.com in unsupported terminals\n```\n\n![url demo](assets/url.gif)\n\n# cli.open\n\nOpen a url in the browser\n\n```typescript\nawait cli.open('https://oclif.io')\n```\n\n# cli.action\n\nShows a spinner\n\n```typescript\n// start the spinner\ncli.action.start('starting a process')\n// show on stdout instead of stderr\ncli.action.start('starting a process', 'initializing', {stdout: true})\n\n// stop the spinner\ncli.action.stop() // shows 'starting a process... done'\ncli.action.stop('custom message') // shows 'starting a process... custom message'\n```\n\nThis degrades gracefully when not connected to a TTY. It queues up any writes to stdout/stderr so they are displayed above the spinner.\n\n![action demo](assets/action.gif)\n\n# cli.annotation\n\nShows an iterm annotation\n\n```typescript\ncli.annotation('sometext', 'annotated with this text')\n```\n\n![annotation demo](assets/annotation.png)\n\n# cli.wait\n\nWaits for 1 second or given milliseconds\n\n```typescript\nawait cli.wait()\nawait cli.wait(3000)\n```\n\n# cli.table\n\nDisplays tabular data\n\n```typescript\ncli.table(data, columns, options)\n```\n\nWhere:\n\n- `data`: array of data objects to display\n- `columns`: [Table.Columns](./src/styled/table.ts)\n- `options`: [Table.Options](./src/styled/table.ts)\n\n`cli.table.flags()` returns an object containing all the table flags to include in your command.\n\n```typescript\n{\n  columns: Flags.string({exclusive: ['additional'], description: 'only show provided columns (comma-separated)'}),\n  sort: Flags.string({description: 'property to sort by (prepend '-' for descending)'}),\n  filter: Flags.string({description: 'filter property by partial string matching, ex: name=foo'}),\n  csv: Flags.boolean({exclusive: ['no-truncate'], description: 'output is csv format'}),\n  extended: Flags.boolean({char: 'x', description: 'show extra columns'}),\n  'no-truncate': Flags.boolean({exclusive: ['csv'], description: 'do not truncate output to fit screen'}),\n  'no-header': Flags.boolean({exclusive: ['csv'], description: 'hide table header from output'}),\n}\n```\n\nPassing `{only: ['columns']}` or `{except: ['columns']}` as an argument into `cli.table.flags()` will allow/block those flags from the returned object.\n\n`Table.Columns` defines the table columns and their display options.\n\n```typescript\nconst columns: Table.Columns = {\n  // where `.name` is a property of a data object\n  name: {}, // \"Name\" inferred as the column header\n  id: {\n    header: 'ID', // override column header\n    minWidth: '10', // column must display at this width or greater\n    extended: true, // only display this column when the --extended flag is present\n    get: row =\u003e `US-O1-${row.id}`, // custom getter for data row object\n  },\n}\n```\n\n`Table.Options` defines the table options, most of which are the parsed flags from the user for display customization, all of which are optional.\n\n```typescript\nconst options: Table.Options = {\n  printLine: myLogger, // custom logger\n  columns: flags.columns,\n  sort: flags.sort,\n  filter: flags.filter,\n  csv: flags.csv,\n  extended: flags.extended,\n  'no-truncate': flags['no-truncate'],\n  'no-header': flags['no-header'],\n}\n```\n\nExample class:\n\n```typescript\nimport {Command} from '@oclif/core'\nimport {cli} from 'cli-ux'\nimport axios from 'axios'\n\nexport default class Users extends Command {\n  static flags = {\n    ...cli.table.flags()\n  }\n\n  async run() {\n    const {flags} = this.parse(Users)\n    const {data: users} = await axios.get('https://jsonplaceholder.typicode.com/users')\n\n    cli.table(users, {\n      name: {\n        minWidth: 7,\n      },\n      company: {\n        get: row =\u003e row.company \u0026\u0026 row.company.name\n      },\n      id: {\n        header: 'ID',\n        extended: true\n      }\n    }, {\n      printLine: this.log,\n      ...flags, // parsed flags\n    })\n  }\n}\n```\n\nDisplays:\n\n```shell\n$ example-cli users\nName                     Company\nLeanne Graham            Romaguera-Crona\nErvin Howell             Deckow-Crist\nClementine Bauch         Romaguera-Jacobson\nPatricia Lebsack         Robel-Corkery\nChelsey Dietrich         Keebler LLC\nMrs. Dennis Schulist     Considine-Lockman\nKurtis Weissnat          Johns Group\nNicholas Runolfsdottir V Abernathy Group\nGlenna Reichert          Yost and Sons\nClementina DuBuque       Hoeger LLC\n\n$ example-cli users --extended\nName                     Company            ID\nLeanne Graham            Romaguera-Crona    1\nErvin Howell             Deckow-Crist       2\nClementine Bauch         Romaguera-Jacobson 3\nPatricia Lebsack         Robel-Corkery      4\nChelsey Dietrich         Keebler LLC        5\nMrs. Dennis Schulist     Considine-Lockman  6\nKurtis Weissnat          Johns Group        7\nNicholas Runolfsdottir V Abernathy Group    8\nGlenna Reichert          Yost and Sons      9\nClementina DuBuque       Hoeger LLC         10\n\n$ example-cli users --columns=name\nName\nLeanne Graham\nErvin Howell\nClementine Bauch\nPatricia Lebsack\nChelsey Dietrich\nMrs. Dennis Schulist\nKurtis Weissnat\nNicholas Runolfsdottir V\nGlenna Reichert\nClementina DuBuque\n\n$ example-cli users --filter=\"company=Group\"\nName                     Company\nKurtis Weissnat          Johns Group\nNicholas Runolfsdottir V Abernathy Group\n\n$ example-cli users --sort=company\nName                     Company\nNicholas Runolfsdottir V Abernathy Group\nMrs. Dennis Schulist     Considine-Lockman\nErvin Howell             Deckow-Crist\nClementina DuBuque       Hoeger LLC\nKurtis Weissnat          Johns Group\nChelsey Dietrich         Keebler LLC\nPatricia Lebsack         Robel-Corkery\nLeanne Graham            Romaguera-Crona\nClementine Bauch         Romaguera-Jacobson\nGlenna Reichert          Yost and Sons\n```\n\n# cli.tree\n\nGenerate a tree and display it\n\n```typescript\nlet tree = cli.tree()\ntree.insert('foo')\ntree.insert('bar')\n\nlet subtree = cli.tree()\nsubtree.insert('qux')\ntree.nodes.bar.insert('baz', subtree)\n\ntree.display()\n```\n\nOutputs:\n```shell\n├─ foo\n└─ bar\n   └─ baz\n      └─ qux\n```\n\n# cli.progress\n\nGenerate a customizable progress bar and display it\n\n```typescript\nconst simpleBar = cli.progress()\nsimpleBar.start()\n\nconst customBar = cli.progress({\n                   format: 'PROGRESS | {bar} | {value}/{total} Files',\n                   barCompleteChar: '\\u2588',\n                   barIncompleteChar: '\\u2591',\n                 })\ncustomBar.start()\n```\n\nOutputs:\n```shell\nbar1:\nprogress [=====================-------------------] 53% | ETA: 1s | 53/100\nbar2:\nPROGRESS | █████████████████████████████░░░░░░░░░░░ | 146/204 Files\n```\n\nTo see a more detailed example, run\n```shell script\n$ ts-node examples/progress.ts\n```\n\nThis extends [cli-progress](https://www.npmjs.com/package/cli-progress)\nsee all of the options and customizations there, which can be passed in with the options object.\nOnly the single bar variant of cli-progress is currently supported.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foclif%2Fcli-ux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foclif%2Fcli-ux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foclif%2Fcli-ux/lists"}