npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

serialconsole

v1.0.1

Published

Cross-platform serial port monitor and console with TUI interface, auto-reconnect, and hex viewer. Ideal for embedded systems debugging.

Downloads

11

Readme

🚀 SerialConsole

npm version npm downloads GitHub issues GitHub license Node.js Version

A powerful cross-platform serial port monitor with interactive TUI interface, auto-reconnect, and hex viewer. Perfect for embedded systems development, Arduino programming, and hardware debugging.

🎉 Now Published on npm! Install globally with npm install -g serialconsole

SerialConsole Demo

✨ Features

  • 📊 Interactive Port Selection - List and select ports with baud rate configuration
  • 🖥️ Responsive TUI Interface - Professional terminal UI with real-time statistics
  • 🔄 Auto-Reconnect - Intelligent reconnection with exponential backoff
  • 🔍 Hex Viewer - Toggle between ASCII and hex display modes
  • Multiple Baud Rates - Support for all common rates plus custom values
  • 🎮 Nano-style Controls - Familiar keyboard shortcuts (Ctrl+Q, Ctrl+I, etc.)
  • 📱 Cross-Platform - Works on Windows, macOS, and Linux
  • 🎯 Message Filtering - Filter incoming data in real-time
  • 📝 Multiple Modes - Read-only, write-only, interactive, and full monitor modes

🚀 Installation

NPM (Recommended - Published Package!)

# Install globally from npm
npm install -g serialconsole

# Alternative with short alias
npm install -g serialconsole && alias sc=serialconsole

# Verify installation
serialconsole --version

Binary Downloads

Download pre-built binaries from Releases:

  • Windows: serialconsole-win.exe
  • macOS: serialconsole-macos
  • Linux: serialconsole-linux

Package Managers

# NPM (Global)
npm install -g serialconsole

# NPX (No installation required)
npx serialconsole list

# Yarn (Global)
yarn global add serialconsole

📖 Quick Start

Interactive Mode (Recommended)

# List ports and select interactively
serialconsole list
# or use short alias
sc list

What this does:

  1. 📋 Shows all available serial ports with details
  2. 🎯 Let you select a port by number
  3. ⚡ Choose baud rate from common options or custom
  4. 🚀 Launches the TUI monitor automatically

Direct Commands

# Full TUI monitor
serialconsole monitor /dev/ttyUSB0 -b 115200

# Simple read mode
serialconsole read /dev/ttyACM0

# Send data
serialconsole write /dev/ttyUSB0 "Hello Arduino" --newline

# Interactive chat mode
serialconsole interactive COM3 -b 9600

Usage Examples

# Arduino development workflow
serialconsole list                           # Select Arduino port
serialconsole monitor /dev/ttyACM0 -b 9600   # Monitor Arduino output

# ESP32 debugging
serialconsole monitor COM4 -b 115200         # Monitor ESP32 with auto-reconnect

# Quick data sending
serialconsole write /dev/ttyUSB0 "AT+GMR"    # Send AT command

🎮 TUI Controls

| Key | Action | Description | |-----|--------|-------------| | Ctrl+Q | Exit | Close the application | | Ctrl+I | Send message | Open input dialog to send data | | Ctrl+H | Toggle hex viewer | Switch between ASCII and hex display | | Ctrl+S | Toggle statistics | Show/hide detailed statistics panel | | Ctrl+P | Pause/resume | Pause or resume data logging | | Ctrl+C | Clear screen | Clear all displayed messages | | Ctrl+F | Set filter | Filter messages by text content | | Ctrl+E | Toggle echo | Show/hide sent messages | | Ctrl+L | Line endings | Cycle through LF/CR/CRLF | | Ctrl+R | Auto-reconnect | Toggle automatic reconnection |

🛠️ Use Cases

  • 🔧 Arduino Development - Monitor serial output and send commands during coding
  • 📡 ESP32/ESP8266 Projects - Debug IoT devices with intelligent auto-reconnect
  • ⚙️ Embedded Systems - Professional monitoring for production debugging
  • 🧪 Hardware Testing - Validate serial communication protocols
  • 📚 Educational - Learn serial communication with visual real-time feedback
  • 🥧 Raspberry Pi - Monitor UART communication with sensors and peripherals
  • 🏭 Industrial IoT - Monitor industrial devices and sensors
  • 🤖 Robotics - Debug robot communication and sensor data

📊 Interface Overview

