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 🙏

© 2025 – Pkg Stats / Ryan Hefner

keyflow

v0.2.8

Published

CLI tool for Keyflow project scaffolding

Readme

Keyflow CLI

A command-line interface for scaffolding and managing Keyflow projects.

Installation

You can use the Keyflow CLI without installing it globally by using npx:

npx keyflow-cli init

Or install it globally:

npm install -g keyflow-cli

Usage

Initialize a New Project

The init command scaffolds a new Keyflow project by cloning a template repository and setting up the initial configuration.

# Interactive mode
npx keyflow init

# Specify project name
npx keyflow init my-project

# Specify project path
npx keyflow init ./projects/my-new-project

# With options
npx keyflow init my-project --api-key kf_your_api_key --ngrok-url https://abc123.ngrok.io

Command Options

keyflow init [project-name]

Creates a new Keyflow project.

Arguments:

  • project-name (optional) - Name or path for the new project

Options:

  • -k, --api-key <key> - Keyflow API key (optional)
  • -n, --ngrok-url <url> - Ngrok URL for local development (optional)
  • -h, --help - Display help for command

Interactive Prompts:

If not provided as arguments, the CLI will prompt you for:

  1. Project Name/Path: The name of your project or a path where it should be created

    • If you provide a path (e.g., ./projects/my-app), the project will be created at that location
    • If you provide just a name, it will be created in the current directory
  2. Keyflow API Key (optional): Your Keyflow API key for authentication

    • Format should start with kf_
    • Can be skipped by pressing Enter
  3. Ngrok URL (optional): Your ngrok tunnel URL for local development

    • Should be a valid HTTP/HTTPS URL
    • Can be skipped by pressing Enter

Examples

Basic Project Creation

# Create a project in current directory
npx keyflow init my-keyflow-app

# Create a project in a specific path
npx keyflow init ./projects/my-keyflow-app

# Interactive mode - will prompt for all options
npx keyflow init

With Configuration

# Provide API key and ngrok URL upfront
npx keyflow init my-app \
  --api-key kf_1234567890abcdef \
  --ngrok-url https://abc123.ngrok.io

Project Structure

After running keyflow init, your project will have the following structure:

my-keyflow-project/
├── src/
├── package.json
├── .env                 # Contains your API key and ngrok URL (if provided)
├── .env.example         # Template for environment variables
├── .gitignore
└── README.md

Environment Configuration

The CLI automatically creates environment files:

  • .env - Contains your actual configuration (not committed to git)
  • .env.example - Template showing required environment variables

Environment Variables

  • KEYFLOW_API_KEY - Your Keyflow API key
  • NGROK_URL - Your ngrok tunnel URL for local development

Development

Building the CLI

# Install dependencies
pnpm install

# Build the project
pnpm build

# Run in development mode
pnpm dev

# Test the CLI locally
node dist/cli.js init test-project

Project Structure

src/
├── cli.ts              # Main CLI entry point
├── commands/           # Command implementations
│   └── init.ts         # Init command logic
├── utils/              # Utility functions
│   └── helpers.ts      # Helper functions
└── index.ts            # Package exports

Dependencies

  • @clack/prompts - Beautiful CLI prompts
  • commander - Command-line framework
  • chalk - Terminal styling
  • simple-git - Git operations
  • fs-extra - Enhanced file system operations
  • ora - Loading spinners

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/new-feature
  3. Make your changes
  4. Add tests if applicable
  5. Run the build: pnpm build
  6. Test your changes: node dist/cli.js init test-project
  7. Commit your changes: git commit -am 'Add new feature'
  8. Push to the branch: git push origin feature/new-feature
  9. Create a Pull Request

Troubleshooting

Common Issues

Git not found

Error: git command not found

Make sure Git is installed and available in your PATH.

Permission denied

Error: EACCES: permission denied

Make sure you have write permissions to the target directory.

Template repository not found

Error: Repository not found

The template repository might be private or the URL might be incorrect.

Getting Help

  • Use keyflow --help to see all available commands
  • Use keyflow init --help to see options for the init command
  • Check the Keyflow documentation for more information

License

UNLICENSED

Changelog

0.1.0

  • Initial release
  • Added init command for project scaffolding
  • Interactive prompts for project configuration
  • Support for API key and ngrok URL configuration