#!/usr/bin/env node
import { program } from 'commander';
import { version } from '../package.json';
import { DocsPages } from '../src/docs-pages/docs-pages';
import { GitCommitMsgHook } from '../src/git-commit-msg-hook/git-commit-msg-hook';
import { MergeRequestTemplate } from '../src/merge-request-template/merge-request-template';
require('ts-node').register();

// if (!process.env.GITLAB_TOKEN) {
//   program.error(
//     'GITLAB_TOKEN env variable should be defined. You can create a .env file at the root of the project (like .env.sample)',
//   );
// }

program.executableDir('../src');
program.name('tapcli').version(version);
// .command('docs', 'Utils for projects/repositories', { executableFile: 'docs' });

new DocsPages().setup();
new GitCommitMsgHook().setup();
new MergeRequestTemplate().setup();

program.parse(process.argv);
