feat(cli): add terminal-aware text wrapping for descriptions#5
Merged
Conversation
Long skill descriptions were hard to read due to raw terminal line wrapping breaking mid-word. Add `wrap-ansi` to word-wrap descriptions to the terminal width with consistent indentation. - Add `wrapText` utility in src/format.ts using `wrap-ansi` - Wrap descriptions in `info` and `add` commands - Make `list` truncation responsive to terminal width Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
txnlab-release-bot bot
added a commit
that referenced
this pull request
Feb 10, 2026
# [1.1.0](v1.0.0...v1.1.0) (2026-02-10) ### Features * **cli:** add terminal-aware text wrapping for descriptions ([#5](#5)) ([ea834a6](ea834a6))
Contributor
|
🎉 This PR is included in version 1.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
infoandaddcommands usingwrap-ansi, so long descriptions reflow cleanly instead of breaking mid-wordlistcommand truncation responsive to terminal width instead of hardcoded 80 columnsDetails
Long skill descriptions (e.g.,
use-wallet,nfd) were hard to read because the CLI printed raw text that the terminal hard-wrapped at arbitrary positions. This adds awrapTextutility that detects terminal width viaprocess.stdout.columnsand useswrap-ansito word-wrap text with consistent indentation.Changes:
wrapText(text, indent)utility→prefix)process.stdout.columnsfor truncation widthTest plan
npx @txnlab/skills info use-wallet— description wraps at word boundaries with 2-space indentnpx @txnlab/skills add nfd use-wallet— descriptions wrap with 4-space indentnpx @txnlab/skills list— truncation adapts to terminal widthbun testpassesbun run lintpasses