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

@farm-framework/cli

v0.1.2

Published

FARM Stack Framework CLI

Readme

FARM Command Line Interface

Overview

The FARM CLI provides project scaffolding, development tooling and utilities for the FARM stack. It is the main entrypoint for creating new applications and running the local development server. Commands are built with commander and make use of modular utilities for logging, prompting and template generation.

✅ Completed Implementation

Core Components

  1. CLI Entry (src/index.ts, src/cli.ts)
    • Parses global options and registers all subcommands
    • Provides unified error handling and environment setup
  2. Command Modules (src/commands)
    • create – scaffold new FARM projects from templates
    • dev – start the development server
    • build – production build placeholder
    • generate – code generation utilities
    • Additional helpers: add-ui, database, auth, validate
  3. Template & Generation System (src/generators, src/template)
    • Handlebars based project file generator
    • Database and config generators
    • Post processors for formatting (e.g. Python via bundled Ruff)
  4. Utilities (src/utils)
    • Interactive prompts and styling helpers
    • Package installation & git initialization
    • Logger with colourised output

Architecture

┌───────────────────────────┐
│        FARM CLI           │
├───────────────────────────┤
│ Commands                  │
│ ├─ create                 │
│ ├─ dev                    │
│ ├─ build                  │
│ ├─ generate               │
│ ├─ add ui                 │
│ ├─ database               │
│ ├─ auth                   │
│ └─ validate               │
├───────────────────────────┤
│ Generators                │
│ ├─ project-file-generator │
│ ├─ database-generator     │
│ └─ helpers & post process │
├───────────────────────────┤
│ Utilities                 │
│ ├─ logger                 │
│ ├─ prompts                │
│ ├─ package-installer      │
│ └─ git-initializer        │
└───────────────────────────┘

Features Implemented

  • Interactive project creation with template, feature and database selection
  • Bundled Ruff binaries for Python formatting on all platforms
  • Development server integration via farm dev
  • Modular code generation (farm generate) for types, models and pages
  • Database management helpers (farm database commands)
  • Authentication utilities for token inspection and scaffolding
  • Rich logging with verbose and colour options

Usage

Installation

npm install -g @farm/cli

Common Commands

# Create a new project
farm create my-app --template ai-chat

# Start development server
cd my-app
farm dev

# Build for production
farm build

# Generate TypeScript types and hooks
farm generate types --api-url http://localhost:8000

Run farm --help to see all available commands and options.

Files Structure

packages/cli/
├── src/
│   ├── cli.ts            # Program setup
│   ├── commands/         # Command implementations
│   ├── core/             # Shared CLI helpers
│   ├── generators/       # Project scaffolding utilities
│   ├── template/         # Template definitions & helpers
│   ├── utils/            # Logger, prompts, installers
│   └── index.ts          # CLI entrypoint
├── bin/                  # Bundled Ruff binaries
├── package.json
└── tsup.config.ts

Integration

The CLI works in concert with other FARM packages:

  • @farm/core – development server and code generation engine
  • @farm/types – shared type definitions
  • Templates – project blueprints used by farm create

File Overview

  • src/cli.ts – creates the farm program and registers commands
  • src/commands/ – individual command modules (create, dev, build, etc.)
  • src/generators/ – helpers for scaffolding new projects
  • src/utils/ – logging, prompts and package management utilities
  • bin/ – platform specific Ruff binaries used for formatting