
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
@master4n/master-cli
Advanced tools
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 and a built-in MCP server (mfn mcp).
mfn)Master CLI for developers and AI agents. 51 headless, JSON-first commands in three families: token savers (extract exactly what you need — one JSON field, a line range, a file outline — instead of dumping whole files into context), exact computation (BigInt math, semver, cron, regex, timezones — verified answers instead of guesses), and one-call actions (free a port, wait for a server, bulk-replace with dry-run). Every command runs the same for a human at a terminal and for an agent reading stdout, in ~60ms.
npm install -g @master4n/master-cli
This installs the mfn command.
No global install needed — npx runs any command directly:
npx -y @master4n/master-cli capabilities --json # discover every command
npx -y @master4n/master-cli epoch 1622547800 --json
For AI agents: run
mfn capabilities --json(or the npx form above) to get the machine-readable manifest, and readllms.txt— it ships inside the npm package and documents the full agent contract.
--json or when
piped, commands never block.--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.0 success · 1 runtime error · 2 usage error.mfn <cmd> --json | jq always works.{ok:false}, exit 2), never a silent "success".mfn capabilities --json lists every command, and
llms.txt documents the full agent contract.For agent clients that can't run shell commands, mfn mcp serves the whole
toolkit over the Model Context Protocol
(stdio transport, zero extra dependencies):
// e.g. .mcp.json / claude_desktop_config.json / any MCP client
{
"mcpServers": {
"mfn": { "command": "npx", "args": ["-y", "@master4n/master-cli", "mcp"] }
}
}
Three tools: mfn_capabilities (the manifest), mfn_run ({command, args[]} —
runs any catalogued command and returns its single JSON object, guardrails
included), and mfn_help (per-command flags). update is deny-listed so an
MCP-only client can never install packages. mfn mcp --json describes the
server without starting it.
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
Run mfn capabilities for the grouped list, mfn <command> --help for flags.
| Command | What it does | Example |
|---|---|---|
clip | Read/write the system clipboard | git diff | mfn clip --json |
notify | Desktop notification — ping the user when a task finishes | mfn notify "build finished" --json |
open | Open a file/URL in the default app (validated first) | mfn open coverage/index.html --json |
procs | Search processes by name: pid/cpu/mem | mfn procs node --json |
disk | Per-mount disk usage without df parsing | mfn disk --json |
trash | Reversible delete to the OS trash — never rm -rf | mfn trash old-logs --json |
dns | A/AAAA/CNAME/MX/TXT/NS in one call | mfn dns github.com --json |
| Command | What it does | Example |
|---|---|---|
json | One value from JSON by path — don't read the document | mfn json scripts.build -f package.json --json |
schema | Infer JSON shape (paths + types); 10MB payload → ~20 lines | mfn schema -f response.json --json |
count | Lines/words/chars/bytes + LLM token estimate | git diff | mfn count --json |
lines | Exact line range of a file (1-based), never the whole file | mfn lines src/app.ts -s 120 -n 30 --json |
outline | Symbols + line numbers (.ts .js .py .go .md) | mfn outline src/app.ts --json |
diff | Structured hunks of two files, counts first | mfn diff old.json new.json -s --json |
freq | Most repeated lines — log triage in one call | mfn freq error.log -t 5 --json |
imports | A file's imports, or who imports a module | mfn imports --who utility --json |
repo | Git branch/dirty/ahead-behind/commits in one object | mfn repo --json |
sys / have / ip | System facts · tool versions · local addresses | mfn have node git docker --json |
size / ext / recent | Disk usage · composition by extension · newest files | mfn size -t 5 --json |
ports | ALL listening TCP ports with owning processes | mfn ports --json |
pkg | Declared vs installed dependency versions | mfn pkg --json |
env / dotenv | Env inspection (secrets always redacted) · .env completeness | mfn dotenv --json |
| Command | What it does | Example |
|---|---|---|
calc | BigInt-exact arithmetic — 2^53 + 1 comes out right | mfn calc "2^53 + 1" --json |
base | hex/dec/bin/oct conversion, BigInt-safe | mfn base 0xff --json |
semver | Validate/compare/sort/bump per semver.org | mfn semver 1.10.0 1.9.2 --json |
cron | Validate + explain + next run times | mfn cron "*/15 9-17 * * 1-5" --json |
regex | Test a pattern — matches with line/index/groups | mfn regex "TODO" -f src/app.ts --json |
url | URL → components + decoded query params | mfn url "https://x.com/a?b=1" --json |
escape | Context-exact escaping: shell, JSON, regex, HTML, URL | mfn escape "it's" --json |
case | camel/snake/kebab/pascal/… conversion | mfn case getUserName -t snake --json |
epoch / date | Epoch ↔ date (auto unit) · timezone conversion | mfn epoch 1622547800 --json |
decode | JWT header + payload + expiry (signature not verified) | mfn decode -t <jwt> --json |
| Command | What it does | Example |
|---|---|---|
replace | Literal find/replace across files — dry-run by default | mfn replace old new -g "src/**/*.ts" --json |
wait | Block until port/URL/file is ready — no sleep loops | mfn wait -p 3000 -t 30 --json |
kill | Free the ports your dev server got stuck on | mfn kill -p 3000 8080 -y --json |
http | Probe a URL: status/headers/timing, capped body preview | mfn http localhost:3000/health --json |
port | Find a free port, or check one | mfn port -c 3000 --json |
id / hash / encode / random | UUID v4/v7/nano · digests · codecs · CSPRNG | mfn id -t uuid7 -n 3 --json |
sc / cts | Fuzzy file find · directory tree | mfn sc service --json |
capabilities / update | Machine-readable manifest · self-update | mfn capabilities --json |
mcp | Serve every command over the Model Context Protocol (stdio) | mfn mcp |
# 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'
@master4n/temporal-transformer
v2 (Luxon-backed, integer epochs, yyyy-MM-dd HH:mm:ss tokens).execFile (no shell), so inputs cannot
inject commands.A small ecosystem of focused, agent-friendly packages:
@master4n/temporal-transformer — epoch/timestamp ↔ date conversion with auto unit-detection and IANA timezones (Luxon-backed)@master4n/temporal-transformer-codemod — codemod to migrate temporal-transformer v1→v2@master4n/http-status — machine-readable HTTP status-code registry for apps & AI agents@master4n/decorators — zero-dependency TypeScript decorators (DI, validation, resilience, redaction)MIT © Master4Novice
FAQs
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 and a built-in MCP server (mfn mcp).
The npm package @master4n/master-cli receives a total of 566 weekly downloads. As such, @master4n/master-cli popularity was classified as not popular.
We found that @master4n/master-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.