youtrack-cli
A CLI for the JetBrains YouTrack REST API, developed and tested against a local YouTrack instance.
Quick start (users)
# Install from GitHub (nothing on PyPI yet — see CHANGELOG.md)
pipx install git+https://github.com/rock3r/youtrack-cli
# After the first PyPI release:
# pipx install jetbrains-youtrack-cli
# Configure your YouTrack instance and save the token
yt auth login
# Verify
yt --version
yt status
# Search issues
yt issues --all --limit 20
yt show JT-1
# Create / edit / comment / link
yt create DEMO "Fix the widget" --type Bug --priority Major
yt edit JT-1 --state Done --summary "Fixed"
yt comment JT-1 "Verified on staging"
yt link JT-1 relates_to JT-2
Global options (
--output,--base-url,--token,--config,--op-vault,--op-item,--op-field,--no-color,--quiet,--version) must appear before the subcommand because Typer places them on the root app. Example:yt --output json issues, notyt issues --output json.
Run yt --help or yt <command> --help for options. Use --output json for scripting.
Install: this repo has not been published to PyPI yet. Use the pipx install git+…
line above, or make standalone for a local dist/yt.pyz. The PyPI package name will be
jetbrains-youtrack-cli when the first release is tagged.
Authentication
yt needs a YouTrack base URL and a permanent API token. It looks them up in this
order:
- Command-line flags:
--base-urland--token. - Environment variables:
YOUTRACK_BASE_URLandYOUTRACK_TOKEN. - A
.envfile in the current working directory. - The config file at
~/.config/youtrack-cli/config.toml(written byyt auth login). - 1Password CLI (
op):--op-vault,--op-item, and--op-field(or the equivalentYOUTRACK_OP_*environment variables). - Default base URL:
http://localhost:8080.
If you use 1Password, the token is fetched from op once per command and cached for the
process lifetime. The default field is password; use --op-field to read a different
field. Example:
yt --op-vault Private --op-item "YouTrack token" --op-field "api token" status
Run yt auth login to save a token to the config file so you don't need --token or
--op-* on every invocation.
Note: the
.envand config-file sources are never mixed when the token comes from different places, so a project directory.envcan't accidentally redirect a stored config token to a different server.
Quick start (local dev environment)
Everything you need — a local YouTrack server in Apple Container, configured and seeded with realistic JetBrains-style data — in one command:
./scripts/setup.sh
This installs Apple Container, runs YouTrack 2026.2, completes the first-run wizard headlessly, mints an API token, and provisions projects/users/issues. See docs/local-youtrack.md for full details.
| URL | http://localhost:8080 |
| Admin | admin / Yt-Admin-2026! |
| API token | in .env (YOUTRACK_TOKEN) |
Verify it
source .env
curl -s -H "Authorization: Bearer $YOUTRACK_TOKEN" \
"$YOUTRACK_BASE_URL/api/issues?query=project:JT&fields=idReadable,summary" | jq
Seed data
8 projects (JT, IJPL, IDEA, KT, RID, WEB, PY, DEMO), 11 users, and
~115 issues across all states/priorities/types/subsystems — mirrors the structure of
youtrack.jetbrains.com. Issues are enriched with comments and links to exercise the
full CLI workflow. Re-provision any time with:
./scripts/provision.py && ./scripts/provision_jewel.py && ./scripts/provision_enrichment.py
(idempotent).
Custom field schema (mirrors youtrack.jetbrains.com)
provision_jewel.py applies the exact custom-field layout from the official instance's
Jewel project to every project:
| Field | Type | Required | Default |
|---|---|---|---|
| Priority | enum | yes | Normal |
| Type | enum | yes | — |
| State | state | yes | Submitted |
| Subsystems | enum[*] (multi) | no | — |
| Assignee | user | no | — |
| Target version | version | yes | Backlog |
| Included in builds | build[*] (multi) | no | — |
| Available in | version[*] (multi) | no | — |
| Security Severity | enum | no | — |
| Security Problem Type | enum | no | Vulnerability |
| QA | user | no | — |
| Verified | enum | no | — |
| Verified in builds | build[*] (multi) | no | — |
Plus the YouTrack defaults (Subsystem, Fix versions, Affected versions,
Fixed in build, Estimation, Spent time) — handy for exercising every field type
in the CLI.
Layout
scripts/
setup.sh # one-shot install + configure + provision
configure.py # complete the wizard + create API token (idempotent)
provision.py # seed projects/users/issues (idempotent)
provision_jewel.py # apply the youtrack.jetbrains.com custom-field schema
provision_enrichment.py # add comments and links for workflow variety
youtrack.sh # start/stop/status/logs/shell/reset-data
query.sh # example API calls (reference for building the CLI)
docs/
local-youtrack.md
.youtrack-server/ # YouTrack persistent data (gitignored)
.env # base URL + token (gitignored)
API reference (for building the CLI)
All calls use Authorization: Bearer $YOUTRACK_TOKEN and return JSON.
YouTrack uses a fields= query param to select returned fields (see
Fields Syntax).
| Resource | Method & path |
|---|---|
| Current user | GET /api/users/me?fields=login,fullName |
| Issues (search) | GET /api/issues?query=<youtrack query>&fields=... |
| Get issue | GET /api/issues/{id}?fields=... |
| Create issue | POST /api/issues |
| Apply command | POST /api/issues/{id}/commands |
| Projects | GET /api/admin/projects?fields=... |
| Users | GET /api/users?fields=... |
| Custom fields | GET /api/admin/customFieldSettings/customFields |
Run ./scripts/query.sh for live examples.
License
Licensed under the Unenshittifiable License (UEL) v1.0. Free for internal and community
use, modification, and self-hosting. You may not repackage and sell the CLI itself as a
commercial product; improvements stay under UEL. See LICENSE for the full text.
Metadata
Release files for jetbrains-youtrack-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jetbrains_youtrack_cli-0.1.0.tar.gz | 60.9 kB | Without provenance | Details for jetbrains_youtrack_cli-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jetbrains_youtrack_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for jetbrains_youtrack_cli-0.1.0-py3-none-any.whl |
Total release size: 86.9 kB
Release files / jetbrains_youtrack_cli-0.1.0.tar.gz
| Download URL | jetbrains_youtrack_cli-0.1.0.tar.gz |
|---|---|
| Size | 60.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3cd91b3513f8ae0fb5580238afbe77029303909d7239e3cdcdac399c9ad3bea1
|
|
BLAKE2b-256 checksum How to use checksums |
6bdd31146e01a4d8dc38424280b8e0f0314bb37e16dac8a84d77723b5aafd3be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / jetbrains_youtrack_cli-0.1.0-py3-none-any.whl
| Download URL | jetbrains_youtrack_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 26.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
507998e5c1a0cf2b97f3c2b3be59b3e42708a4f26ad8012e84ff0d5fef2cbee4
|
|
BLAKE2b-256 checksum How to use checksums |
e7700c1a9cb84ea63274aec09c21b5017a15ce5ef040e73c780b9debadcb9280
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for jetbrains-youtrack-cli 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.