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

upncli

v1.0.0

Published

CLI tool for UPN (Updateable Node.js) container management

Readme

UPN CLI (upncli)

A command-line interface for managing UPN (Updateable Node.js) containers with rich terminal UI, emoji status indicators, and smart deployment features.

Installation

cd cli
npm install
npm link  # Makes 'upncli' available globally

Quick Start

  1. Setup a project:

    upncli setup my-app
  2. Deploy your application:

    upncli deploy my-app
  3. Stream logs:

    upncli logs my-app --follow

Commands

upncli setup <appFolder>

Interactive configuration setup for a project.

Features:

  • ✅ Configure server URL
  • 🔑 Set bearer token authentication
  • 📤 Manage upload blacklist patterns
  • 🧪 Test server connection

Example:

upncli setup my-node-app

upncli deploy <appFolder>

Deploy application to UPN server with smart packaging.

Features:

  • 📦 Auto-detects and validates app folder
  • 🚫 Applies blacklist patterns for optimized packages
  • 📊 Real-time upload progress with emoji indicators
  • ✅ Automatic server connection testing
  • 🔄 Zero-downtime deployment

Options:

  • -f, --force - Force deployment without confirmation

Example:

upncli deploy my-node-app
upncli deploy my-node-app --force

upncli logs <appFolder>

View and stream application logs with syntax highlighting.

Features:

  • 🎨 Syntax highlighting for different log levels
  • 🔄 Auto-reconnect on connection loss
  • 🔍 Log filtering capabilities
  • ⏱️ Real-time streaming

Options:

  • -f, --follow - Follow log output with auto-reconnect
  • --filter <pattern> - Filter logs by pattern

Examples:

upncli logs my-app                    # View recent logs
upncli logs my-app --follow           # Stream logs with auto-reconnect
upncli logs my-app --filter "error"   # Filter for error messages

upncli project [action] [name]

Manage multiple projects and configurations.

Actions:

  • list - List all configured projects
  • setup [name] - Setup a new project configuration
  • status [name] - Show detailed project status
  • remove [name] - Remove project configuration

Examples:

upncli project list                   # List all projects
upncli project setup admin-dashboard # Setup specific project
upncli project status my-app         # Check project status
upncli project remove old-app        # Remove project config

Aliases

  • upncli ls - Alias for project list
  • upncli status [name] - Alias for project status

Configuration

Global Configuration

Configuration is stored in ~/.upncli/config.json:

{
  "projects": {
    "my-app": {
      "serverUrl": "http://localhost:3888",
      "bearerToken": "your-secret-token",
      "blacklist": ["node_modules", ".git", "*.log", "dist"]
    },
    "admin-dashboard": {
      "serverUrl": "https://admin.example.com",
      "bearerToken": null,
      "blacklist": ["node_modules", ".git"]
    }
  }
}

Per-Project Settings

Each project can have:

  • Server URL: Target UPN server endpoint
  • Bearer Token: Authentication token (optional)
  • Blacklist Patterns: Files/folders to exclude from deployment

Blacklist Patterns

Supports glob patterns for flexible exclusions:

  • node_modules - Exclude node_modules folder
  • *.log - Exclude all log files
  • dist/** - Exclude entire dist directory
  • .env* - Exclude environment files

Status Indicators

The CLI uses emoji indicators for clear visual feedback:

  • Success - Operation completed successfully
  • Error - Operation failed
  • ⚠️ Warning - Operation completed with warnings
  • ℹ️ Info - Informational message
  • Loading - Operation in progress
  • 📤 Uploading - File upload in progress
  • 🚀 Deployment - Deployment operations
  • ⚙️ Configuration - Setup and config operations

Deployment Workflow

  1. Validation: Checks app folder exists and project is configured
  2. Connection Test: Verifies server connectivity
  3. Package Creation: Creates optimized zip with blacklist exclusions
  4. Upload: Uploads with real-time progress tracking
  5. Deployment: Server extracts and starts the application
  6. Verification: Confirms deployment success

Error Handling

The CLI provides detailed error messages with helpful suggestions:

❌ Cannot connect to server: ECONNREFUSED
Suggestions:
  ℹ️ Check if the server is running
  ℹ️ Verify the server URL is correct
  ℹ️ Check your network connection

Advanced Features

Auto-Reconnect Logs

When using --follow, the CLI automatically reconnects if the connection is lost:

upncli logs my-app --follow
# Automatically reconnects up to 5 times on disconnection

Smart Package Optimization

The CLI creates optimized deployment packages by:

  • Excluding development dependencies
  • Applying user-defined blacklist patterns
  • Using maximum compression
  • Validating package integrity

Multi-Project Management

Easily switch between different projects and environments:

upncli project list
  📁 my-app (active) - http://localhost:3888
  📁 admin-dashboard - https://admin.example.com
  📁 api-server - http://api.local:3000

Troubleshooting

Common Issues

  1. Authentication Errors

    upncli setup my-app  # Reconfigure bearer token
  2. Connection Issues

    upncli project status my-app  # Test connectivity
  3. Large Package Uploads

    • Review blacklist patterns to exclude unnecessary files
    • Check network stability for large uploads

Debug Mode

For detailed debugging, check the server logs or use verbose npm logging:

DEBUG=* upncli deploy my-app

Dependencies

  • commander - CLI framework
  • inquirer - Interactive prompts
  • chalk - Terminal styling
  • archiver - Zip creation
  • axios - HTTP requests
  • ws - WebSocket for logs
  • boxen - Text boxes
  • cli-progress - Progress bars

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test with real UPN server
  5. Submit a pull request

License

MIT License - see LICENSE file for details.