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

directify-cli

v1.3.1

Published

Official CLI tool for Directify - manage your directories, listings, categories, tags, and articles from the command line.

Readme

Directify CLI

Official command-line tool for Directify - manage your directory websites, listings, categories, tags, and articles from the terminal.

Installation

npm install -g directify-cli

Or run directly with npx:

npx directify-cli --help

Quick Start

1. Get your API token

Go to your Directify dashboard: Settings > API and generate a new token.

2. Authenticate

directify auth login YOUR_API_TOKEN

3. Set your default directory

# List your directories to find the ID
directify directories list

# Set the default so you don't need --directory on every command
directify config set-directory 123

4. Start managing

# List listings
directify listings list

# Create a listing
directify listings create --name "Bella Trattoria" --description "Authentic Italian cuisine" --address "123 Main St"

# Create a category
directify categories create --title "Italian" --icon "🍝"

Commands

Authentication

directify auth login <token>    # Authenticate with your API token
directify auth logout           # Remove stored token
directify auth status           # Check authentication status

Configuration

directify config set-directory <id>   # Set default directory
directify config get-directory        # Show default directory

Directories

directify directories list            # List all your directories
directify dirs ls                     # Short alias
directify dirs ls --json              # Output as JSON

Categories

# List
directify categories list
directify cats ls --json

# Create
directify categories create --title "Italian" --icon "🍝" --description "Italian restaurants"
directify categories create --title "Japanese" --parent-id 5 --order 2

# Update
directify categories update 42 --title "Italian Cuisine" --order 1

# Delete
directify categories delete 42

# Get details
directify categories get 42

Tags

# List
directify tags list
directify tags ls --json

# Create
directify tags create --title "Featured" --color "#f59e0b" --text-color "#ffffff"
directify tags create --title "New" --heroicon "heroicon-o-sparkles"

# Update
directify tags update 10 --title "Hot" --color "#ef4444"

# Delete
directify tags delete 10

Custom Fields

directify fields list                 # List all custom fields
directify fields ls --json            # Output as JSON

Listings

# List (paginated)
directify listings list
directify listings list --page 2
directify listings ls --json

# Get a specific listing
directify listings get 456

# Create
directify listings create \
  --name "Bella Trattoria" \
  --url "https://bellatrattoria.com" \
  --description "Authentic Italian cuisine" \
  --address "123 Main Street, New York" \
  --phone "+1-212-555-1234" \
  --email "[email protected]" \
  --categories 1,5,12 \
  --tags 3,7 \
  --featured \
  --field "price_range=2" \
  --field "cuisine_type=Italian, Pasta"

# Update
directify listings update 456 \
  --name "Bella Trattoria NYC" \
  --featured true \
  --field "hours_of_operation=Mon | 11:00 - 22:00"

# Delete
directify listings delete 456

# Check if URL exists
directify listings exists --url "https://example.com"

# Bulk create from JSON file
directify listings bulk-create --file ./listings.json

Bulk Create JSON Format

Create a JSON file with an array of listings:

{
  "listings": [
    {
      "name": "Restaurant One",
      "url": "https://restaurant-one.com",
      "description": "Great food",
      "categories": [1, 2],
      "tags": [3],
      "price_range": "2",
      "cuisine_type": "Italian"
    },
    {
      "name": "Restaurant Two",
      "url": "https://restaurant-two.com",
      "description": "Amazing sushi",
      "categories": [3],
      "cuisine_type": "Japanese"
    }
  ]
}

Then run:

directify listings bulk-create --file ./listings.json

Articles

# List
directify articles list
directify articles list --page 2 --json

# Get
directify articles get 789

# Create
directify articles create \
  --title "Best Italian Restaurants in NYC" \
  --markdown "# Top Picks\n\nHere are our favorites..." \
  --categories "Reviews,Italian" \
  --thumbnail-url "https://example.com/image.jpg" \
  --seo-title "Best Italian Restaurants" \
  --seo-description "Discover the top Italian restaurants in New York City"

# Update
directify articles update 789 --title "Updated Title" --active true

# Toggle active/inactive
directify articles toggle 789

# Delete
directify articles delete 789

# Check if slug exists
directify articles exists --slug "best-italian-restaurants"

Custom Pages

# List
directify pages list
directify pages ls --json

# Get
directify pages get 12

# Create a page in the navbar
directify pages create \
  --title "About Us" \
  --markdown "# About Us\n\nWe are a directory of the best restaurants..." \
  --placement navbar \
  --seo-title "About Us" \
  --seo-description "Learn about our restaurant directory"

# Create a programmatic SEO page (unlisted by default)
directify pages create \
  --title "NYC vs Chicago Pizza" \
  --markdown "# NYC vs Chicago Pizza\n\nA detailed comparison..." \
  --seo-title "Best Pizza: NYC vs Chicago Compared" \
  --seo-description "Compare pizza styles between New York and Chicago"

# Create a footer link
directify pages create \
  --title "Terms of Service" \
  --markdown "# Terms of Service\n\n..." \
  --placement footer \
  --order 1

# Create an external link in the navbar
directify pages create \
  --title "Submit a Listing" \
  --external-url "https://forms.google.com/your-form" \
  --placement navbar \
  --new-tab

# Update
directify pages update 12 --title "Updated Title" --placement footer

# Toggle published/unpublished
directify pages toggle 12

# Delete
directify pages delete 12

Global Options

All resource commands support these options:

| Option | Description | |--------|-------------| | -d, --directory <id> | Directory ID (overrides default) | | --json | Output as JSON (on list commands) | | --help | Show help for a command |

Custom Fields

When creating or updating listings, you can set custom field values using the --field flag:

directify listings create \
  --name "My Restaurant" \
  --field "price_range=3" \
  --field "cuisine_type=Italian, Pizza" \
  --field "hours_of_operation=Mon | 11:00 - 22:00
Tue | 11:00 - 22:00
Wed | Closed" \
  --field "menu_highlights=Carbonara | Classic Roman pasta | \$22
Margherita | Fresh mozzarella | \$18"

Use directify fields list to see available custom fields and their names.

Using with LLMs / AI Agents

The CLI is designed to work well with AI-powered workflows. Use --json output for machine-readable responses:

# Get all listings as JSON for processing
directify listings list --json | jq '.data[].name'

# Pipe data between commands
directify listings get 456 --json | jq '.categories'

Rate Limits

The API allows 120 requests per minute per directory. If you hit the rate limit, the CLI will show an error message. Implement delays between requests for bulk operations.

Configuration Storage

The CLI stores your auth token and default directory in your system's config directory:

  • macOS: ~/Library/Preferences/directify-cli-nodejs/
  • Linux: ~/.config/directify-cli-nodejs/
  • Windows: %APPDATA%/directify-cli-nodejs/

Troubleshooting

"Not authenticated" error

Run directify auth login <token> with your API token from Settings > API.

"No directory specified" error

Either pass --directory <id> or set a default: directify config set-directory <id>

"Rate limit exceeded" error

Wait a moment and retry. The limit is 120 requests per minute per directory.

"Validation error"

Check the error details for which fields failed validation. Use directify fields list to see available custom field names.

License

MIT