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

formfiller-cli

v0.1.2

Published

Parse any HTML form, detect field types intelligently, generate realistic fake data — all from the terminal

Readme

formfiller-cli

Parse any HTML form, detect field types intelligently, and generate realistic fake data — all from the terminal, no browser required.

Built as a companion CLI to formfillerapp.com.

Install

Requires Node.js 22+.

# global install
pnpm add -g formfiller-cli

# or run directly without installing
pnpm dlx formfiller-cli analyze ./my-form.html

Help

formfiller --help          # list all commands
formfiller analyze --help  # flags for a specific command
formfiller fill --help

Commands

analyze — inspect a form

Parses a URL or local HTML file and shows detected field types with sample values.

formfiller analyze <url|file> [--json] [--form <n>]
$ formfiller analyze http://localhost:3000/signup

Form #1 — POST /signup
┌─────────────────────┬──────────┬─────────────┬──────────────────────────┐
│ Field               │ Type     │ Detected as │ Sample value             │
├─────────────────────┼──────────┼─────────────┼──────────────────────────┤
│ first_name          │ text     │ firstName   │ Marcus                   │
│ email               │ email    │ email       │ [email protected] │
│ password            │ password │ password    │ xK9#mP2$vL8n             │
│ confirm_password    │ password │ password    │ xK9#mP2$vL8n             │
│ subject             │ text     │ random      │ gah                      │
│ message             │ textarea │ random      │ Vestrum ex admitto...    │
│ country             │ select   │ random      │ us                       │
└─────────────────────┴──────────┴─────────────┴──────────────────────────┘
  ⚠  3 field(s) not detected — add name/id/label attributes to improve detection

Flags:

| Flag | Description | |------|-------------| | --json | Output as JSON (machine-readable, useful for agents) | | --form <n> | Target a specific form on the page (1-based, default: all) |


generate — produce fake records

Generates N fake data records based on the form's field schema. Outputs JSON or CSV.

formfiller generate <url|file> [--count <n>] [--output json|csv] [--form <n>]
# Single record (default)
$ formfiller generate ./signup.html

# 50 records as JSON — pipe into your DB seeder
$ formfiller generate http://localhost:3000/signup --count 50 > seed.json

# CSV output
$ formfiller generate ./signup.html --count 100 --output csv > seed.csv

Flags:

| Flag | Default | Description | |------|---------|-------------| | -n, --count <n> | 1 | Number of records to generate | | -o, --output <format> | json | Output format: json or csv | | --form <n> | 1 | Target form number (1-based) |


fill — fill and submit a form

Generates a payload for a form and optionally submits it via HTTP POST. Exit code is non-zero on failure — usable in CI scripts.

formfiller fill <url> [--submit] [--expect <text>] [--dry-run] [--verbose] [--form <n>]
# Inspect what would be submitted (no network request)
$ formfiller fill http://localhost:3000/signup --dry-run

# Override specific fields, auto-fill the rest
$ formfiller fill http://localhost:3000/register \
    --field username=test-bot \
    --field [email protected] \
    --dry-run

# Submit and check for success
$ formfiller fill http://localhost:3000/signup --submit --expect "Welcome"

# Verbose: see the full request and response
$ formfiller fill http://localhost:3000/signup --submit --verbose

--field is repeatable. Overridden fields are shown with (override) in dry-run output.

Flags:

| Flag | Description | |------|-------------| | --submit | POST the form data to the action URL | | --expect <text> | Exit 1 if the response does not contain this text | | --dry-run | Print the payload without submitting | | --verbose | Show the full request body and response | | --field <name=value> | Override a specific field value (repeatable) | | --form <n> | Target form number (1-based, default: 1) |

Confirmation fields (password2, confirmPassword, emailConfirm, etc.) are automatically detected and filled with the same value as their original field — no manual override needed.

$ formfiller fill http://localhost:3000/register --field username=test-bot --dry-run

  username:  test-bot                      (override)
  email:     [email protected]
  password:  xK9#mP2$vL8n
  password2: xK9#mP2$vL8n                  ← matches password automatically

Field Detection

Fields are detected by matching name, id, label, and placeholder attributes against a keyword map. The following types are detected automatically:

| Detected as | Triggers | |-------------|----------| | firstName | firstname, fname, first_name, given_name | | lastName | lastname, lname, last_name, family_name | | fullName | fullname, name, full_name | | email | email, mail, e_mail, or type="email" | | phone | phone, telephone, mobile, tel | | address | address, street, location, residence | | city | city, town | | state | state, province | | zipCode | zip, zipcode, postal_code, postcode | | company | company, organization, business | | jobTitle | title, position, jobtitle, role | | username | username, user_name, login, handle | | birthDate | birth, birthday, dob, date_of_birth | | password | type="password" | | url | type="url" |

Undetected fields fall back to context-aware random generation based on their HTML type (text, number, date, textarea, select, etc.).


Use with AI coding agents

formfiller is designed to be agent-friendly. After writing a form, an agent can:

# Verify field detection
formfiller analyze ./src/SignupForm.html --json

# Generate seed data for a new model
formfiller generate ./src/SignupForm.html --count 50 > seed.json

# Smoke test after dev server starts
formfiller fill http://localhost:3000/signup --submit --expect "201"

The --json flag on analyze returns structured output that agents can parse and act on.


Limitations

  • Static HTML only — JavaScript-rendered forms (React, Vue, etc.) are not supported. Point at a URL that serves the raw HTML, or use a local .html file.
  • No auth/sessions — cookies and authentication flows are not handled.
  • No multi-step forms — wizard-style forms that span multiple pages are not supported.