3 unstable releases
0.2.1 | May 11, 2021 |
---|---|
0.2.0 | Aug 31, 2020 |
0.1.0 | Aug 29, 2020 |
#6 in #commander
18KB
304 lines
Youtrack Commander
NOTICE I am no longer a Youtrack user, therefore I have no motivation to continue with working on this. However, I can say that writing a CLI client that simply talks to an API is quite pleasant!
Execute commands on Youtrack issues from the command line
Motivation
"I can change the state of my Youtrack issue from the command line!"
"... weird flex but OK"
Lately, due to a our team workflow, I had to frequently make small changes to Youtrack issues, to communicate the current state of the task, whether it was ready for code review, etc...
I wanted to do these interactions from the command line. And so, Youtrack Commander was born. Its philosophy is to be just a thin wrapper around issue commands and search queries.
The real reason why this exists is that I wanted to try my hand at writing a CLI app in Rust.
Example usage
Basic use - executing a comment on issue ABC-123
youtrack-commander issue ABC-123 "State In progress assignee pavol.vidlicka"
Changing issue state and leaving a comment
youtrack-commander issue ABC-123 "State CR comment" -k "Ready for CR: ..."
Run youtrack-commander --help
for a comprehensive help
Configuration
youtrack-commander
needs two things to work:
- The URL of your Youtrack instance
- A perm token to interact with the REST API (see youtrack documentation for how to get one)
youtrack-commander
loads these from a file located at $HOME/.youtrack/commander.yml
that has the following format:
youtrack_url: "https://your-youtrack.com"
auth_token: "perm:your-auth-token"
Coming soon
- a console mode with suggestions (implemented using the
/commands/assist
endpoint)
Installation
Download pre-built binaries
You can download a pre-built binaries for Linux and MacOS from releases.
The Linux binary needs OpenSSL to be installed on the system.
Using cargo
Make sure that you have the Rust toolchain installed. You can consult the Rust Book.
To install run
cargo install youtrack-commander
Similar projects
- youtrack-cli (and youtrack-rest-client that it uses) written in TypeScript
- goutrack - a go project that also allows you to execute commands on issues
Dependencies
~9–15MB
~271K SLoC