CodeMate CLI

CodeMate cli is a cli tool that extends the capabilities of CodeMate inside the terminal environment. It works across any terminal you work with: Bash, PowerShell, Command Prompt etc. It brings many features from the VS Code Extension to terminal, giving users the choice to use CodeMate without switching to another interface. It also has additional features such as monitoring processes and autofix errors arising on compile time or run time, and generating

Pre-requisites

  • You have signed up for an account at https://codemate.ai.

  • You have the latest LTS or Current version of Nods.js and NPM installed on your computer.

Setup

Follow these steps to setup CodeMate cli

  • Open a terminal window on your computer.

  • Having met all the pre-requisites, run the command npm i -g codemate-cli

  • Once the installation is complete, run codemate to see the list of available commands:

Usage

Using CodeMate cli involves writing commands & passing them to get the desired outcome. Given below is a list of commands available, explained with their syntax:

  • codemate login: Log in to your CodeMate Account

  • codemate github: Link your GitHub account to CodeMate

  • codemate chat: Ask any query to CodeMate, just like CodeMate Chat.

a screenshot from terminal showing the responses of CodeMate cli
CodeMate cli chat command output
  • codemate generate-reports <dir>: Generate reports about the files in a directory on the parameters of best practices and security. An additional description of what the files does is also added, all inside a .codemate subdirectory.

CodeMate generate-reports command
  • codemate debug-file <file>: pass on a file as a parameter to this command, and get an output with suggestions to fix errors in the file.

  • codemate review-dir: run this command to get reviews of all files present in the current directory.

codemate review-dir generating review of the files present in current directory
  • codemate review-file <filename>: Reviews a particular file passed as a parameter to the cli.

  • codemate optimise-file <filename>: Optimize a particular file that will be passed as a parameter to the optimise command.

  • codemate monitor <process>: Monitors a running process of Node in terminal for any runtime errors, & if there are any errors, tries to suggest improvements. Works for all server side & client side processes.

CodeMate monitor process evaluating a python file for any runtime errors
  • codemate add-KB: Adds the files in current directory to a Knowledge Base.

add-KB command
  • codemate delete-KB: Resets the Knowledge Base

  • codemate set-theme <hex value>: Sets the theme of CodeMate cli. Takes the hex value as an argument.

setting light blue theme using set-theme command
  • codemate logout: logs out from CodeMate cli

  • codemate --version: displays the current version of the cli

--version command displaying the current version
  • codemate <command> --help: displays help text about a particular command.

help command displaying information about the add-KB command

Got any feedback about cli? CodeMate cli is currently growing & we would love to hear your thoughts. Submit them in our Discord server: codemate.ai/discord

Last updated

Was this helpful?