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.
npx skills add https://github.com/skilld-dev/skilld --skill sindresorhus-log-update
log-update> Log by overwriting the previous output in the terminal. Useful for rendering progress bars, animations, etc.
Version: 7.2.0
Deps: ansi-escapes@^7.3.0, cli-cursor@^5.0.0, slice-ansi@^8.0.0, strip-ansi@^7.2.0, wrap-ansi@^10.0.0
Tags: latest: 7.2.0
References: package.json — exports, entry points • GitHub Issues — bugs, workarounds, edge cases • Releases — changelog, breaking changes, new APIs
Use skilld search "query" -p log-update instead of grepping .skilld/ directories. Run skilld search --guide -p log-update for full syntax, filters, and operators.
<!-- skilld:api-changes -->
This section documents version-specific API changes — prioritize recent major/minor releases.
persist(...text) method added in v7.0.0 — writes output that persists in terminal scrollback, unlike the main logUpdate() which updates in place sourcedefaultWidth option added in v7.0.0 — allows specifying terminal width (default: 80) when the stream doesn't provide columns property, useful for piped or redirected output sourcedefaultHeight option added in v7.0.0 — allows specifying terminal height (default: 24) when the stream doesn't provide rows property, useful for piped or redirected output sourceAlso changed: Partial update rendering optimization v7.0.0 · Trailing newline handling fixes v7.0.1–v7.0.2
<!-- /skilld:api-changes -->
<!-- skilld:best-practices -->
.persist() for permanent terminal output that should remain in scrollback history — it writes like console.log() instead of updating in-place, ideal for results or status messages that users need to scroll back to review source.done() before starting a new log session to persist the current output and prepare for fresh updates below — prevents scrollback contamination sourceshowCursor: true when your CLI accepts user input or displays a prompt — otherwise the hidden cursor creates a poor UX for interactive interfaces sourcedefaultWidth and defaultHeight options when output is piped, redirected, or running in non-TTY environments — without this, the library assumes 80x24 which causes incorrect line wrapping and erasure sourcelogUpdate instances via createLogUpdate(stream) for each independent update context instead of reusing the default export — prevents one instance's updates from clobbering another's sourcelogUpdateStderr for error messages and warnings instead of logUpdate — maintains separation between stdout and stderr streams source<!-- /skilld:best-practices -->
Take skilld-dev/sindresorhus-log-update from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.