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

@indiekitai/clash-init

v1.0.0

Published

Clash/mihomo configuration generator CLI

Readme

@indiekitai/clash-init

Clash/mihomo configuration generator CLI. Zero external dependencies.

Features

  • 🔧 Generate Clash/mihomo config from CLI args or interactively
  • 📡 Protocols: Shadowsocks, VMess, VLESS, Trojan, Hysteria2
  • 📋 Built-in rule templates: global proxy, China direct, custom
  • 🔍 TCP connectivity test for proxy servers
  • 🔗 Export share URIs (ss://, vmess://, trojan://, etc.)
  • 🌐 WARP exit IP detection
  • 🤖 MCP Server for AI agent integration

Install

npm i -g @indiekitai/clash-init
# or use directly
npx @indiekitai/clash-init

CLI Usage

# Interactive mode
npx @indiekitai/clash-init

# Shadowsocks
npx @indiekitai/clash-init --ss --server 1.2.3.4 --port 443 \
  --password "xxx" --cipher "2022-blake3-aes-128-gcm"

# VMess
npx @indiekitai/clash-init --vmess --server 1.2.3.4 --port 443 --uuid "your-uuid"

# VLESS
npx @indiekitai/clash-init --vless --server 1.2.3.4 --port 443 --uuid "your-uuid"

# Trojan
npx @indiekitai/clash-init --trojan --server 1.2.3.4 --port 443 --password "xxx"

# Hysteria2
npx @indiekitai/clash-init --hysteria2 --server 1.2.3.4 --port 443 --password "xxx"

# China direct template
npx @indiekitai/clash-init --ss --server 1.2.3.4 --port 443 \
  --password "xxx" --template china

# JSON output
npx @indiekitai/clash-init --ss --server 1.2.3.4 --port 443 \
  --password "xxx" --json

# Share URI only
npx @indiekitai/clash-init --ss --server 1.2.3.4 --port 443 \
  --password "xxx" --uri

# Test connectivity
npx @indiekitai/clash-init --test --ss --server 1.2.3.4 --port 443 --password "xxx"

# Check WARP exit IP
npx @indiekitai/clash-init --check-warp

# Write to file
npx @indiekitai/clash-init --ss --server 1.2.3.4 --port 443 \
  --password "xxx" -o config.yaml

Templates

| Template | Description | |----------|-------------| | global | Route everything through proxy (default) | | china | China domains/IPs direct, rest through proxy | | custom | Minimal rules, only private IPs direct |

Programmatic API

import { generateConfig, configToYaml, proxyToUri, testConnection, checkWarp } from '@indiekitai/clash-init';

const proxy = {
  name: 'my-proxy',
  type: 'ss',
  server: '1.2.3.4',
  port: 443,
  cipher: '2022-blake3-aes-128-gcm',
  password: 'secret',
};

// Generate config object
const config = generateConfig({ proxy, template: 'china' });

// Convert to YAML
console.log(configToYaml(config));

// Get share URI
console.log(proxyToUri(proxy));

// Test connectivity
const result = await testConnection('1.2.3.4', 443);
console.log(result); // { server, port, reachable, latencyMs }

// Check WARP
const warp = await checkWarp();
console.log(warp); // { ip, isWarp, org }

MCP Server

For AI agent integration via Model Context Protocol:

{
  "mcpServers": {
    "clash-init": {
      "command": "npx",
      "args": ["@indiekitai/clash-init", "--mcp"]
    }
  }
}

Or run the MCP server directly:

node dist/mcp.js

MCP Tools

| Tool | Description | |------|-------------| | generate_config | Generate Clash config (yaml/json/uri output) | | test_proxy | Test TCP connectivity to a proxy server | | check_ip | Check current exit IP and WARP status |

License

MIT