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

@zerospacegg/vynthra

v1.0.1

Published

Discord bot for ZeroSpace.gg data

Readme

Vynthra

NPM Version License Repository

Discord bot and library for ZeroSpace.gg entity data. Provides entity search, markdown rendering, and a full Discord bot implementation.

Overview

Vynthra is a TypeScript library that provides search functionality for ZeroSpace.gg game entities (factions, units, buildings, maps, etc.) from the @zerospacegg/iolin data package. It includes fuzzy search capabilities and markdown rendering for both Discord messages and terminal output.

Features

  • Discord Bot: Full Discord bot with /zsgg stats slash command
  • Entity Search: Search game entities by ID, slug, or name with fuzzy matching
  • Markdown Generation: Generate markdown suitable for Discord messages
  • Terminal Display: Render search results with colored terminal output
  • TypeScript Support: Full type safety with TypeScript definitions

Installation

# As an NPM package
npm install @zerospacegg/vynthra

# Or from monorepo root
pnpm install

# Build the project
cd vynthra
npm run build

Usage

Discord Bot

Set up and run the Discord bot:

# Copy configuration template
cp bot-config.sample.json bot-config.json

# Edit bot-config.json with your Discord credentials
# OR set environment variables:
export DISCORD_TOKEN="your_bot_token"
export DISCORD_CLIENT_ID="your_client_id"

# Deploy slash commands
npm run bot:deploy

# Start the bot
npm run bot:start

See BOT_SETUP.md for detailed setup instructions.

Command Line Tool

The project also includes a CLI tool for testing and prototyping:

# Search for entities
node bin/stats.js grell
node bin/stats.js "marran badger"
node bin/stats.js faction/legion

Library Usage

import { searchEntities, renderSearchResultAsMarkdown } from '@zerospacegg/vynthra';

// Search for entities
const result = searchEntities('grell');

// Generate markdown for Discord
const markdown = renderSearchResultAsMarkdown(result);

// Generate terminal output
const terminal = renderSearchResultToTerminal(result);

Search Types

The search function returns different result types:

  • Single Match: Exact match found, returns full entity data
  • Multiple Matches: Fuzzy search found multiple possibilities
  • No Match: No entities found matching the query

Search Priority

  1. Exact ID match (e.g., faction/grell)
  2. Exact slug match (e.g., grell)
  3. Exact name match (case insensitive)
  4. Fuzzy matching on ID, slug, and name

Examples

# Exact matches
node bin/stats.js grell                    # Finds Grell faction
node bin/stats.js faction/grell           # Direct ID lookup

# Fuzzy matching
node bin/stats.js badger                  # Finds Marran Badger
node bin/stats.js marine                  # Shows multiple matches

# No matches
node bin/stats.js nonexistent             # Shows helpful error message

Development

# Watch mode for development
npm run dev

# Type checking
npm run lint

# Clean build artifacts
npm run clean

Project Structure

src/
├── lib/
│   ├── index.ts       # Main entry point
│   ├── search.ts      # Entity search functionality
│   ├── fuzzy.ts       # Fuzzy matching utilities
│   ├── renderer.ts    # Markdown and terminal rendering
│   └── types.ts       # TypeScript type definitions
├── bot/
│   ├── index.ts       # Discord bot entry point
│   ├── client.ts      # Bot client implementation
│   ├── deploy.ts      # Command deployment utilities
│   ├── types.ts       # Bot-specific types
│   └── commands/
│       └── stats.ts   # /zsgg stats command
└── bin/
    ├── stats.js       # CLI tool
    └── bot.js         # Discord bot CLI

Discord Commands

/zsgg stats <query>

Search for game data and get detailed stats:

  • /zsgg stats grell - Get Grell faction information
  • /zsgg stats terror tank - Get Terror Tank unit stats
  • /zsgg stats foundry - Get building information
  • /zsgg stats dust bowl - Get map details

Supports fuzzy matching and handles partial names automatically.

Future Plans

  • Additional Discord slash commands
  • Advanced filtering options
  • Entity comparison features
  • Interactive search interface

Repository

This package is part of the ZeroSpace.gg monorepo.

License

ISC License - see LICENSE file for details.

Author

baby shoGGoth and ZeroSpace.gg