<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged tui</title>
<link>https://coderlegion.com/tag/tui</link>
<description>Powered by Question2Answer</description>
<item>
<title>Ditch the Clunky GUIs: Meet ComChan, the Blazingly Fast Rust Serial Monitor</title>
<link>https://coderlegion.com/17983/ditch-the-clunky-guis-meet-comchan-the-blazingly-fast-rust-serial-monitor</link>
<description>&lt;p&gt;If you spend any significant amount of time doing embedded systems development, you know the drill. You write your firmware, flash the microcontroller, and then… you stare at a serial monitor. &lt;/p&gt;
&lt;p&gt;For years, the options have been a bit of a mixed bag. You have the classic Arduino IDE Serial Monitor (which is functional but basic), bloated GUI protocol analyzers that eat up RAM, or simple CLI tools like &lt;code&gt;minicom&lt;/code&gt; that get the job done but lack modern developer quality-of-life features.&lt;/p&gt;
&lt;p&gt;As someone who lives in the terminal—relying on tools like Neovim and terminal multiplexers—I wanted a serial monitor that actually fit into a keyboard-driven, modern workflow. I wanted something lightweight, visually clean, and capable of handling complex data without breaking a sweat.&lt;/p&gt;
&lt;p&gt;So, I built &lt;strong&gt;ComChan&lt;/strong&gt; (Communication Channel).&lt;/p&gt;
&lt;h4 id=&quot;what-is-comchan-&quot;&gt;What is ComChan?&lt;/h4&gt;
&lt;p&gt;ComChan is a minimal, blazingly fast serial monitor and plotter built entirely in Rust. It’s designed specifically for embedded systems engineers who want powerful data visualization and logging without leaving the command line. &lt;/p&gt;
&lt;p&gt;Because it's written in Rust, it’s memory-safe, incredibly fast, and runs natively across Linux, Windows, and macOS. &lt;/p&gt;
&lt;p&gt;Here is a look at the features that make ComChan stand out from the crowd.&lt;/p&gt;
&lt;h4 id=&quot;1-the-terminal-based-serial-plotter&quot;&gt;1. The Terminal-Based Serial Plotter&lt;/h4&gt;
&lt;p&gt;Sometimes, raw text isn't enough. When you are debugging an IMU, reading ADC values, or tracking temperature sensors, you need to see the data visually. &lt;/p&gt;
&lt;p&gt;Instead of exporting data to Excel or firing up a heavy GUI application, ComChan features a built-in TUI (Terminal User Interface) plotter. You simply pass the &lt;code&gt;--plot&lt;/code&gt; flag, and ComChan will automatically parse your incoming numeric data, assign legends, and graph multiple sensor channels in real-time—right inside your terminal.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=15727656772548640252&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Found a spike you want to investigate? You can hit &lt;code&gt;Ctrl+S&lt;/code&gt; to instantly export the current plot frame as a clean SVG file.&lt;/p&gt;
&lt;p&gt;Here is how it'll look like &lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=2420146948092194581&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;2-time-travel-with-session-replay&quot;&gt;2. Time Travel with Session Replay&lt;/h4&gt;
&lt;p&gt;This is perhaps my favorite feature. Debugging intermittent hardware anomalies is a nightmare because you can't always recreate the exact physical conditions that caused the bug.&lt;/p&gt;
&lt;p&gt;ComChan introduces &lt;strong&gt;Session Replay&lt;/strong&gt;. You can log your raw serial output to a &lt;code&gt;.log&lt;/code&gt; or &lt;code&gt;.csv&lt;/code&gt; file during a test run. Later, you can run &lt;code&gt;comchan --replay &amp;lt;file&amp;gt;&lt;/code&gt; and the tool will parse the timestamps and play the data back to you in &lt;em&gt;real-time&lt;/em&gt;. &lt;/p&gt;
&lt;p&gt;It perfectly recreates the exact timing of the original hardware run. You can even replay a log file directly into the visual Plotter to analyze the anomaly visually, without needing the physical microcontroller plugged in.&lt;/p&gt;
&lt;h4 id=&quot;3-continuous-csv-streaming&quot;&gt;3. Continuous CSV Streaming&lt;/h4&gt;
&lt;p&gt;If you are doing data collection for research or analysis, ComChan can automatically parse your incoming numeric telemetry and stream it directly into a clean, multi-column &lt;code&gt;.csv&lt;/code&gt; file on the fly. &lt;/p&gt;
&lt;p&gt;The best part? This works concurrently. You can stream to a CSV in the background while actively watching the data on the TUI Plotter.&lt;/p&gt;
&lt;h4 id=&quot;4-built-for-the-modern-embedded-workflow&quot;&gt;4. Built for the Modern Embedded Workflow&lt;/h4&gt;
&lt;p&gt;ComChan includes several smaller features designed specifically to remove friction from the embedded workflow:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Auto-Detection:&lt;/strong&gt; Tired of typing &lt;code&gt;/dev/ttyUSB0&lt;/code&gt; or &lt;code&gt;COM3&lt;/code&gt;? Just use &lt;code&gt;comchan --auto&lt;/code&gt; and it will automatically find and connect to your active USB serial device.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Zephyr RTOS Support:&lt;/strong&gt; If you work with Zephyr, ComChan has a dedicated &lt;code&gt;--zephyr&lt;/code&gt; shell mode that handles its specific echo and prompt behaviors cleanly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auto-Recovery:&lt;/strong&gt; If you accidentally unplug your device or reset the power, ComChan won't crash. It detects the broken pipe and gracefully waits to reconnect when the hardware comes back online.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Configuration Files:&lt;/strong&gt; Save your favorite baud rates, data bits, and parity settings in a &lt;code&gt;.toml&lt;/code&gt; file so you don't have to pass a dozen flags every time you launch.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;the-brain-made-philosophy&quot;&gt;The &quot;Brain Made&quot; Philosophy&lt;/h4&gt;
&lt;p&gt;While AI tools are great for scaffolding tests or micro-optimizations, the core architecture, TUI design, and feature logic of ComChan are entirely human-crafted. It’s built to solve real pain points that I experience daily when working with memory-safe embedded development on ESP32s and RP2040s.&lt;/p&gt;
&lt;h4 id=&quot;try-it-out&quot;&gt;Try It Out&lt;/h4&gt;
&lt;p&gt;If you are ready to upgrade your embedded debugging workflow, ComChan is incredibly easy to install.&lt;/p&gt;
&lt;p&gt;If you have Cargo installed:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;cargo install comchan
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For Arch Linux users, it's available on the AUR:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;yay -S comchan
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can check out the full source code, read the documentation, and contribute on GitHub: &lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/Vaishnav-Sabari-Girish/ComChan&quot;&gt;Vaishnav-Sabari-Girish/ComChan&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Drop a star if you find it useful, and let me know what features you’d like to see next (a Hex Dump mode is already on the roadmap!). Happy debugging!&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/17983/ditch-the-clunky-guis-meet-comchan-the-blazingly-fast-rust-serial-monitor</guid>
<pubDate>Fri, 15 May 2026 15:58:16 +0000</pubDate>
</item>
<item>
<title>Send emails from the terminal using pop</title>
<link>https://coderlegion.com/8712/send-emails-from-the-terminal-using-pop</link>
<description>&lt;h2 id=&quot;multi-account-email-sender-pop-wrapper-&quot;&gt;Multi-Account Email Sender (pop wrapper)&lt;/h2&gt;
&lt;p&gt;This script wraps Charm's &lt;code&gt;pop&lt;/code&gt; to send emails from &lt;strong&gt;multiple accounts&lt;/strong&gt; directly from your terminal &lt;strong&gt;without config edits&lt;/strong&gt;. Select your email, then use pop's interactive UI or CLI flags.&lt;/p&gt;
&lt;h3 id=&quot;features&quot;&gt;Features&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Switch between multiple SMTP accounts via &lt;code&gt;gum&lt;/code&gt; (or fallback menu)&lt;/li&gt;
&lt;li&gt;Secure secrets from &lt;code&gt;~/.zsh_secrets&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Exports &lt;code&gt;POP_SMTP_USERNAME&lt;/code&gt;, &lt;code&gt;POP_SMTP_PASSWORD&lt;/code&gt;, &lt;code&gt;POP_FROM&lt;/code&gt; automatically&lt;/li&gt;
&lt;li&gt;Passes all &lt;code&gt;pop&lt;/code&gt; args through&lt;/li&gt;
&lt;li&gt;Shellcheck clean, bash-compatible&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;environment-variables&quot;&gt;Environment Variables&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;In &lt;code&gt;~/.zshrc&lt;/code&gt; (non-sensitive):&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;export POP_SMTP_HOST=&quot;smtp.gmail.com&quot; # or smtp.outlook.com, etc.
export POP_SMTP_PORT=587
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;In &lt;code&gt;~/.zsh_secrets&lt;/code&gt; (chmod 600, gitignore!):&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;export POP_SMTP_USERNAME1=&quot;*Emails are not allowed*&quot;
export POP_SMTP_PASSWORD1=&quot;abcd efgh ijkl mnop&quot; # Gmail/Outlook APP PASSWORD
export POP_SMTP_USERNAME2=&quot;*Emails are not allowed*&quot;
export POP_SMTP_PASSWORD2=&quot;ijkl mnop qrst uvwx&quot; # APP PASSWORD (16 chars, no spaces)
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;⚠️ &lt;code&gt;POP_SMTP_PASSWORD&lt;/code&gt;s are app-specific passwords&lt;/strong&gt; (not your regular login)—generate from Gmail/Outlook 2FA security settings.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;dependencies&quot;&gt;Dependencies&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/charmbracelet/pop&quot;&gt;pop&lt;/a&gt; (Charm)&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/charmbracelet/gum&quot;&gt;gum&lt;/a&gt; &lt;em&gt;(optional, menu fallback built-in)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;usage&quot;&gt;Usage&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;chmod +x ~/.local/bin/send_email
send_email # Interactive pop
send_email --to *Emails are not allowed* --subject &quot;Hi&quot; --body &quot;Test&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Here is the link to the gist&lt;/strong&gt; &lt;em&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://gist.github.com/Vaishnav-Sabari-Girish/51cbfc493fee25c209c39f0e74a17103&quot;&gt;https://gist.github.com/Vaishnav-Sabari-Girish/51cbfc493fee25c209c39f0e74a17103&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Save your dotfiles workflow! &lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/8712/send-emails-from-the-terminal-using-pop</guid>
<pubDate>Mon, 22 Dec 2025 07:27:15 +0000</pubDate>
</item>
<item>
<title>Note Taking app script</title>
<link>https://coderlegion.com/8283/note-taking-app-script</link>
<description>&lt;h2 id=&quot;notes-taking-script&quot;&gt;Notes taking script&lt;/h2&gt;
&lt;p&gt;This script is a small note-taking application in itself where it lets you do the following &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a new note &lt;/li&gt;
&lt;li&gt;Open notes &lt;/li&gt;
&lt;li&gt;Preview notes &lt;/li&gt;
&lt;li&gt;Search for notes&lt;/li&gt;
&lt;li&gt;Delete notes&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;dependencies-1&quot;&gt;Dependencies&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/charmbracelet/gum&quot;&gt;&lt;code&gt;gum&lt;/code&gt;&lt;/a&gt; or &lt;code&gt;fzf&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/charmbracelet/glow&quot;&gt;&lt;code&gt;glow&lt;/code&gt;&lt;/a&gt; or &lt;code&gt;bat&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The first time you run the script it'll ask you the name of the directory you wanna save your notes in. &lt;/p&gt;
&lt;p&gt;Here is the link to the gist &lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://gist.github.com/Vaishnav-Sabari-Girish/a75e9c59c268a4c2e93aaad7961df4fa&quot;&gt;https://gist.github.com/Vaishnav-Sabari-Girish/a75e9c59c268a4c2e93aaad7961df4fa&lt;/a&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/8283/note-taking-app-script</guid>
<pubDate>Mon, 08 Dec 2025 14:19:33 +0000</pubDate>
</item>
<item>
<title>Advent of Code Interactive</title>
<link>https://coderlegion.com/8012/advent-of-code-interactive</link>
<description>&lt;h2 id=&quot;advent-of-code-interactive&quot;&gt;Advent of Code Interactive&lt;/h2&gt;
&lt;p&gt;This script provides an interactive experience using the &lt;code&gt;aoc-cli&lt;/code&gt; too. &lt;/p&gt;
&lt;h3 id=&quot;dependencies-2&quot;&gt;Dependencies&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;aoc-cli&lt;/code&gt; : &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/scarvalhojr/aoc-cli&quot;&gt;https://github.com/scarvalhojr/aoc-cli&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gum&lt;/code&gt; : &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/charmbracelet/gum&quot;&gt;https://github.com/charmbracelet/gum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;glow&lt;/code&gt; : &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/charmbracelet/glow&quot;&gt;https://github.com/charmbracelet/glow&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With this script you can&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;View problems (By selecting the days)&lt;/li&gt;
&lt;li&gt;Download the problem and input&lt;/li&gt;
&lt;li&gt;Submit answer&lt;/li&gt;
&lt;li&gt;View calendar&lt;/li&gt;
&lt;li&gt;View the leaderboard (Private)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here is the link to my gist where I have pushed the script &lt;/p&gt;
&lt;p&gt;Link : &lt;a rel=&quot;nofollow&quot; href=&quot;https://gist.github.com/Vaishnav-Sabari-Girish/bc213e8539e666dac74249f25a868dec&quot;&gt;https://gist.github.com/Vaishnav-Sabari-Girish/bc213e8539e666dac74249f25a868dec&lt;/a&gt;&lt;/p&gt;
</description>
<category>Command Line Tools</category>
<guid isPermaLink="true">https://coderlegion.com/8012/advent-of-code-interactive</guid>
<pubDate>Mon, 01 Dec 2025 10:09:08 +0000</pubDate>
</item>
</channel>
</rss>