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

ubuntu-cli

v0.0.1

Published

A powerful CLI tool for hardening and configuring Ubuntu servers with interactive prompts

Readme

Ubuntu CLI

npm version License: MIT

A powerful CLI tool for hardening and configuring Ubuntu servers with interactive prompts. Built with NestJS and nest-commander, ubuntu-cli provides a modern TypeScript/Node.js implementation for common server security and configuration tasks.

Features

  • 🔒 Security Hardening: SSH hardening, Fail2Ban installation, and firewall configuration
  • 🌐 Network Configuration: Interactive netplan configuration
  • 🔑 SSH Key Management: Easy authorized key management for users
  • 🛡️ Firewall Management: Role-based UFW rules for various server types
  • Interactive Prompts: User-friendly command-line interface
  • 📦 TypeScript: Fully typed for reliability and maintainability

Installation

Global Installation

npm install -g ubuntu-cli

Using npx (No Installation Required)

npx ubuntu-cli <command>

Prerequisites

  • Node.js 20 or higher
  • Ubuntu server (tested on Ubuntu 20.04+)
  • Root privileges (sudo) for system configuration commands

Usage

Run commands with ucli (if installed globally) or npx ucli:

sudo ucli <command>

Available Commands

Initial Setup

Updates system packages, hardens SSH, and optionally installs Fail2Ban:

sudo ucli initial-setup

Network Configuration

Interactive netplan configuration for a network interface:

sudo ucli network-config

Firewall Configuration

UFW reset with role-based rules (redis, mariadb, api, ui-app, vpn, deployinator):

sudo ucli firewall-config

Authorized Key Management

Add an SSH public key to a user account:

sudo ucli authorized-key

Development

Clone and Install

git clone https://github.com/yigitahmetsahin/ubuntu-cli.git
cd ubuntu-cli
npm install

Build

npm run build

Run Locally

During development, you can run without building:

sudo npx ts-node src/main.ts <command>

Or after building:

sudo node dist/main <command>

Testing

npm test

Publishing

This package uses automated GitHub Actions for publishing to npm. When you create a release on GitHub, it will automatically:

  1. Run tests
  2. Build the package
  3. Publish to npm

Notes

  • The CLI enforces root usage for safety
  • File backups are created automatically (e.g., SSH config backups)
  • Interactive prompts guide you through configuration options
  • All system commands are executed safely with proper error handling

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

If you encounter any issues or have questions, please open an issue on GitHub.