mirror of
https://github.com/hexastack/hexabot
synced 2025-06-11 08:54:49 +00:00
fix: missing cli init cmd
This commit is contained in:
parent
cddc53c807
commit
5a26083822
@ -108,6 +108,21 @@ program
|
|||||||
.description('A CLI to manage your Hexabot chatbot instance')
|
.description('A CLI to manage your Hexabot chatbot instance')
|
||||||
.version('1.0.0');
|
.version('1.0.0');
|
||||||
|
|
||||||
|
program
|
||||||
|
.command('init')
|
||||||
|
.description('Initialize the environment by copying .env.example to .env')
|
||||||
|
.action(() => {
|
||||||
|
const envPath = path.join(FOLDER, '.env');
|
||||||
|
const exampleEnvPath = path.join(FOLDER, '.env.example');
|
||||||
|
|
||||||
|
if (fs.existsSync(envPath)) {
|
||||||
|
console.log(chalk.yellow('.env file already exists.'));
|
||||||
|
} else {
|
||||||
|
fs.copyFileSync(exampleEnvPath, envPath);
|
||||||
|
console.log(chalk.green('Copied .env.example to .env'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
program
|
program
|
||||||
.command('start')
|
.command('start')
|
||||||
.description('Start specified services with Docker Compose')
|
.description('Start specified services with Docker Compose')
|
||||||
|
Loading…
Reference in New Issue
Block a user