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
- Host: GitHub
- URL: https://github.com/shanehofstetter/youtrack-cli
- Owner: shanehofstetter
- Created: 2018-11-04T19:29:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-28T04:09:30.000Z (over 3 years ago)
- Last Synced: 2025-04-21T05:43:01.416Z (about 1 year ago)
- Topics: cli, jetbrains, node, nodejs, npm-package, typescript, youtrack
- Language: TypeScript
- Homepage:
- Size: 515 KB
- Stars: 29
- Watchers: 2
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# youtrack-cli
Command Line Tool for interacting with youtrack
[](https://travis-ci.com/shanehofstetter/youtrack-cli)


[](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¤cy_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
```

#### 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
```

#### 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
```

##### 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"
```