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

@principal-ai/file-city-cli

v0.1.5

Published

CLI tool for File City tours - validation, creation, and linting

Readme

@principal-ai/file-city-cli

Command-line tool for creating, validating, and managing introduction tours for File City visualizations.

Installation

npm install -g @principal-ai/file-city-cli

Or use with npx:

npx @principal-ai/file-city-cli <command>

Commands

tour validate <file>

Validate a tour JSON file against the specification.

tour validate my-tour.tour.json

Options:

  • -j, --json - Output results as JSON (for CI/CD integration)
  • -s, --strict - Enable strict validation including file system checks

Examples:

# Validate a tour file
tour validate getting-started.tour.json

# Output as JSON for CI/CD
tour validate getting-started.tour.json --json

# Strict validation (checks if referenced files exist)
tour validate getting-started.tour.json --strict

tour init

Initialize a new tour file from a template.

tour init

Options:

  • -t, --template <type> - Template type: minimal, onboarding, or architecture (default: minimal)
  • -o, --output <file> - Output filename (default: generated from tour ID)

Examples:

# Create a minimal tour
tour init

# Create an onboarding tour
tour init --template onboarding

# Create with custom output filename
tour init --template architecture --output my-custom-tour.tour.json

Tour File Format

Tour files are JSON files that follow the *.tour.json naming convention. They define guided tours through codebases using the File City visualization.

Minimal Example

{
  "id": "quick-start",
  "title": "Quick Start Guide",
  "description": "Get started with the codebase in 5 minutes",
  "version": "1.0.0",
  "steps": [
    {
      "id": "step-1-welcome",
      "title": "Welcome!",
      "description": "This is a simple introduction to the project structure.",
      "estimatedTime": 30,
      "focusDirectory": "src",
      "colorMode": "fileTypes"
    }
  ]
}

Required Fields

  • id - Unique identifier (kebab-case)
  • title - Human-readable title
  • description - Brief overview
  • version - Semantic version (e.g., "1.0.0")
  • steps - Array of tour steps (at least 1)

Step Configuration

Each step can include:

  • id - Unique step identifier
  • title - Step title
  • description - Detailed explanation
  • estimatedTime - Time in seconds
  • focusDirectory - Directory to zoom into
  • colorMode - Visualization mode (fileTypes, git, coverage, etc.)
  • highlightLayers - Custom highlight overlays
  • highlightFiles - Specific files to highlight
  • interactiveActions - User actions to try
  • resources - Related links and documentation

Validation Rules

The CLI validates:

  • ✅ Semantic versioning format
  • ✅ Unique IDs (tour and steps)
  • ✅ Valid file paths (relative, no leading slash)
  • ✅ Valid hex colors
  • ✅ Numeric constraints (opacity 0-1, positive values)
  • ✅ Required fields presence
  • ✅ Cross-references (layer IDs in actions)

Output Formats

Human-Readable (default)

✓ Tour "my-tour.tour.json" is valid!

  Tour ID: my-tour
  Title: My Amazing Tour
  Version: 1.0.0
  Steps: 5

JSON (for CI/CD)

{
  "file": "my-tour.tour.json",
  "valid": true,
  "tour": {
    "id": "my-tour",
    "title": "My Amazing Tour",
    "version": "1.0.0",
    "stepCount": 5
  }
}

Usage in CI/CD

Add validation to your CI pipeline:

# .github/workflows/validate-tours.yml
name: Validate Tours
on: [push, pull_request]
jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
      - run: npx @principal-ai/file-city-cli validate *.tour.json --json

Integration with File City

Place your validated *.tour.json file in your repository root. The File City visualization will automatically detect and load it, providing a "Tour" button in the UI.

Templates

Minimal

Simple single-step tour for quick starts.

Onboarding

Multi-step tour with highlights and resources for new developers.

Architecture

Comprehensive tour showcasing layered architecture and design patterns.

Documentation

For complete specification and best practices, see:

Development

# Install dependencies
bun install

# Build
bun run build

# Run locally
node dist/index.js --help

License

MIT