┌─────────────────────────────────────────────────────────────────────────────┐
│ 🚀 ByteStream Monitor - /dev/ttyUSB0                                          │
├─────────────────────────────────────────────────────────────────────────────┤
│ 📡 Port: /dev/ttyUSB0 @ 115200 | 🟢 Connected | ⏱️ 00:05:23 | 📊 1,247 msgs │
│ 📥 RX: 15.2KB (51.3 B/s) | 📤 TX: 2.1KB (7.1 B/s) | ▶️ | 🔍 | 🔄           │
├─────────────────────────────────────────────────────────────────────────────┤
│ [14:30:25.123] ← Temperature: 23.5°C, Humidity: 45%                          │
│ [14:30:26.089] ← Sensor reading complete                                     │
│ [14:30:27.156] → status                                                      │
│ [14:30:27.201] ← System OK - All sensors operational                         │
├─────────────────────────────────────────────────────────────────────────────┤
│ ^Q Exit     ^I Send Msg   ^H Hex View   ^S Statistics   ^P Pause     ^C Clear│
│ ^F Filter     ^E Echo Mode  ^L Line End   ^R Auto-Reconnect                  │
└─────────────────────────────────────────────────────────────────────────────┘

⚙️ Configuration

Supported Baud Rates

  • 9600 (default) - Standard for many devices
  • 19200, 38400, 57600 - Legacy systems
  • 115200 - Arduino Uno/Nano standard
  • 230400, 460800, 921600 - High-speed communication
  • Custom rates - Any valid baud rate supported

Line Ending Options

  • LF (\n) - Linux/macOS standard
  • CR (\r) - Classic Mac format
  • CRLF (\r\n) - Windows standard

Advanced Features

  • 🎯 Real-time Filtering - Show only messages containing specific text
  • 🔄 Smart Auto-Reconnect - Handles device resets and power cycles
  • 📊 Live Statistics - Bytes sent/received, message count, uptime
  • 🔍 Hex Display - View raw data in hexadecimal format
  • ⏸️ Pause/Resume - Pause logging without disconnecting

🔧 Advanced Usage

Filtering Messages

# Start monitoring, then press Ctrl+F
# Enter "error" to show only error messages
# Enter "temp" to show only temperature readings
# Leave empty to disable filtering

Auto-Reconnect Workflow

Perfect for development where devices reset frequently:

  • ✅ Automatically detects disconnections
  • ⏱️ Exponential backoff prevents connection spam
  • 🔄 Visual countdown shows next reconnection attempt
  • 🛡️ Gracefully handles permission errors
  • 🎯 Continues where you left off

Hex Viewer Usage

ASCII View:                    Hex View:
← Temperature: 23.5°C         ← [14:30:25] 54 65 6D 70 65 72 61 74 75 72 65 3A 20 32 33 2E 35 C2 B0 43
← Sensor OK                   ← [14:30:26] 53 65 6E 73 6F 72 20 4F 4B

🚧 Development

Building from Source

# Clone repository
git clone https://github.com/Sigmakib2/serialconsole.git
cd serialconsole

# Install dependencies
npm install

# Run directly
node index.js list

# Test all commands
npm test

Building Binaries

# Build for all platforms
npm run build:all

# Build for specific platform
npx pkg . --targets node18-win-x64 --compress GZip
npx pkg . --targets node18-linux-x64 --compress GZip
npx pkg . --targets node18-macos-x64 --compress GZip

# Outputs to dist/ directory
ls dist/

Project Structure

serialconsole/
├── index.js          # Main application
├── package.json      # Package configuration
├── README.md         # Documentation
├── LICENSE           # MIT license
├── CHANGELOG.md      # Version history
└── dist/            # Built binaries (after build)
    ├── serialconsole-win.exe
    ├── serialconsole-linux
    └── serialconsole-macos

🤝 Contributing

We welcome contributions! Here's how to get started:

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch: git checkout -b feature-awesome-addition
  3. 💻 Make your changes with tests
  4. ✅ Commit changes: git commit -am 'feat: add awesome feature'
  5. 🚀 Push to branch: git push origin feature-awesome-addition
  6. 📝 Submit a Pull Request

Development Guidelines

  • Follow existing code style and patterns
  • Add tests for new features
  • Update documentation as needed
  • Use conventional commit messages

📦 Package Information

  • 📋 Package Name: serialconsole
  • 🏷️ Current Version: 1.0.0
  • 📄 License: MIT
  • 🔧 Node.js: >= 18.0.0
  • 💻 Platforms: Windows, macOS, Linux (x64, ARM64)

📝 License

MIT License - see LICENSE file for details.

🙏 Acknowledgments

🐛 Issues & Support

📈 Statistics

Check out the package stats:


⭐ Star this repository if SerialConsole helps with your projects!

🚀 Install now: npm install -g serialconsole