youtrack-cli
TypeScript icon, indicating that this package has built-in type declarations

0.5.0 • Public • Published

youtrack-cli

Command Line Tool for interacting with youtrack

Build Status npm NpmLicense

Install

npm install -g youtrack-cli
yarn add youtrack-cli

Usage

After you've installed the package globally, youtrack-cli will be available as youtrack in your command line.

Getting started

To setup the cli (set the URL, provide your credentials), run:

$ youtrack setup

This will guide you through the setup process.

Commands

youtrack -h

Available commands are:

project|p      manage projects
user|u         manage users
issue|i        manage issues
workitem|w     manage workitems
setup          setup youtrack cli

Projects

$ youtrack project <subcommand> <options>

Available subcommands:

list|ls [options]  list all accessible projects
list
Options:
  -r, --raw   print raw json
  -d, --desc  print description (does not apply when option --raw is used

Example:

$ youtrack project ls

image

Users

$ youtrack user <subcommand> <options>

Available subcommands:

info|i [options]        show info about current user
show [options] <login>  show info about user

Issues

$ youtrack issue <subcommand> <options>

Available subcommands:

find|f [options]            search issues with a query (interactive)
show|s [options] <issueId>  show issue info
delete|d [options] <issue>  delete an issue by its id
create|c                    creates an issue (interactive)
find
Options:
  -q, --query           non-interactive query
  -r, --raw             print raw json
  -m, --max <max>       limit number of issues shown
  -f, --fields <field>  which fields to display

Example:

$ youtrack issue f

image

Work-Items (Timetracking)

$ youtrack workitem <subcommand> <options>

Available subcommands:

list|ls [options] <issueId>  list all workitems for issue
create|c [options]           create new work item for an issue (interactive)
delete|d                     delete work item of an issue (interactive)
edit|e                       edit work item of an issue (interactive)
list
Options:
  -r, --raw             print raw json

Example:

$ youtrack workitem ls T1-2

image

create

Create a new work item for an issue in interactive mode. If all parameters are given via options, the interactive mode is skipped.

-i, --issue <issue>                  issue id
-d, --duration <duration>            duration (e.g. "1h 30m")
--date <date>                        date
-w, --worktype <worktype>            work-type
--desc, --description <description>  description
-r, --raw                            print raw json
-h, --help                           output usage information

Example:

$ youtrack w c --issue "T1-1" --duration "1h 30m" --date "6.11.2018" --worktype "testing" --description "tested it in IE"

You can also start the interactive mode by omitting all Options:

$ youtrack w c

Issue Comments

$ youtrack comment <subcommand> <options>

Available subcommands:

list|ls [options] <issueId>  list all comments of an issue
create|c [options]           add comment to an issue. starts interactive mode if parameters are omitted.
delete|d                     delete a comment (interactive
edit|e                       update a comment (interactive
create

Example:

$ youtrack comment create -i T1-1 -c "my comment"

Package Sidebar

Install

npm i youtrack-cli

Weekly Downloads

5

Version

0.5.0

License

ISC

Unpacked Size

81.2 kB

Total Files

76

Last publish

Collaborators

  • shanehofstetter