with one click
bombshell-dev-clack
// ALWAYS use when writing code importing "@clack/prompts". Consult for debugging, best practices, or modifying @clack/prompts, clack/prompts, clack prompts, clack.
// ALWAYS use when writing code importing "@clack/prompts". Consult for debugging, best practices, or modifying @clack/prompts, clack/prompts, clack prompts, clack.
| name | bombshell-dev-clack |
| description | ALWAYS use when writing code importing "@clack/prompts". Consult for debugging, best practices, or modifying @clack/prompts, clack/prompts, clack prompts, clack. |
| metadata | {"version":"1.0.1"} |
@clack/promptsVersion: 1.0.1 (yesterday) Deps: picocolors@^1.0.0, sisteransi@^1.0.5, @clack/core@1.0.1 Tags: alpha: 1.0.0-alpha.10 (2 weeks ago), latest: 1.0.1 (yesterday)
References: package.json ⢠README ⢠GitHub Issues ⢠Releases
Use npx -y skilld search instead of grepping .skilld/ directories ā hybrid semantic + keyword search across all indexed docs, issues, and releases.
npx -y skilld search "query" -p @clack/prompts
npx -y skilld search "issues:error handling" -p @clack/prompts
npx -y skilld search "releases:deprecated" -p @clack/prompts
Filters: docs:, issues:, releases: prefix narrows by source type.
ā ļø ESM-only ā v1.0 dropped CJS dual-publish, require('@clack/prompts') no longer works source
ā ļø spinner.stop(msg, 1) / spinner.stop(msg, 2) ā v1.0 replaced numeric codes with spinner.cancel(msg) and spinner.error(msg) source
ā ļø suggestion prompt ā added then removed in v1.0, use path prompt (autocomplete-based) instead source
ā ļø placeholder in text() ā v1.0 changed to visual-only hint, no longer used as tabbable/return value source
⨠autocomplete() / autocompleteMultiselect() ā new in v1.0, searchable select with filter option for custom/fuzzy matching source
⨠progress() ā new in v1.0, displays a progress bar with start(), stop(), cancel(), error() methods source
⨠taskLog() ā new in v1.0, scrolling log output cleared on success; supports group() for nested log sections source
⨠box() ā new in v1.0, renders boxed text similar to note source
⨠path() ā new in v1.0, autocomplete-based file path prompt source
⨠stream.step() ā new in v0.10, renders async iterable message streams (useful for LLM output) source
⨠spinner({ indicator: 'timer' }) ā new in v0.10, shows elapsed time instead of dots animation source
⨠updateSettings({ aliases, messages }) ā new in v0.9, configures global keybindings and i18n cancel/error messages source
⨠signal option ā new in v0.9, all prompts accept AbortSignal for programmatic cancellation source
⨠withGuide option ā new in v1.0, disables the default clack border on any prompt source
⨠spinner.clear() ā new in v1.0, stops and clears spinner output entirely source
⨠confirm({ vertical: true }) ā new in v1.0.1, arranges yes/no options vertically source
ā
Use spinner.cancel() and spinner.error() instead of stop codes ā v1.0 replaced stop(msg, code) with distinct methods source
const s = spinner()
s.start('Deploying')
// s.stop('Done') // success
// s.cancel('Aborted') // user cancelled (CTRL+C)
// s.error('Failed') // error occurred
// s.clear() // stop and clear all output
ā
Pass signal to prompts for programmatic cancellation ā all prompts accept AbortSignal since v0.9.0 source
const answer = await confirm({
message: 'Continue?',
signal: AbortSignal.timeout(5000),
})
ā
Use group() with onCancel instead of checking isCancel after every prompt ā centralizes cancellation handling for multi-step flows source
const result = await p.group({
name: () => p.text({ message: 'Name?' }),
lang: () => p.select({ message: 'Language?', options }),
}, {
onCancel: () => { p.cancel('Cancelled.'); process.exit(0) },
})
ā
Use updateSettings for global i18n messages and key aliases ā per-instance options override globals source
import { updateSettings } from '@clack/prompts'
updateSettings({
aliases: { w: 'up', s: 'down' },
messages: { cancel: 'Cancelado', error: 'Error' },
})
ā
Use stream instead of log for LLM/async output ā accepts sync and async iterables, renders incrementally source
await stream.step((async function* () {
yield* generateLLMResponse(question)
})())
ā
Use taskLog for subprocess output ā renders lines continuously, clears on success, preserves on error source
const tl = taskLog({ title: 'Building' })
for await (const line of buildProcess()) tl.message(line)
success ? tl.success('Done') : tl.error('Failed')
ā
Distinguish placeholder from defaultValue in text() ā placeholder is visual-only hint, never returned as value (changed in v1.0); use defaultValue for the fallback return value source
const name = await text({
message: 'Project name?',
placeholder: 'my-app', // visual hint only, NOT returned
defaultValue: 'my-app', // returned when user presses Enter without typing
})
ā
v1.0 is ESM-only ā CJS require() no longer works; use dynamic import() or switch to ESM source
ā
Guard against empty options arrays in select/multiselect ā passing [] throws TypeError: Cannot read properties of undefined source
ā
Vim keybindings (h/j/k/l) and Escape ā cancel are enabled by default since v0.9.0 ā updateSettings cannot disable defaults, only add aliases source
Refactor for cleaner architecture
Step back and review
TypeScript is a language for application scale JavaScript development. ALWAYS use when editing or working with *.ts, *.tsx, *.mts, *.cts files or code importing "typescript". Consult for debugging, best practices, or modifying typescript, TypeScript.
Log by overwriting the previous output in the terminal. Useful for rendering progress bars, animations, etc. ALWAYS use when writing code importing "log-update". Consult for debugging, best practices, or modifying log-update, log update.
ALWAYS use when writing code importing "sqlite-vec". Consult for debugging, best practices, or modifying sqlite-vec, sqlite vec.
ALWAYS use when writing code importing "citty". Consult for debugging, best practices, or modifying citty.