# linegauge > Measures, wraps, truncates and slices styled terminal text, grapheme-correct over Intl.Segmenter, with the same result on a terminal, a pipe or --json. Zero dependencies. Drop-in paths for string-width, wrap-ansi, strip-ansi, slice-ansi, cli-truncate and widest-line. ## Documentation - [linegauge/cli-truncate](https://linegauge.interlace.tools/docs/api/cli-truncate): Every export of linegauge/cli-truncate, with its signature and doc comment: cliTruncate, plus 1 type. - [linegauge](https://linegauge.interlace.tools/docs/api): Every export of linegauge, with its signature and doc comment: lineCount, measure, width, width, strip, widest and 3 more, plus 4 types. - [linegauge/plugin](https://linegauge.interlace.tools/docs/api/plugin): Every export of linegauge/plugin, with its signature and doc comment: setOverrides, overrides, problems, validate, register, CONTRACT and 1 more, plus 3 types. - [linegauge/slice](https://linegauge.interlace.tools/docs/api/slice): Every export of linegauge/slice, with its signature and doc comment: slice, slice. - [linegauge/strip](https://linegauge.interlace.tools/docs/api/strip): Every export of linegauge/strip, with its signature and doc comment: strip, strip. - [linegauge/truncate](https://linegauge.interlace.tools/docs/api/truncate): Every export of linegauge/truncate, with its signature and doc comment: truncate, plus 1 type. - [linegauge/widest-line](https://linegauge.interlace.tools/docs/api/widest-line): Every export of linegauge/widest-line, with its signature and doc comment: widestLine. - [linegauge/widest](https://linegauge.interlace.tools/docs/api/widest): Every export of linegauge/widest, with its signature and doc comment: widest. - [linegauge/wrap](https://linegauge.interlace.tools/docs/api/wrap): Every export of linegauge/wrap, with its signature and doc comment: visibleWidth, wrap, wrap, plus 2 types. - [Changelog](https://linegauge.interlace.tools/docs/changelog): Every release of linegauge, newest first, from its CHANGELOG.md — what changed and the pull request it came from. - [Coming from slice-ansi](https://linegauge.interlace.tools/docs/coming-from/slice-ansi): A slice-ansi alternative with a drop-in path: import sliceAnsi from linegauge/slice, graded 106 / 106 by slice-ansi 10's own test suite — then zero dependencies, grapheme clusters never halved, and one style stack shared with wrap. - [Coming from string-width](https://linegauge.interlace.tools/docs/coming-from/string-width): A string-width alternative with zero dependencies: linegauge's default export is string-width, graded 233 / 233 by its own suite — plus wrap-ansi, strip-ansi and slice-ansi paths, grapheme-correct over Intl.Segmenter and pure, so a pipe and a terminal get the same columns. - [Coming from strip-ansi](https://linegauge.interlace.tools/docs/coming-from/strip-ansi): A strip-ansi alternative with a drop-in path: import stripAnsi from linegauge/strip, graded 8 / 8 by strip-ansi's own test suite — then no ansi-regex underneath, and one escape scanner shared with width, wrap and slice, so what strip removes is exactly what they count as zero columns. - [Coming from wrap-ansi](https://linegauge.interlace.tools/docs/coming-from/wrap-ansi): A wrap-ansi alternative with a drop-in path: import wrapAnsi from linegauge/wrap, graded 85 / 85 by wrap-ansi's own test suite — then zero dependencies, one style stack shared with slice, and the same grapheme-correct width string-width is graded on, so a wrapped row measures the way a terminal draws it. - [Compatibility](https://linegauge.interlace.tools/docs/drop-ins): How linegauge's four drop-ins are graded — each incumbent's own test suite, unedited — the current grades, and the differences that remain. - [FAQ](https://linegauge.interlace.tools/docs/faq): Short answers about linegauge — terminal width, emoji, CJK, ambiguous characters, Nerd Fonts, non-strings, CommonJS and overrides — each with where to read more. - [Getting started](https://linegauge.interlace.tools/docs/getting-started): Install linegauge, measure a string in terminal columns, and wrap, truncate and slice styled text without cutting a grapheme cluster or leaking a colour. - [Slicing and truncating](https://linegauge.interlace.tools/docs/guides/cutting): slice() cuts a column range that closes its own styles and never splits a grapheme cluster; truncate() shortens to a budget with the ellipsis counted inside it, from the end, the start or the middle. - [Measuring](https://linegauge.interlace.tools/docs/guides/measuring): width() counts terminal columns by grapheme cluster and East Asian Width, with string-width's two options; lineCount, measure and widest answer the neighbouring questions. - [Width plugins](https://linegauge.interlace.tools/docs/guides/plugins): When a terminal or font disagrees with Unicode about a code point, a plugin says so as data — ranges, columns and why — and npx linegauge check validates it before it ships. - [Stripping escapes](https://linegauge.interlace.tools/docs/guides/stripping): strip() removes every escape sequence width, wrap and slice count as zero columns — SGR in every dialect, OSC 8 hyperlinks, cursor and erase commands — with one scanner shared by all of them. - [Wrapping](https://linegauge.interlace.tools/docs/guides/wrapping): wrap() folds styled text to a column width, closing every style and hyperlink at the end of a row and reopening it on the next — wrap-ansi's API and options, graded by its suite. - [linegauge](https://linegauge.interlace.tools/docs): Measures, wraps, truncates and slices styled terminal text, grapheme-correct over Intl.Segmenter, with the same result on a terminal, a pipe or --json. Zero dependencies. Drop-in paths for string-width, wrap-ansi, strip-ansi, slice-ansi, cli-truncate and widest-line. - [Aligning columns](https://linegauge.interlace.tools/docs/recipes/aligning-columns): Pad text to a column count with width() and widest(), so CJK names and emoji do not push a column out of line the way padEnd does. - [Incremental migration](https://linegauge.interlace.tools/docs/recipes/incremental-migration): Move from string-width, wrap-ansi, strip-ansi and slice-ansi one import at a time, or move a transitive copy with npm overrides, checking each step. - [Shortening paths](https://linegauge.interlace.tools/docs/recipes/shortening-paths): Fit a file path into a fixed-width column with truncate(), keeping both ends — the directory it starts in and the file it names. - [Wrapping help text](https://linegauge.interlace.tools/docs/recipes/wrapping-help): Wrap a paragraph to the terminal's width with an indent, and to a fixed width in a pipe or a test, so help output never runs off the right edge. - [Why linegauge](https://linegauge.interlace.tools/docs/why-linegauge): linegauge against string-width, wrap-ansi, strip-ansi and slice-ansi, one capability per row, every cell linked to the test, grade or source that proves it. ## Family - [burgee](https://burgee.interlace.tools): the family front door - [Compatibility](https://burgee.interlace.tools/docs/compatibility): Every drop-in path in the family, graded by the incumbent’s own test suite. - [Gallery](https://burgee.interlace.tools/docs/gallery): Every glyph, spinner and border the family has registered, rendered. - [Comparison](https://burgee.interlace.tools/docs/comparison): The family against its incumbents: weight, speed and surface.