Skip to content

Jira Client

@theholocron/jira-client is a typed wrapper around the Jira Cloud REST API v2 for managing issues, projects, versions, and transitions.

Terminal window
pnpm add @theholocron/jira-client
import { createJiraClient } from "@theholocron/jira-client";
const token = Buffer.from(`${process.env.ATLASSIAN_EMAIL}:${process.env.ATLASSIAN_TOKEN}`).toString("base64");
const client = createJiraClient({
host: "https://myorg.atlassian.net",
token,
});
const issue = await client.issues.get("PROJ-123");
const issues = await client.issues.search({
jql: 'project = PROJ AND status = "In Progress"',
});
await client.transitions.create("PROJ-123", { transitionId: "31" });

Jira uses HTTP Basic auth. The token must be a Base64-encoded email:apiToken string — not a raw API token:

const token = Buffer.from(`${email}:${apiToken}`).toString("base64");

Generate an API token at Atlassian account settings → Security → API tokens. The host is your Atlassian domain, e.g. https://myorg.atlassian.net.

Namespace Covers
issues Issues: create, read, update and search
links Links between issues
projects Projects
transitions Workflow transitions and resolutions
versions Project versions

The full API reference is generated from the package’s TSDoc comments.