Files
twenty/cli/src/index.ts
Félix Malfait e8f1146ae1 CLI to install project (#164)
* CLI to install project

* CLI fixes

* Update README.md

* Cleanup gitignore
2023-06-01 09:19:49 +02:00

28 lines
690 B
JavaScript

#!/usr/bin/env node
import { program } from 'commander';
import { showWelcomeScreen, firstQuestion } from './install/index.js';
import prompts from 'prompts';
import { askContributeQuestions } from './install/contribute/index.js';
import { askDemoQuestions } from './install/demo/index.js';
import { askSelfhostQuestions } from './install/selfhost/index.js';
program;
showWelcomeScreen();
(async () => {
const response = await prompts(firstQuestion);
switch (response.install_type) {
case 'contribute':
askContributeQuestions();
break;
case 'demo':
askDemoQuestions();
break;
case 'selfhost':
askSelfhostQuestions();
break;
}
})();