An open API service indexing awesome lists of open source software.

https://github.com/shanehofstetter/youtrack-cli

Command Line Tool for interacting with youtrack
https://github.com/shanehofstetter/youtrack-cli

cli jetbrains node nodejs npm-package typescript youtrack

Last synced: about 1 year ago
JSON representation

Command Line Tool for interacting with youtrack

Awesome Lists containing this project

README

          

# youtrack-cli
Command Line Tool for interacting with youtrack

[![Build Status](https://travis-ci.com/shanehofstetter/youtrack-cli.svg?branch=master)](https://travis-ci.com/shanehofstetter/youtrack-cli)
![npm](https://img.shields.io/npm/v/youtrack-cli.svg)
![NpmLicense](https://img.shields.io/npm/l/youtrack-cli.svg)

[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate/?business=PB26QWEQQ3RE4&no_recurring=0&item_name=Support+my+open+source+work+on+github+%E2%9D%A4%EF%B8%8F&currency_code=USD)

## Install
```
npm install -g youtrack-cli
```
```
yarn global 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:
```bash
$ 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
```

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:

```bash
$ youtrack project ls
```

![image](https://user-images.githubusercontent.com/13404717/48026722-28e7af00-e147-11e8-8716-e63e9be1d0f8.png)

#### Users

```
$ youtrack user
```

Available subcommands:

```
info|i [options] show info about current user
show [options] show info about user
```

#### Issues

```
$ youtrack issue
```

Available subcommands:

```
find|f [options] search issues with a query (interactive)
show|s [options] show issue info
delete|d [options] 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 limit number of issues shown
-f, --fields which fields to display
```

Example:

```bash
$ youtrack issue f
```

![image](https://user-images.githubusercontent.com/13404717/48168483-ac440480-e2ef-11e8-9de5-6484deb0bad4.png)

#### Work-Items (Timetracking)

```
$ youtrack workitem
```

Available subcommands:
```
list|ls [options] 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:

```bash
$ youtrack workitem ls T1-2
```

![image](https://user-images.githubusercontent.com/13404717/48168349-232ccd80-e2ef-11e8-9cb7-dbe8222e0203.png)

##### 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 id
-d, --duration duration (e.g. "1h 30m")
--date date
-w, --worktype work-type
--desc, --description description
-r, --raw print raw json
-h, --help output usage information
```

Example:

```bash
$ 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:

```bash
$ youtrack w c
```

#### Issue Comments

```
$ youtrack comment
```
Available subcommands:

```
list|ls [options] 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:

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