Skip to main content

A CLI utility to track how much time you spent on JIRA tickets

Project description

jira-time

jira-time is an interactive command-line tool for logging work against Jira issues without touching the web UI. Start a timer, enter manual durations, and search across your projects from one resilient CLI.

Features

  • Interactive prompts for adding Jira Cloud or Server/Data Center instances.
  • Timer-based and manual time logging with optional comments.
  • Fast issue discovery via saved JQL, team/project views, keyword search, or direct key entry.
  • Automatic retries with sensible HTTP timeouts so transient Jira or network failures do not crash the session.
  • Stores configuration under ~/.config/jira-time/ so repeated runs pick up your saved servers and preferences.

Requirements

  • Python 3.10 or newer
  • A Jira Cloud API token or Jira Server/Data Center personal access token

Installation

jira-time is published on PyPI. Install it with your preferred Python tool:

# Via pipx (recommended for standalone CLIs)
$ pipx install jira-time

# Or install into an existing virtual environment
$ pip install jira-time

After installation the jira-time command is available on your PATH.

Quick Start

  1. Run jira-time from your terminal.
  2. On first launch you will be prompted to add a Jira server:
    • Supply the base URL, e.g. https://your-instance.atlassian.net.
    • Choose Jira Cloud - Email and API token to authenticate with Atlassian cloud credentials, or Jira Server / Data Center - Personal Access Token for self-hosted instances.
    • Enter an optional friendly name, default issue JQL, shared/team JQL, and a comma-separated list of project keys used for broader searches.
  3. Provide the requested credentials:
    • Cloud: Atlassian email address and API token (create/manage at https://id.atlassian.com/manage-profile/security/api-tokens).
    • Server/DC: Personal Access Token (PAT) generated from https://<YOUR_JIRA_SERVER>/secure/ViewProfile.jspa?selectedTab=com.atlassian.pats.pats-plugin:jira-user-personal-access-tokens.
  4. jira-time verifies the credentials and writes them to ~/.config/jira-time/jira-time.conf. Subsequent runs reuse the same server selection.

Security note: Credentials are stored unencrypted in the config file. Ensure your local user account is trusted and the directory permissions are locked down appropriately.

Using the CLI

Selecting issues

Each session starts by choosing how you would like to find tickets. Depending on your configuration you will see options such as:

  • My assigned issues - uses the per-server issue_jql (defaults to assignee=currentUser() AND statusCategory not in (Done)).
  • Shared/team buckets - shown when team_issue_jql is configured.
  • All project tickets - lists issues from the configured project_keys and filters out Done work.
  • Search Jira by keywords - runs a fuzzy search across summary and description; include a key like TEAM-123 for an exact match.
  • Search Jira with custom JQL - paste any JQL query and browse the results.
  • Enter issue key manually - type a known issue key if you already have it.

While results load, a spinner appears so you can see progress. Inside any list you may press b to return to the view selector.

You can edit saved views later by modifying ~/.config/jira-time/jira-time.conf:

[my-server]
url = https://example.atlassian.net
auth_type = cloud_token
email = alice@example.com
api_token = <redacted>
issue_jql = assignee = currentUser() AND statusCategory not in (Done)
team_issue_jql = project = MEET AND type = Task
project_keys = PROJ, OPS, MEET

Leave team_issue_jql or project_keys blank to hide those menu entries.

Logging time

Once you pick an issue you can either:

  • Start Timer - keep the terminal open while you work. Press Enter to stop the timer, review the tracked duration, and add an optional comment.
  • Manual Time Entry - type a duration such as 30m, 1h, or 2d and optionally describe the work performed.

Before submitting, jira-time lets you adjust the duration. Worklog API calls are automatically retried when Jira responds with transient errors (timeouts, HTTP 429/5xx, etc.). If retries still fail you can confirm whether to try again manually.

Resilience and timeouts

All outbound Jira requests use a three second timeout and exponential backoff. Transient failures are retried up to three times before the tool asks how you would like to proceed. This keeps long-running sessions responsive and avoids crashing with obscure tracebacks.

Demos

Automatic time logging in action:

Manual entry flow:

Advanced multi-issue workflow, including integration with did:

Resulting Jira worklogs:

Running from source

Clone the repository and install dependencies with Poetry:

$ git clone https://github.com/jonnyhoff/jira-time
$ cd jira-time
$ poetry install

Launch the CLI from the virtual environment:

$ poetry run jira-time

Development

  • The project uses Poetry for dependency management and packaging.
  • Demo assets are recorded with asciinema and rendered using agg.
  • Contributions and bug reports are welcome via GitHub issues and pull requests.

License

Distributed under the MIT License. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jira_time-1.0.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jira_time-1.0.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file jira_time-1.0.0.tar.gz.

File metadata

  • Download URL: jira_time-1.0.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jira_time-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d7e29dc466de96d8ff19ef60a1035b1620d98fff3dd8427c7acc3a1739617ae9
MD5 313bae37fb79371254bdb299c240a1ef
BLAKE2b-256 5938d74f580469ac839332f7f4d598160ef829c0635cf943f14f9254269a5925

See more details on using hashes here.

Provenance

The following attestation bundles were made for jira_time-1.0.0.tar.gz:

Publisher: python-publish.yml on jonnyhoff/jira-time

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jira_time-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: jira_time-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jira_time-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6eafa19794c4c7df7229dad1da8ea907f8c8b6b03726621974be7cb482b4200
MD5 1b868dc3428ff6d41ab71b9ee8f3ea52
BLAKE2b-256 7c36740cf346c0cd2c441c989101ff580f8eb125aaf9ac88ad9ee53e41ab9c1b

See more details on using hashes here.

Provenance

The following attestation bundles were made for jira_time-1.0.0-py3-none-any.whl:

Publisher: python-publish.yml on jonnyhoff/jira-time

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page