8000 GitHub - difyz9/npm-cli: npm-cli · GitHub
[go: up one dir, main page]

Skip to content
difyz9Public

About

npm-cli

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

@difyz9/mxiy-cli

Publish npm License: MIT

A modern CLI toolkit — TypeScript edition.
Published to GitHub Packages.


Installation

# 1. Add .npmrc to your project (or ~/.npmrc)
echo "@difyz9:registry=https://npm.pkg.github.com" >> .npmrc

# 2. Install
npm install @difyz9/mxiy-cli

Usage as a CLI

npx @difyz9/mxiy-cli greet Alice
# Hello, Alice!

npx @difyz9/mxiy-cli greet Alice --upper
# HELLO, ALICE!

npx @difyz9/mxiy-cli bye Bob
# Goodbye, Bob!

npx @difyz9/mxiy-cli version
# 0.1.0

npx @difyz9/mxiy-cli system
# OS      : Darwin 23.4.0 (arm64)
# Node    : v20.12.0
# Package : 0.1.0

Usage as a library

import { greet, bye, version, systemInfo } from '@difyz9/mxiy-cli';

greet('Alice');                       // "Hello, Alice!"
greet('Alice', { upper: true });      // "HELLO, ALICE!"
greet('Bob',   { count: 3 });         // "Hello, Bob! Hello, Bob! Hello, Bob!"
bye('Charlie');                       // "Goodbye, Charlie!"
version();                            // "0.1.0"
systemInfo();                         // { os, node, packageVersion }

Development

npm install
npm run build    # TypeScript → dist/
npm test         # jest
npm run lint     # ESLint

Release

Push a version tag to trigger the GitHub Actions publish workflow:

git tag v0.1.0
git push origin v0.1.0

About

npm-cli

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0