
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
mkly is a modern CLI framework focused on user experience, ease of use, and expressive, friendly command-line interfaces.
mkly is a modern CLI framework designed with a relentless focus on user experience, ease of use, and expressiveness. It empowers developers to build CLI tools that greet users with friendly, clear, and beautiful interfaces.
Time, Size, Paths, and JSON.npm install mkly
# or
bun add mkly
# or
yarn add mkly
The examples directory contains several usage patterns. Here are key highlights.
Quickly define a CLI with commands, arguments, and actions.
import { CLI } from 'mkly';
const cli = new CLI('greeter', '1.0.0');
cli
.command('greet')
.description('Greets a person')
.argument('name', { type: 'string' })
.argument('age', { type: 'number' })
.action((args) => {
// args is typed based on definitions
console.log(`Hello ${args.name}, you are ${args.age} years old`);
});
cli.run();
Run it:
$ mycli greet "John Doe" 30
Hello John Doe, you are 30 years old
Options can be defined with types, aliases, and default values. mkly handles the parsing and validation for you.
cli
.command('build')
.description('Builds the project')
.option('minify', {
type: 'boolean',
alias: ['m', 'min'],
defaultValue: false,
})
.option('target', {
type: 'number',
defaultValue: 18,
})
.action((_, opts) => {
console.log('Options:', opts);
});
Run it:
$ app build --minify -t 20
Options: { minify: true, target: 20 }
mkly comes with a powerful parser capable of handling various data types out of the box.
| Type | Description | Valid Input Examples |
|---|---|---|
boolean | Boolean flag | true, false, 1, 0, yes, no, on, off |
string | Text string | "foo", bar |
number | Numeric value | 42, 3.14 |
choice | Set of allowed values | "red", "green", "blue" |
path | File system path | ./src, /etc/config |
time | Duration or Date | 5s, 1h30m, 2025-01-01 |
size | Digital storage size | 10kb, 500mb, 1gb |
json | JSON object | {"key": "value"} |
Arrays: All types support array variants (e.g.,
stringArray,numberArray).
The time type is incredibly flexible. It supports:
100ms, 5s, 10m, 1.5h, 2d, 1w, 1mo, 1y1h30m, 2d12h2025-12-31, 2025-12-31 23:59 (parsed relative to now)The size type makes handling file sizes intuitive:
b, kb, mb, gb, tb, pb10kb (10240 bytes), 1.5gb, 500bOrganize complex tools (like git) using nested subcommands.
const remote = cli.command('remote').description('Manage remotes');
remote.command('add')
.argument('name', { type: 'string' })
.argument('url', { type: 'string' })
.action((args) => {
console.log(`Adding remote ${args.name} -> ${args.url}`);
});
remote.command('remove')
.argument('name', { type: 'string' })
.action((args) => {
console.log(`Removing remote ${args.name}`);
});
The repository includes a set of examples demonstrating different features. You can run them directly with Bun:
# Basic Hello World
bun examples/basic-hello.ts greet Parsa 25
# Options Demo
bun examples/options.ts build --minify --target 20
# Real World "Vite-like" CLI
bun examples/real-world.ts dev --port 8080
# Error Handling Demo
bun examples/errors.ts divide a 0
Thanks to these amazing people:
MIT © Kkotero
Issues and pull requests are welcome.
Built with ❤️ for great developer and user experiences.
FAQs
mkly is a modern CLI framework focused on user experience, ease of use, and expressive, friendly command-line interfaces.
The npm package mkly receives a total of 2 weekly downloads. As such, mkly popularity was classified as not popular.
We found that mkly 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.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.