#!/usr/bin/env node

import * as Path from 'path';
import {CLI, Shim} from 'clime';

import {$log} from "ts-log-debug";
$log.level = "error";
$log.name = "model-nest";

// The second parameter is the path to folder that contains command modules.
let cli = new CLI('model-nest', Path.join(__dirname, 'commands'));

// Clime in its core provides an object-based command-line infrastructure.
// To have it work as a common CLI, a shim needs to be applied:
let shim = new Shim(cli);
try {
    shim.execute(process.argv);
} catch (err) {
    console.log("Not a model nest repo");
}
