@h4pplness/jira-cli
v1.0.2
Published
Jira CLI — Atlassian shared config layer
Readme
jira-cli
A command-line Jira client for teams that work across one or more Atlassian environments. It stores Jira servers, credentials, and contexts locally, then lets you search, view, create, edit, comment on, and transition Jira issues from the terminal.
Features
- Quick interactive login wizard.
- Multiple Jira contexts for different companies, projects, staging instances, or credentials.
- Jira Cloud and Jira Data Center/Server support.
- Basic auth with Atlassian email + API token, Personal Access Token, and OAuth2 access token configuration.
- Issue search with JQL or common filters.
- Issue view, create, edit, comment, and transition commands.
- Epic list, view, create, and edit commands.
- Project list and detail commands.
Requirements
- Node.js 20 or newer.
- Access to a Jira Cloud, Data Center, or Server instance.
- A Jira API token, PAT, or OAuth2 access token.
Install
Install globally from npm:
npm install -g @h4pplness/jira-cli
jira --helpFor local development, install dependencies:
npm installRun locally:
npm start -- --helpLink the CLI as jira on your machine:
npm link
jira --helpQuick Start
Run the login wizard:
jira loginThe wizard creates:
- a server entry,
- a credential entry,
- a context that joins the server and credential.
For Jira Cloud, choose basic authentication and use your Atlassian email with an API token from:
https://id.atlassian.com/manage-profile/security/api-tokensFor Jira Data Center/Server, choose pat and provide a Personal Access Token.
Daily Usage
Search issues:
jira issue search --project PROJ --status "In Progress"
jira issue search "login error" --project PROJ --assignee me
jira issue search --jql 'project = "PROJ" AND status = "Done" ORDER BY updated DESC'View an issue:
jira issue view PROJ-123
jira issue view PROJ-123 --commentsCreate an issue:
jira issue create --project PROJ --type Bug --summary "Login crashes on invalid token"Edit an issue:
jira issue edit PROJ-123 --summary "Updated summary"
jira issue edit PROJ-123 --assignee [email protected] --priority High --due 2026-06-30Add a comment:
jira issue comment PROJ-123 --message "Fixed in the latest build."Transition an issue:
jira issue transition PROJ-123 --status DoneEpics
List epics in a project:
jira epic list --project PROJView an epic and its child issues:
jira epic view PROJ-100Create an epic:
jira epic create --project PROJ --summary "Billing migration"
jira epic create --project PROJ --summary "Billing migration" --description "Track billing work" --due 2026-07-31Edit an epic:
jira epic edit PROJ-100 --summary "Billing migration phase 2" --due 2026-07-31Projects
List projects:
jira project listView project details:
jira project view PROJList valid issue types for a project:
jira project issue-types PROJConfiguration
View all configuration:
jira config viewShow the active context:
jira config currentCreate configuration manually:
jira config server add my-company --url https://company.atlassian.net --type cloud
jira config credential add my-token --type basic
jira config context add work --server my-company --credential my-tokenSwitch contexts:
jira config context list
jira config context use workRun a command with a specific context:
jira issue search --context staging --project PROJ
jira project list --context workTest contexts:
jira config context test
jira config context test work
jira config context test --allLocal Data
Configuration is stored at:
~/.atlassian-cli/config.jsonThe file contains server URLs, context names, and credentials. Treat it as sensitive. The CLI writes the file with restricted permissions where supported by the operating system.
Command Reference
jira login [--context <name>]
jira config view
jira config current
jira config server add <name> --url <url> --type <cloud|datacenter|server>
jira config server list
jira config server remove <name>
jira config server test <name>
jira config credential add <name> --type <basic|pat|oauth2>
jira config credential list
jira config credential remove <name>
jira config credential renew <name>
jira config context add <name> --server <name> --credential <name>
jira config context list
jira config context use <name>
jira config context remove <name>
jira config context test [name] [--all]
jira issue search [query] [--project <key>] [--assignee <email|me>] [--status <status>] [--type <type>] [--limit <n>] [--jql <jql>] [--context <name>]
jira issue view <issueKey> [--comments] [--context <name>]
jira issue create [--project <key>] [--type <type>] [--summary <text>] [--parent <key>] [--context <name>]
jira issue edit <issueKey> [--summary <text>] [--assignee <email>] [--priority <priority>] [--due <date>] [--context <name>]
jira issue comment <issueKey> [--message <text>] [--context <name>]
jira issue transition <issueKey> [--status <status>] [--context <name>]
jira epic list --project <key> [--limit <n>] [--context <name>]
jira epic view <epicKey> [--context <name>]
jira epic create [--project <key>] [--summary <text>] [--description <text>] [--due <date>] [--context <name>]
jira epic edit <epicKey> [--summary <text>] [--due <date>] [--context <name>]
jira project list [--context <name>]
jira project view <projectKey> [--context <name>]
jira project issue-types <projectKey> [--context <name>]Development
Run the CLI directly:
node bin/jira.js --helpUseful scripts:
npm start
npm run link