<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nolan Stark</title>
    <description>The latest articles on DEV Community by Nolan Stark (@sapirrior).</description>
    <link>https://dev.to/sapirrior</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3895039%2F2e705ff3-c31c-43c4-8065-9a271b4a6cae.png</url>
      <title>DEV Community: Nolan Stark</title>
      <link>https://dev.to/sapirrior</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sapirrior"/>
    <language>en</language>
    <item>
      <title>I built Inklin because I wanted a better terminal styling experience for Node.js</title>
      <dc:creator>Nolan Stark</dc:creator>
      <pubDate>Fri, 24 Apr 2026 00:34:23 +0000</pubDate>
      <link>https://dev.to/sapirrior/i-built-inklin-because-i-wanted-a-better-terminal-styling-experience-for-nodejs-4non</link>
      <guid>https://dev.to/sapirrior/i-built-inklin-because-i-wanted-a-better-terminal-styling-experience-for-nodejs-4non</guid>
      <description>&lt;p&gt;I built Inklin because I wanted a better terminal styling experience for Node.js&lt;/p&gt;

&lt;p&gt;When working on CLI tools, I kept running into the same limitations with existing styling libraries.&lt;/p&gt;

&lt;p&gt;They were good—but once you start building more complex terminal output, a few problems start to show up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;nested styles don’t behave predictably&lt;/li&gt;
&lt;li&gt;module system support can get messy (ESM vs CommonJS)&lt;/li&gt;
&lt;li&gt;some libraries feel heavier than they should for simple styling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I built Inklin.&lt;/p&gt;

&lt;p&gt;It’s a small terminal styling utility for Node.js that focuses on predictable behavior, modern module support, and minimal overhead.&lt;/p&gt;

&lt;p&gt;What Inklin does&lt;/p&gt;

&lt;p&gt;Inklin is not trying to replace everything—it’s focused on a few specific improvements.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Smart style nesting&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Most terminal styling libraries reset styles when a nested style ends.&lt;/p&gt;

&lt;p&gt;That creates unexpected output when combining styles.&lt;/p&gt;

&lt;p&gt;Inklin instead tracks a style stack, so parent styles are restored automatically.&lt;/p&gt;

&lt;p&gt;Example idea:&lt;/p&gt;

&lt;p&gt;red("Error: " + blue("file not found"))&lt;/p&gt;

&lt;p&gt;After blue() ends, the output correctly returns to red() instead of resetting to default.&lt;/p&gt;

&lt;p&gt;This makes deeply nested styling more predictable in real CLI output.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;ESM + CommonJS support out of the box&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One of the most annoying parts of modern Node.js libraries is module compatibility.&lt;/p&gt;

&lt;p&gt;Inklin works in both environments without extra setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ESM (import)&lt;/li&gt;
&lt;li&gt;CommonJS (require)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No dual package confusion, no build hacks required for basic usage.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Modern terminal features&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Inklin includes support for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Truecolor (HEX and RGB)&lt;/li&gt;
&lt;li&gt;OSC 8 hyperlinks (clickable terminal links)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are useful for modern CLI tools where terminals are no longer just plain text environments.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Lightweight core (~3KB)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The goal was to keep the core small and predictable.&lt;/p&gt;

&lt;p&gt;No large dependency tree, no unnecessary abstractions.&lt;/p&gt;

&lt;p&gt;How it works internally&lt;/p&gt;

&lt;p&gt;Under the hood, Inklin uses a lazy Proxy-based chaining system.&lt;/p&gt;

&lt;p&gt;Instead of eagerly computing styles, it builds them dynamically when accessed.&lt;/p&gt;

&lt;p&gt;This allows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;flexible chaining APIs&lt;/li&gt;
&lt;li&gt;minimal runtime overhead&lt;/li&gt;
&lt;li&gt;consistent output behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also uses a recursive structure to manage style composition, which helps keep nesting behavior consistent.&lt;/p&gt;

&lt;p&gt;Example usage&lt;/p&gt;

&lt;p&gt;import inklin from "inklin";&lt;/p&gt;

&lt;p&gt;console.log(&lt;br&gt;
  inklin.red.bold("Error:") + " something went wrong"&lt;br&gt;
);&lt;/p&gt;

&lt;p&gt;Or chain-style:&lt;/p&gt;

&lt;p&gt;inklin.bold.blue("Hello world").log();&lt;/p&gt;

&lt;p&gt;Why I built it&lt;/p&gt;

&lt;p&gt;The goal wasn’t to reinvent terminal styling.&lt;/p&gt;

&lt;p&gt;It was to explore a simpler, more predictable API for CLI output while avoiding some of the edge-case issues I kept running into in real projects.&lt;/p&gt;

&lt;p&gt;Especially around:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;nested styling behavior&lt;/li&gt;
&lt;li&gt;module compatibility friction&lt;/li&gt;
&lt;li&gt;lightweight CLI design&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Repo&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/sapirrior/inklin" rel="noopener noreferrer"&gt;https://github.com/sapirrior/inklin&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feedback welcome&lt;/p&gt;

&lt;p&gt;I’d especially appreciate feedback on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API design (is chaining intuitive enough?)&lt;/li&gt;
&lt;li&gt;edge cases in nested styling&lt;/li&gt;
&lt;li&gt;performance considerations for CLI-heavy use cases&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>npm</category>
      <category>node</category>
    </item>
  </channel>
</rss>
