diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index c8d57814d..408be9114 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -1,3 +1,4 @@ +import chalk from 'chalk'; import dotenv from 'dotenv'; import yargs from 'yargs'; import { hideBin } from 'yargs/helpers'; @@ -17,7 +18,7 @@ void yargs(hideBin(process.argv)) .command(install) .command(database) .demandCommand(1) - .showHelpOnFail(false) + .showHelpOnFail(false, `Specify ${chalk.green('--help')} for available options`) .strict() .parserConfiguration({ 'dot-notation': false, diff --git a/packages/create/index.sh b/packages/create/index.sh new file mode 100755 index 000000000..626bb4aeb --- /dev/null +++ b/packages/create/index.sh @@ -0,0 +1,2 @@ +#!/bin/sh +logto init diff --git a/packages/create/package.json b/packages/create/package.json new file mode 100644 index 000000000..61580bb53 --- /dev/null +++ b/packages/create/package.json @@ -0,0 +1,16 @@ +{ + "name": "@logto/create", + "version": "1.0.0-beta.10", + "author": "Silverhand Inc. ", + "license": "MPL-2.0", + "bin": { + "logto-create": "./index.sh" + }, + "scripts": {}, + "engines": { + "node": "^16.0.0" + }, + "dependencies": { + "@logto/cli": "^1.0.0-beta.10" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4ad3c6cec..51de5fd0b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -406,6 +406,12 @@ importers: supertest: 6.2.2 typescript: 4.7.4 + packages/create: + specifiers: + '@logto/cli': ^1.0.0-beta.10 + dependencies: + '@logto/cli': link:../cli + packages/demo-app: specifiers: '@logto/core-kit': ^1.0.0-beta.13