
Company News
Jerod Santo Joins Socket as Head of Media
Allow myself to introduce... myself.
@ismartify/inquirer
Advanced tools
一个基于 [@inquirer/prompts](https://github.com/SBoudrias/Inquirer.js) 的简单CLI工具构建库。
一个基于 @inquirer/prompts 的简单CLI工具构建库。
pnpm add @ismartify/inquirer
import CLI from '@ismartify/inquirer';
// 创建CLI实例
const cli = new CLI('My CLI Tool');
// 添加确认命令
cli.addConfirmCommand('clean', {
description: '清理项目(clean)',
message: '确定要清理项目吗?',
action: async function() {
console.log('正在清理...');
// 执行清理逻辑
}
});
// 启动CLI
import { main } from '@ismartify/inquirer';
main(cli);
new CLI(title = 'CLI Tool')
title: CLI工具的标题添加自定义命令。
cli.addCommand('command-name', {
description: '命令描述',
handler: async function() {
// 命令逻辑
},
params: ['[param]'], // 可选参数
interactive: true, // 是否支持交互式
options: ['verbose'] // 支持的选项
});
添加需要确认的命令。
cli.addConfirmCommand('clean', {
description: '清理项目(clean)',
message: '确定要执行吗?',
action: async function() {
// 执行逻辑
}
});
添加需要输入参数的命令。
cli.addInputCommand('create', {
description: '创建项目(create)',
inputs: [
{ message: '项目名称:', default: 'my-project' }
],
action: async function(name) {
// 使用name创建项目
}
});
添加选择命令。
cli.addSelectCommand('deploy', {
description: '部署项目(deploy)',
message: '选择环境:',
choices: [
{ name: '开发环境', value: 'dev' },
{ name: '生产环境', value: 'prod' }
],
action: async function(env) {
// 部署到指定环境
}
});
MIT
FAQs
一个基于 [@inquirer/prompts](https://github.com/SBoudrias/Inquirer.js) 的简单CLI工具构建库。
The npm package @ismartify/inquirer receives a total of 5 weekly downloads. As such, @ismartify/inquirer popularity was classified as not popular.
We found that @ismartify/inquirer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.