/tars-cli

CLI for TARS

Primary LanguageJavaScriptMIT LicenseMIT

English description | Описание на русском

TARS-CLI

NPM version Downloads Mac/Linux Build Status Windows Build status Gitter

TARS-CLI — Command Line Interface for the TARS markup builder TARS.

The main problem in developing markup with TARS is all npm-dependences installing for each project every time. As the result, each project takes more than 200MB. To simplify initialization of the project and the work with TARS TARS-CLI was established. All TARS basic documentation is in the original TARS repository TARS.

TARS-CLI is just an interface of the main builder, which allows you to:

  • Initialize the project.
  • Start dev-command with browser reloading and opening tunnel to the Internet.
  • Start the build-command with the minified files or in release mode.
  • Add component with different set of files.
  • Add empty page or copy an existing page.

If you have any problems with TARS-CLI, please read the troubleshooting docs.

How to install

You have to install TARS-CLI globally:

npm i -g tars-cli

If you get a Permission denied or Error: EACCES error, you should run the previous command again in sudo.

If you use Node.js version 5.x.x, please, be sure, that you use npm version 3.3.10 and higher. Otherwise update npm by using command:

npm i -g npm

For Windows you have to do some more steps:

  • navigate to C:\Program Files (x86)\nodejs or C:\Program Files\nodejs via cmd.exe or any available terminal. The path depends on how Node.js was installed;
  • run command npm install npm@latest.

If you get a Permission denied or Error: EACCES error, you should run the previous command again in sudo.

Initialize your first project with:

tars init

TARS-CLI commands

All commands have similar template of executing:

tars + command-name + flags

You can run the tars --help or tars -h or just tars without additional command and flags at any moment. This command displays information about all available commands and flags. Also you can add the --help key or -h key to any command to get full description of this command.

tars -v or tars --version will display current version of TARS-CLI installed on your computer and current version of TARS in current project. Also, you will be informed about updating, if it is available.

Almost all command has the interactive mode. In this mode you can to communicate with CLI like it has its own GUI. If you are using interactive mode you don’t need to know what the flags are responsible for, because you are communicate with CLI with natural language. Interactive mode is easy to disable if you use automatic testing or something else that doesn’t require the human presence.

Command list

Feel free to write to tars.builder@gmail.com or gitter and ask me all question about TARS-CLI.