UNPKG

@albinberisha/codex-cli

Version:

Codex cli to scaffold plugins with Node

56 lines (49 loc) 1.28 kB
import meow from 'meow'; import meowHelp from 'cli-meow-help'; const flags = { name: { type: `string`, alias: `n`, desc: `Sets the project name.` }, sessionId: { type: `string`, alias: `s`, desc: `Accepts a Session Id to run the plugin on that session.` }, apiKey: { type: `string`, alias: `k`, desc: `Accepts an Api Key to validate user.` }, git: { type: `boolean`, default: false, alias: `g`, desc: `Initializes a github repo.` }, help: { type: `boolean`, alias: `h`, desc: `Shows the commands and arguments.` }, }; const commands = { 'create-plugin': { desc: `Creates a default template for the plugin.` }, 'run-session': { desc: `Runs the local project on a session, if no session Id is defined a new one will be initialized.` }, }; const helpText = meowHelp({ name: `codex-cli`, flags, commands }); const options = { inferType: true, description: 'A short description of commands and options.', hardRejection: true, flags }; async function showHelp() { await meow(helpText, options); } export default showHelp;