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

@defprod/cli

v0.1.6

Published

DefProd CLI - Command-line interface for DefProd product definitions

Downloads

62

Readme

DefProd CLI

Command-line interface for DefProd product definitions.

Installation

npm install -g @defprod/cli

Then run:

defprod

Building from Source

git clone https://github.com/defprod1/defprod-cli.git
cd defprod-cli
npm install
npm run build
node dist/main.js

Configuration

The CLI stores configuration in ~/.config/defprod/cli.json. Run defprod for the first time to launch the init wizard, or create the file manually:

{
    "aiProvider": "gemini",
    "aiProviderApiKey": "your-ai-api-key",
    "aiModel": "gemini-2.0-flash",
    "defprodApiKey": "your-defprod-api-key",
    "defprodApiUrl": "https://api.defprod.one/api/v1",
    "currentProduct": "your-product-id",
    "strictMode": false
}

| Field | Description | Default | |--------------------|------------------------------------------------------------------------------|----------------------------------| | aiProvider | LLM provider: openai, anthropic, gemini, or perplexity | gemini | | aiProviderApiKey | API key for your chosen AI provider | — | | aiModel | Model name (e.g. gpt-4o, claude-3-5-sonnet-20241022, gemini-2.0-flash) | Provider-specific | | defprodApiKey | Your DefProd API key | — | | defprodApiUrl | DefProd API base URL | https://api.defprod.one/api/v1 | | currentProduct | Default product ID to use | — | | strictMode | Disable fuzzy matching | false | | proxy | HTTP proxy configuration object (see below) | — |

Proxy Configuration

To route all CLI requests through an HTTP proxy (common in corporate environments), add a proxy object:

{
    "proxy": {
        "url": "http://proxy.corp.com:8080",
        "username": "user",
        "password": "pass"
    }
}

| Field | Description | Required | |------------------|----------------------------------------------------|----------| | proxy.url | Proxy URL (e.g. http://proxy.corp.com:8080) | Yes | | proxy.username | Proxy authentication username | No | | proxy.password | Proxy authentication password | No |

Set proxy fields via commands: /config set proxy.url http://proxy.corp.com:8080.

When no proxy config is set, the CLI honours the standard HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables.

All fields are optional. You can also use environment variables:

  • DEFPROD_CLI_CONFIG - Override config file path
  • DEFPROD_AI_PROVIDER - AI provider
  • DEFPROD_AI_API_KEY - AI provider API key
  • DEFPROD_AI_MODEL - AI model name
  • DEFPROD_API_KEY - DefProd API key
  • DEFPROD_API_URL - DefProd API URL
  • DEFPROD_CURRENT_PRODUCT - Current product ID
  • DEFPROD_STRICT_MODE - Enable strict mode (true/false)

Environment variables override config file values.

Usage

Interactive REPL Mode

Start the CLI without arguments to enter REPL mode:

$ defprod
DefProd CLI Agent
>

One-shot Mode

Execute commands directly:

$ defprod /list stories
$ defprod "Create a user story for login with 2FA"

Commands

Product Management

  • /product list - List all available products
  • /product set <id|name> - Set current product
  • /product current - Show currently selected product
  • /product unset - Clear current product

Listing Entities

  • /list stories - List user stories
  • /list areas - List areas
  • /list architecture - List architecture
  • /list components - List components
  • /list templates - List templates
  • /list users - List users

Options:

  • --filter <query> - Filter results by keyword
  • --json - Output in JSON format

Viewing Entities

  • /view product - View current product
  • /view story <id|name|query> - View a user story
  • /view area <id|name|query> - View an area
  • /view template <id|name|#> - View a template
  • /view architecture - View architecture

Options:

  • --json - Output in JSON format
  • --strict - Use strict matching (no fuzzy search)

Searching

  • /search "<query>" - Search across all entities

Options:

  • --json - Output in JSON format
  • --strict - Use strict keyword matching

Configuration

  • /config show - Display current configuration
  • /config set <key> <value> - Set a configuration value
  • /config unset <key> - Remove a configuration value
  • /config reset - Reset to default configuration

Natural Language Commands

Commands without a / prefix are interpreted as natural language and processed by the LLM:

> Create a user story for passwordless login using Passkeys
> Update the acceptance criteria for USR-124
> Export the current product for API integration

Examples

Set product context

[Democrify]> /product list
1. DefProd
2. Democrify
[DefProd]> /product set defprod
Current product: DefProd (PRODUCT-1234)

List entities

[DefProd]> /list stories
#       ID              Title
─────────────────────────────────────────────────
1.      USR-42  User Login
2.      USR-43  Password Reset
3.      USR-44  Admin Login
> /list stories --filter login
[DefProd]> /list stories
#       ID              Title
─────────────────────────────────────────────────
1.      USR-42  User Login
3.      USR-44  Admin Login

View entities

[DefProd]> /view story "subscription change"
Title: System enforces subscription change rules to prevent invalid state transitions
ID: PAY-38
Description: As a system, I want to enforce a state-machine-based rule engine that determines valid subscription actions based on current status, pending changes, and target plan so that users cannot make invalid subscription transitions.
Acceptance Criteria:
  - Rule engine determines valid actions based on current subscription state
  - Rule engine considers pending changes (e.g. pending downgrade) when evaluating allowed actions
  - Invalid transitions are blocked with clear error messages
  - Rules are shared between frontend and backend via defprod-common

Natural language creation

> Add a new user story for passwordless login using Passkeys
LLM Output:
Created User Story USR-45
Title: Passwordless Login
Description: ...

License

MIT