1 Star 0 Fork 2

曹俊涛/escmd

forked from luyanfei78/escmd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
escmd.js 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
luyanfei78 提交于 2019-06-27 20:06 . snapshot revised.
#!/usr/bin/env node
const program = require('commander')
const {buildAction} = require('./util')
const init = require('./lib/init')
const cat = require('./lib/cat')
const indices = require('./lib/indices')
const search = require('./lib/search')
const docs = require('./lib/docs')
const snapshot = require('./lib/snapshot')
program
.version('0.0.1')
.description('elasticsearch command line tools.')
program
.command('init')
.description('init elastic client configuration.')
.action(() => init())
program
.command('cat <sub> [params...]')
.alias('c')
.description('cat module.')
.action(buildAction(cat))
program
.command('indices <sub> <index> [params...]')
.alias('i')
.description('indices module.')
.action(indices)
program
.command('docs <sub> <index> <id> <body>')
.alias('d')
.option('--id', 'document id')
.description('docs module.')
.action(docs)
program
.command('search <sub> <index> [params...]')
.alias('s')
.description('search module.')
.action(search)
program
.command('snapshot <sub> [params...]')
.description('snapshot module')
.action(buildAction(snapshot))
program.parse(process.argv)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
NodeJS
1
https://gitee.com/cao_jun_tao/escmd.git
git@gitee.com:cao_jun_tao/escmd.git
cao_jun_tao
escmd
escmd
master

搜索帮助