minimist

Minimal command-line argument parser for Node.js. Parses process.argv into a JavaScript object with named flags, positional arguments, and boolean/string options. Zero dependencies, tiny footprint. Used by many tools as a lightweight alternative to full CLI frameworks like yargs or commander. Parses '--flag value', '-f', '--no-flag', '--key=value', and '--' separating options from positional args.

Evaluated Mar 06, 2026 (0d ago) v1.x
Homepage ↗ Repo ↗ Developer Tools cli argv argument-parsing node javascript utilities tiny
⚙ Agent Friendliness
67
/ 100
Can an agent use this?
🔒 Security
97
/ 100
Is it safe for agents?
⚡ Reliability
92
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
88
Error Messages
75
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
100
Auth Strength
100
Scope Granularity
100
Dep. Hygiene
92
Secret Handling
90

Prototype pollution vulnerability fixed in v1.2.6 — use updated version. CLI arg parsing — no network surface. Don't pass CLI args as untrusted input without validation.

⚡ Reliability

Uptime/SLA
95
Version Stability
92
Breaking Changes
92
Error Recovery
90
AF Security Reliability

Best When

You need the simplest possible argument parsing in a Node.js script without help generation, subcommands, or validation infrastructure.

Avoid When

You're building a user-facing CLI tool that needs help text, subcommands, or validation — use yargs or commander instead.

Use Cases

  • Parse simple CLI scripts with flags and positional arguments: node script.js --input file.txt --verbose
  • Build lightweight command-line utilities without the overhead of full CLI frameworks
  • Parse webpack, gulp, or build tool arguments in simple scripts
  • Quick argument parsing for automation scripts where full yargs/commander features aren't needed
  • Parse options in makefiles, npm scripts, and simple Node.js utilities

Not For

  • Complex CLI applications with subcommands, help text generation, and validation — use yargs or commander
  • TypeScript CLI tools needing type safety and IntelliSense — use yargs or meow with TypeScript types
  • Production CLI tools requiring help/usage generation — minimist provides no help text infrastructure

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

No authentication — CLI parsing utility.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

Fully free, MIT licensed.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • No validation or required arguments — minimist parses any input without validation; must implement your own required argument checks
  • Type coercion: by default, '--port 3000' parses port as number; use string: ['port'] option to keep it as string — type inference can be surprising
  • Boolean flags: '--no-verbose' sets verbose: false; be aware of automatic boolean negation behavior
  • Prototype pollution vulnerability patched in v1.2.6+ — ensure using latest version to avoid __proto__ injection via CLI args
  • No help text generation — if your tool needs usage instructions, you must write them manually; yargs/commander auto-generate from option definitions
  • args['--'] contains everything after '--' separator — useful for passing remaining args to subprocess: node script.js --flag -- --pass-to-subprocess

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for minimist.

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered