diff --git a/.gitgo b/.gitgo index 2673d96..4933d3a 100644 --- a/.gitgo +++ b/.gitgo @@ -1,19 +1,18 @@ { "current_issue": { - "number": "20", + "number": "51", "labels": [ "cli", + "command", "enhancement" ], - "title": "Add branch name & commit message suggestions " + "title": "Add a command to give summary of all instructions" }, "commit_guidelines": [ - "fix:", - " feat:", - " chore:" + "cli:" ], - "custom_guidelines": false, - "selected_commit_type": "🐎 Improving performance", + "custom_guidelines": true, + "selected_commit_type": "✨ Adding a new user-facing feature", "emojis": { "initial_commit": "tada", "feature": "sparkles", @@ -32,16 +31,11 @@ "wip": "construction" }, "existing_branches": [ - "issuetype-rec", - "main", - "notice", - "readme" + "main" ], "current_branch": [ - "branch-name", - "branch-name", - "message-suggestions" + "command-summary-instructions" ], - "current_commit_message": "🐎 chore: Add branch name & commit message suggestions ", + "current_commit_message": "✨ cli: Add a command to give summary of all instructions", "use_emojis": true } \ No newline at end of file diff --git a/README.md b/README.md index 95f71e3..d7f36c9 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ npm i gitg0 Currently, we have the following 6 commands which will make you **Good To Go**, `gtg`: -### `gtg help` +### `gtg whoami` As the name suggests this command will help you know what the tool does and how to use the commands right from your terminal. diff --git a/bin/index.js b/bin/index.js index 417f7ac..d863c7f 100755 --- a/bin/index.js +++ b/bin/index.js @@ -13,6 +13,8 @@ const { const simpleGit = require("simple-git"); const git = simpleGit(); const { jsonReader } = require("../lib/funcs/jsonReader.js"); +const version = require("../package.json"); +const chalk = require("chalk"); clear(); @@ -164,4 +166,59 @@ program } }); +program + .command("version") + .alias("v") + .action(function () { + // displays Gitg0 on start + console.log( + figlet.textSync("Gitg0", { + horizontalLayout: "default", + verticalLayout: "default", + }), + "\n" + ); + console.log("v" + version.version + "-stable"); + }); + +program + .command("whoami") + .alias("w") + .action(function () { + // displays Gitg0 on start + console.log( + figlet.textSync("Gitg0", { + horizontalLayout: "default", + verticalLayout: "default", + }), + "\n" + ); + console.log( + "You just need to know 5 simple commands you and then you're " + + chalk.bold.cyan("gtg") + + ": " + + chalk.magenta("Good to Go") + ); + console.log(chalk.green("\ngtg config:\n")); + console.log( + "This command should be used to personalise your gitgo configuration. You can add your repository's commit and emoticon guidelines.\n" + ); + console.log(chalk.green("\ngtg start:\n")); + console.log( + "Everytime you start working on a new issue, just run this command in order for the tool to know which issue you're working on. After this, the tool will suggest the branch names and commit messages automatically.\n" + ); + console.log(chalk.green("\ngtg display:\n")); + console.log( + "This command can be used to display the branch name and commit that the tool will be suggesting for a particular issue once gtg start has been run.\n" + ); + console.log(chalk.green("\ngtg checkout:\n")); + console.log( + "This is a replacement for git checkout and will simply checkout with the suggested branch name.\n" + ); + console.log(chalk.green("\ngtg checkout:\n")); + console.log( + "This is a replacement for git commit and will commit your files once added with the suggested commit message.\n" + ); + }); + program.parse(process.argv);