jirac/readme.md

158 lines
3.2 KiB
Markdown
Raw Permalink Normal View History

2025-01-21 15:55:34 +01:00
# Jirac
A CLI for creating and managing Jira issues directly from your terminal.
2025-01-21 15:55:34 +01:00
## Features
- Create Jira issues from Markdown files or using your preferred editor
- List issues assigned to specific users
2025-01-21 15:55:34 +01:00
- Simple configuration using TOML
- Interactive issue creation with templates
- Search with JQL
- Multiple output methods
- Jira-doc support
2025-01-21 15:55:34 +01:00
## Installation
### from crates.io
```
cargo install jirac
```
## Usage
```
Usage: jirac <COMMAND>
Commands:
2025-01-21 20:44:38 +01:00
create Create an issue
list Find issues currently assigned to you
search Search for issues
2025-01-21 21:35:17 +01:00
view View an issue
2025-01-21 20:44:38 +01:00
init Set up the configuration
2025-01-21 15:55:34 +01:00
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
```
### Creating ab issue
2025-01-21 15:55:34 +01:00
```
Create an issue
2025-01-21 17:05:29 +01:00
Usage: jirac create [OPTIONS] [MARKDOWN_FILE]
2025-01-21 15:55:34 +01:00
Arguments:
2025-01-21 17:05:29 +01:00
[MARKDOWN_FILE] A markdown file
2025-01-21 15:55:34 +01:00
Options:
--project <PROJECT> The project key in which to create the issue
--open Open the new issue in a browser
2025-01-21 15:55:34 +01:00
-h, --help Print help
```
*Using your favourite editor*
```sh
jirac create
2025-01-21 15:55:34 +01:00
```
*From a Markdown file*
2025-01-21 15:55:34 +01:00
```sh
jirac create issue.md
```
*Specify a project*
```sh
jirac create --project KEY
2025-01-21 15:55:34 +01:00
```
### Listing issues
2025-01-21 15:55:34 +01:00
```
Find issues currently assigned to you
2025-01-21 17:05:29 +01:00
Usage: jirac list [OPTIONS]
2025-01-21 15:55:34 +01:00
Options:
2025-01-21 22:03:11 +01:00
-o, --output <OUTPUT> Pick an output formatter [default: pretty] [possible values: pretty, json]
-h, --help Print help
2025-01-21 15:55:34 +01:00
```
### Search for issues
2025-01-21 20:44:38 +01:00
```
Search for issues
Usage: jirac search [OPTIONS] <JQL>
Arguments:
<JQL> A JQL string
Options:
2025-01-21 22:03:11 +01:00
-o, --output <OUTPUT> Pick an output formatter [default: pretty] [possible values: pretty, json]
-h, --help Print help
2025-01-21 20:44:38 +01:00
```
Use [JQL](https://support.atlassian.com/jira-software-cloud/docs/use-advanced-search-with-jira-query-language-jql/) to search for Issues.
*Find all in-progress issues in a project*
2025-01-21 20:44:38 +01:00
```
jirac search 'project = KEY AND status = "In Progress" ORDER BY created DESC'
```
2025-01-21 21:35:17 +01:00
### View an issue
```
View an issue
Usage: jirac view [OPTIONS] <ISSUE>
Arguments:
<ISSUE> An issue key, for example, KEY-123
Options:
2025-01-21 22:03:11 +01:00
-o, --output <OUTPUT> Pick an output formatter [default: pretty] [possible values: pretty, json]
-h, --help Print help
2025-01-21 21:35:17 +01:00
```
```sh
./target/release/jirac view KEY-123
```
2025-01-21 15:55:34 +01:00
## Configuration
Get the following information:
* Jira instance URL
* You email
* [An API key](https://id.atlassian.com/manage-profile/security/api-tokens)
2025-01-21 20:44:38 +01:00
Then run the `jirac init` command
2025-01-21 15:55:34 +01:00
```
2025-01-21 17:05:29 +01:00
Setup the configuration
2025-01-21 15:55:34 +01:00
Usage: jirac init --url <URL> --email <EMAIL> --token <TOKEN>
Options:
2025-01-21 17:05:29 +01:00
--url <URL> Jira instance URL
--email <EMAIL> User email
--token <TOKEN> User Token
2025-01-21 15:55:34 +01:00
-h, --help Print help
```
The config file is stored at:
| OS | Location |
|---------|----------------------------------------------------------------|
| Windows | `~/.config/jirac/config.toml` |
| MacOS | `~/Library/Application Support/com.runebaas.jirac/config.toml` |
| Linux | `%APPDATA%\runebaas\jirac\config\config.toml` |