minimist

A lightweight, dependency-free argument parser that turns process.argv into a clean options object.

Library
npm
v1.2.8
662stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
35/100Needs Attention
Development Activity0
Maintenance0
Community48
Maturity52
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
61/100Good
Architecture58
Code Quality80
Innovation60
Learning Curve45

Minimist is the argument-parsing engine originally extracted from optimist, stripped down to just the core logic for converting an array of command-line arguments into a structured object. It handles the full range of common argv patterns — long flags (--foo=bar), short flags bundled together (-abc), negation (--no-foo), boolean and string coercion, aliases, and defaults — with zero runtime dependencies.

Because it does one job well, minimist has become a foundational parsing layer underneath a large share of the Node.js CLI ecosystem, used directly or wrapped by higher-level libraries. Its small, synchronous API makes it easy to drop into any script that needs to read process.argv without pulling in a full CLI framework.

What You Get

  • A single exported function that takes (args, opts) and returns a populated argv object
  • Support for long (--foo=bar), short (-f bar), and bundled short flags (-abc)
  • Boolean negation via --no-foo and explicit opts.boolean coercion
  • Alias resolution so multiple flag names resolve to the same value
  • Dotted-key expansion (--foo.bar=x) into nested objects
  • Defaults, stopEarly, and -- passthrough handling for everything after a literal --

Common Use Cases

  • Parsing options in a small standalone Node.js CLI script
  • Acting as the low-level argv tokenizer underneath a higher-level CLI framework
  • Accepting flags like --watch or --env=production in internal build/test tooling
  • Quick prototyping of one-off Node.js scripts that need argument parsing without ceremony

Under The Hood

Architecture Minimist is a single-file, monolithic module (index.js, ~270 lines) with no internal layering — one exported function closes over local state (flags, aliases, defaults) and mutates a local argv object while iterating the input array once. There’s no plugin system or injectable strategy; every behavior is configured through the single opts object passed at the one call site, and the dense character-by-character short-flag parsing loop is the single path all bundled -abc-style input flows through, meaning any change to it ripples across every consumer.

Tech Stack The package has zero runtime dependencies and targets Node >= 0.4, using only plain ES5-style JavaScript ('use strict', var, function declarations) for maximum compatibility. Development tooling includes tape for tests, nyc for coverage, eslint with the @ljharb/eslint-config preset, auto-changelog for release notes, and safe-publish-latest/in-publish guards around the publish lifecycle — all as devDependencies only.

Code Quality Tests are extensive relative to the module’s size: sixteen dedicated test files under test/ cover short flags, long flags, arrays, booleans, dotted keys, whitespace, unknown-argument callbacks, and prototype-pollution safety (proto.js), all run through tape. Coverage is measured via nyc with configured thresholds (86% lines, 76% branches) though hard enforcement is disabled. Linting runs as a pretest step and CI (GitHub Actions) exercises multiple Node version ranges plus a posttest npm audit. Error handling is implicit rather than explicit — malformed input is coerced rather than throwing — which fits a permissive CLI-parsing utility, and there are no TypeScript types in the repository itself.

API Design The public surface is a single default export, parseArgs(args, opts), returning a plain object — about as low-boilerplate as argument parsing gets: require('minimist')(process.argv.slice(2)) is a complete integration. Configuration is one flat opts object (string, boolean, alias, default, stopEarly, '--'), which keeps the common path simple, though discovering less obvious behaviors like dotted-key nesting or the unknown callback requires reading the README closely, since it’s the only documentation source — there are no in-repo JSDoc or .d.ts annotations.

Used by 20 apps in this directory

TypeScript
53%
Other

Chaskiq

CRM · Customer Support

3,564

Self-hosted live chat, video calls, help center, and marketing automation — a full-stack Intercom alternative you run on your own infrastructure.

View details
59
Repo Health
66
Technical
66
Dependency
Built with
TypeScript53%
Ruby36%
Updated 2 months ago
TypeScript
98%
Apache 2.0

Cline

AI Code Assistants

67,585

An open-source AI coding agent that lives in your editor and terminal — reads and edits your codebase, runs commands, browses the web, and requires human approval for every action by default.

View details
89
Repo Health
74
Technical
65
Dependency
Built with
TypeScript98%
Updated 2 days ago
TypeScript
92%
MIT

Dittofeed

Marketing · Automation

2,926

Open-source omni-channel customer engagement platform for automating transactional and marketing messages via email, SMS, WhatsApp, Slack, and mobile push.

View details
54
Repo Health
75
Technical
62
Dependency
Built with
TypeScript92%
Updated 5 months ago
TypeScript
94%
AGPL 3.0

Element Web

Team Chat · Collaboration

13,437

A polished, self-hostable Matrix client for secure, decentralized messaging and collaboration that puts your organization in full control of its data.

View details
96
Repo Health
83
Technical
65
Dependency
Built with
TypeScript94%
Updated yesterday
Python
63%
BSD 3

Flagsmith

Developer Tools · Devops · Ab Testing Experimentation

6,539

Open-source feature flagging, remote config, and A/B/multivariate testing platform for web, mobile, and server-side apps — self-host or use the hosted SaaS.

View details
90
Repo Health
82
Technical
63
Dependency
Built with
Python63%
TypeScript31%
Updated 2 days ago
TypeScript
54%
Other

Focalboard

Productivity · Project Management · Collaboration

26,448

Self-hosted, open source project management with Kanban, table, gallery, and calendar views — a privacy-first alternative to Trello, Notion, and Asana.

View details
57
Repo Health
82
Technical
64
Dependency
Built with
TypeScript54%
Go40%
Updated 3 months ago
JavaScript
64%
Other

GDevelop

Developer Tools · Game Development · Design Tools

26,276

No-code, open-source game engine for building 2D, 3D and multiplayer games — publish to iOS, Android, Steam and the web.

View details
93
Repo Health
82
Technical
61
Dependency
Built with
JavaScript64%
C++23%
TypeScript12%
Updated yesterday
TypeScript
97%
Other

GrowthBook

Developer Tools · Analytics · Monitoring

8,299

Open source feature flags, A/B testing, and warehouse-native experimentation that queries your existing data infrastructure—no data movement required.

View details
92
Repo Health
85
Technical
63
Dependency
Built with
TypeScript97%
Updated yesterday
TypeScript
96%
MIT

HyperDX

Developer Tools · Analytics · Monitoring

9,873

Open source observability platform that unifies logs, traces, metrics, and session replays on ClickHouse — now the core of ClickStack.

View details
88
Repo Health
83
Technical
68
Dependency
Built with
TypeScript96%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search