### Install bun-promptx Source: https://github.com/wobsoriano/bun-promptx/blob/main/README.md Installs the bun-promptx library using the Bun package manager. ```bash bun add bun-promptx ``` -------------------------------- ### Create Terminal Input Prompt with bun-promptx (Password, Shortcuts) Source: https://github.com/wobsoriano/bun-promptx/blob/main/README.md Shows how to create a terminal input prompt using `createPrompt`. It supports standard terminal shortcuts, CJK character input, and password masking via the `echoMode` option. ```javascript import { createPrompt } from 'bun-promptx' const username = createPrompt("Enter username: ") // Expected output: { value: "wobsoriano", error: null } const password = createPrompt("Enter password: ", { echoMode: 'password' }) // Expected output: { value: "123456", error: null } ``` -------------------------------- ### Create Terminal Single-Selection List Prompt with bun-promptx Source: https://github.com/wobsoriano/bun-promptx/blob/main/README.md Demonstrates how to create a terminal single-selection list prompt using the `createSelection` function. It supports custom rendering, pagination, and provides the selected index. ```javascript import { createSelection } from 'bun-promptx' const result = createSelection([ { text: 'feat', description: 'Introducing new features' }, { text: 'fix', description: 'Bug fix' }, { text: 'docs', description: 'Writing docs' }, { text: 'style', description: 'Improving structure/format of the code' }, { text: 'refactor', description: 'Refactoring code' }, { text: 'test', description: 'Refactoring code' }, { text: 'chore', description: 'When adding missing tests' }, { text: 'perf', description: 'Improving performance' } ], { headerText: 'Select Commit Type: ', perPage: 5, footerText: 'Footer here' }) console.log(result) // Expected output: { selectedIndex: 2, error: null } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.