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 🙏

© 2026 – Pkg Stats / Ryan Hefner

monotick-flash

v1.0.8

Published

Factory flasher CLI for Monotick ESP32 devices

Readme

monotick-flash

Factory flasher CLI for Monotick ESP32 devices - Single command factory production tool.

Quick Start

# Flash device with internal secret
npx monotick-flash --secret $INTERNAL_SECRET --port /dev/ttyUSB0

# Test mode (dry run)
npx monotick-flash --secret $INTERNAL_SECRET --port /dev/ttyUSB0 --dry-run

# Custom API endpoint
npx monotick-flash -s $SECRET -p /dev/ttyUSB0 --url https://your-api.com

Features

  • One-command flashing: Complete device flashing in a single command
  • Automatic workflow: next → flash → report 3-step automation
  • Real-time logging: Live flash progress and detailed logs
  • Error handling: Comprehensive error handling and recovery
  • Dry run mode: Test mode without actual hardware flashing
  • Cross-platform: Works on Linux, macOS, and Windows

Installation

No installation required! Use with npx for immediate execution:

npx monotick-flash --help

Usage

Basic Usage

# Flash next device in queue
npx monotick-flash --secret YOUR_SECRET --port /dev/ttyUSB0

Options

-s, --secret <secret>  Internal secret for API authentication (required)
-p, --port <port>      Serial port for ESP32 device (required)
-u, --url <url>        API base URL (default: https://monotick.im)
-b, --baud <rate>      Baud rate for flashing (default: 115200)
-c, --chip <type>      ESP32 chip type (default: esp32)
--dry-run              Test mode - skip actual flashing
--verbose              Verbose output
-h, --help             Display help
-V, --version          Display version

Environment Variables

export API_BASE_URL=https://monotick.im
export INTERNAL_SECRET=your_internal_secret

Examples

# Basic factory usage
npx monotick-flash --secret $INTERNAL_SECRET --port /dev/ttyUSB0

# Development with local API
npx monotick-flash -s dev_secret -p /dev/ttyUSB0 --url http://localhost:5000

# Test mode with verbose output
npx monotick-flash -s $SECRET -p /dev/ttyUSB0 --dry-run --verbose

# Custom baud rate and chip type
npx monotick-flash -s $SECRET -p /dev/ttyUSB0 --baud 921600 --chip esp32s3

Output

Successful Flash

🔧 Monotick Factory Flasher
✔ API connection successful
✔ Device assigned for flashing

📱 Device Information:
▶ Device ID: monotick_00000001
▶ Initial OTP: 123456
▶ Firmware URL: https://monotick.im/firmware/latest.bin

✔ Flash completed successfully
✔ Result reported successfully
✅ Flash completed successfully
Device monotick_00000001 is ready for deployment

No Devices Available

🔧 Monotick Factory Flasher
✔ API connection successful
ℹ No devices in queue - all devices processed

Error Handling

🔧 Monotick Factory Flasher
✖ API connection failed - check secret and URL

Requirements

  • Node.js 18+
  • Python 3.7+ with esptool package
  • Valid internal secret for API authentication
  • ESP32 device connected via USB

Platform-Specific Setup

Windows:

# Install esptool using Python launcher
py -m pip install --user esptool

# Verify installation
py -m esptool --version

Linux/macOS:

# Install esptool
pip install esptool

# Verify installation
esptool.py --version

Windows Port Names

Use Windows COM port format:

npx monotick-flash --secret $env:INT_SEC --port COM9

API Integration

The CLI integrates with the Monotick factory API:

  • GET /api/factory/next: Get next device to flash
  • POST /api/factory/flash-report: Report flash results

All API calls use x-internal-secret header for authentication.

Development

# Clone and setup
git clone https://github.com/your-org/monotick.git
cd monotick/monotick-flash

# Install dependencies
npm install

# Build
npm run build

# Test locally
npm run dev -- --help

License

MIT

Support

For issues and questions, please contact the Monotick factory team.