Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@master4n/master-cli

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@master4n/master-cli

AI-agent-friendly command-line toolkit: timestamp/date conversion, JWT decoding, port killing, file finding, and directory trees — headless, --json, with a self-describing manifest.

Source
npmnpm
Version
3.0.2
Version published
Weekly downloads
1.2K
199.49%
Maintainers
1
Weekly downloads
 
Created
Source

@master4n/master-cli (mfn)

CI npm version npm downloads License Owner

Master CLI for developers and AI agents. A set of headless, JSON-first commands that replace the boilerplate agents otherwise regenerate on every machine — timestamp/date conversion, JWT decoding, freeing ports, finding files, and directory trees. Every command runs the same for a human at a terminal and for an agent reading stdout.

Installation

npm install -g @master4n/master-cli

This installs the mfn command.

The contract (why it's agent-friendly)

  • Headless-first — every command runs from flags/stdin. Interactive prompts appear only on a TTY when required input is missing; with --json or when piped, commands never block.
  • Machine-readable — pass --json (or just pipe; non-TTY auto-emits) and you get exactly one JSON object on stdout: { "ok": true, ... } on success, { "ok": false, "error", "message" } on failure.
  • Stable exit codes0 success · 1 runtime error · 2 usage error.
  • Clean channels — the banner, spinners, and logs go to stderr; stdout carries only data, so mfn <cmd> --json | jq always works.
  • Strict parsing — unknown commands/flags and missing args fail loudly ({ok:false}, exit 2), never a silent "success".
  • Self-describingmfn capabilities --json lists every command, and llms.txt documents the full agent contract.

Quick start

mfn -h                 # top-level help (lists every command)
mfn <command> -h       # per-command help: flags + examples
mfn -v                 # version
mfn capabilities --json   # machine-readable manifest of all commands

Commands

CommandWhat it doesExample
capabilitiesSelf-describing manifest of every commandmfn capabilities --json
idGenerate IDs — UUID v4, time-ordered UUID v7, or URL-safe nanomfn id --json · mfn id -t uuid7 -n 3 --json
hashHash a string, file, or stdin (md5/sha1/sha256/sha512)mfn hash hello --json · mfn hash -f ./x --json
encodeEncode/decode text — base64, base64url, hex, urlmfn encode hi --json · mfn encode aGk= -d --json
randomSecure random bytes, or an unbiased passwordmfn random --json · mfn random -p -l 32 --json
portFind a free port, or check if one is availablemfn port --json · mfn port -c 3000 --json
epochConvert between epoch timestamps and dates (auto-detects s/ms/µs/ns)mfn epoch 1622547800 --json · mfn epoch --from 2021-06-01T11:43:20Z --json
dateConvert/format a date across timezones (defaults to now)mfn date 2024-07-04T15:30:30Z --tz America/New_York --json
decodeDecode a JWT (header + payload + expiry; signature not verified)mfn decode -t <jwt> --json
killKill the process(es) listening on given portsmfn kill -p 3000 8080 -y --json
scFuzzy-find files/folders under the current directorymfn sc service --json
ctsPrint (or export) a tree of the current directorymfn cts --json · mfn cts -t png
updateUpdate the CLI (or a named package) to the latest versionmfn update --json

Run mfn <command> --help for the full flag list and more examples.

Examples

# Timestamps: any unit in, readable date out (parse cleanly in a script)
mfn epoch 1622547800000 --json | jq -r '.utc'        # 2021-06-01 11:43:20.000

# Free the ports your dev server got stuck on
mfn kill -p 3000 5173 -y --json

# Inspect a JWT without a website
mfn decode -t "$TOKEN" --json | jq '.payload.exp'

# Hand an agent the repo layout
mfn cts --json | jq -r '.tree'

Notes

  • Date/time features are powered by @master4n/temporal-transformer v2 (Luxon-backed, integer epochs, yyyy-MM-dd HH:mm:ss tokens).
  • Process/port/package operations use execFile (no shell), so inputs cannot inject commands.

Part of the @master4n toolkit

A small ecosystem of focused, agent-friendly packages:

License

MIT © Master4Novice

Keywords

cli

FAQs

Package last updated on 06 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts