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

@sihle.dev/yugo-kit-dev-cli

v0.1.1

Published

Advanced development CLI for Yugo Kit - supports local and remote environment management

Downloads

134

Readme

@yugo-kit/dev-cli

Advanced TypeScript CLI for Yugo Kit development environment management.

Features

  • 🚀 Environment Management: Manage local, remote, and Kubernetes environments
  • 🐳 Docker Integration: Full Docker Compose support with health monitoring
  • 🔐 Permission System: Role-based access control for different environments
  • 🎯 Type Safety: Built with TypeScript for better reliability
  • 🌐 Remote Support: SSH and Kubernetes API integration for remote operations
  • 📊 Monitoring: Built-in health checks and service monitoring
  • 🗄️ Database Migrations: Complete Drizzle ORM migration management
  • 🧩 Extensible: Can be used both as CLI and programmatic library

Installation

# Install dependencies
bun install

# Build the package
bun run build

# Run in development mode
bun run dev [command]

# Use the built CLI
node dist/cli.js [command]

Usage

Environment Management

# List all environments
node dist/cli.js env list

# Show environment details
node dist/cli.js env show local

# Show environment details for staging
node dist/cli.js env show staging

Setup and Deployment

# Full setup (creates configs, starts services)
node dist/cli.js setup

# Quick setup (skip monitoring setup)
node dist/cli.js setup --quick

# Setup specific environment
node dist/cli.js setup --environment staging

# Skip waiting for services to be ready
node dist/cli.js setup --skip-wait

Service Management

# Check service status
node dist/cli.js status

# Check status for specific environment
node dist/cli.js status --environment staging

Database Migrations

# Check migration status
node dist/cli.js migrate status

# Generate new migrations
node dist/cli.js migrate generate

# Push schema changes (development)
node dist/cli.js migrate push

# Apply migrations (production)
node dist/cli.js migrate run

# Open Drizzle Studio
node dist/cli.js migrate studio

# Drop database (dangerous!)
node dist/cli.js migrate drop

Migration Features:

  • Status Checking: View migration files and database state
  • Schema Generation: Auto-generate migrations from schema changes
  • Development Workflow: Push changes directly for quick iteration
  • Production Safety: Apply tracked migrations with rollback support
  • Visual Management: Drizzle Studio integration for database browsing
  • Complete Reset: Drop database for development resets

Architecture

Environment Types

  • Local: Docker Compose based development
  • Remote: SSH-based remote server deployment
  • Kubernetes: Kubernetes cluster deployment

Permission System

The CLI implements a role-based permission system:

  • Developer: Can deploy to local/staging, view logs, access shell
  • Admin: Full access to all environments and operations
  • Viewer: Read-only access, can view logs and status

Configuration

Configuration files are stored in ~/.yugo-kit/:

  • environments.json: Environment definitions
  • user.json: User permissions and preferences

Programmatic Usage

The CLI can also be used as a library:

import { YugoDevCLI, EnvironmentManager, DockerManager } from '@yugo-kit/dev-cli';

// Use as library
const cli = new YugoDevCLI();
await cli.run(['setup', '--environment', 'local']);

// Use individual managers
const envManager = new EnvironmentManager();
const environments = await envManager.loadEnvironments();

const dockerManager = new DockerManager();
const result = await dockerManager.startServices(environments[0]);

Development

# Install dependencies
bun install

# Run in development mode
bun run dev [command]

# Build for production
bun run build

# Run tests
bun run test

# Lint code
bun run lint

# Clean build artifacts
bun run clean

Migration from Bash Scripts

This TypeScript CLI replaces the previous bash scripts with these improvements:

  • Type Safety: Compile-time error checking
  • Better Error Handling: Structured error reporting
  • Remote Support: Can manage remote and Kubernetes environments
  • Permissions: Role-based access control
  • Extensibility: Can be extended and imported as a library
  • Maintainability: Much easier to maintain and extend

Command Mapping

| Old Bash Script | New CLI Command | |----------------|----------------| | tools/scripts/setup.sh | setup | | tools/scripts/dev.sh status | status | | tools/scripts/test.sh | Coming soon | | tools/scripts/cleanup.sh | Coming soon | | drizzle-kit generate | migrate generate | | drizzle-kit push | migrate push | | drizzle-kit migrate | migrate run | | drizzle-kit studio | migrate studio |

Configuration Examples

Local Environment

{
  "name": "local",
  "type": "local",
  "dockerCompose": "docker-compose.prod.yml",
  "services": [
    { "name": "app", "port": 3000, "healthCheck": "/health" }
  ]
}

Remote Environment

{
  "name": "staging",
  "type": "remote", 
  "host": "staging.example.com",
  "username": "deploy",
  "dockerCompose": "docker-compose.prod.yml"
}

Kubernetes Environment

{
  "name": "production",
  "type": "kubernetes",
  "kubeconfig": "~/.kube/config",
  "context": "production",
  "namespace": "yugo-kit"
}

Documentation

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details.