Skip to content

open-cli-collective/atlassian-cli

Repository files navigation

Atlassian CLI Tools

Unified CLI tools for Atlassian Cloud products.

Consolidation note: This repo is the home for both jtk (Jira CLI) and cfl (Confluence CLI), previously maintained as separate repos (jira-ticket-cli and confluence-cli). Those repos are now archived. All development happens here.

Table of Contents

Tools

Tool Description Full Documentation
jtk Jira Cloud CLI for issues, sprints, and boards jtk README
cfl Confluence Cloud CLI for markdown-first page management cfl README

Installation

macOS

Homebrew (recommended)

# Install jtk (Jira CLI)
brew install open-cli-collective/tap/jira-ticket-cli

# Install cfl (Confluence CLI)
brew install open-cli-collective/tap/cfl

# Upgrade to latest
brew upgrade jira-ticket-cli cfl

Note: If brew upgrade doesn't pick up a new version, your local tap may be stale. Run git -C $(brew --repository open-cli-collective/tap) pull to refresh it, then retry the upgrade.

Binary download

Download from the Releases page for your architecture (Intel or Apple Silicon).


Windows

Chocolatey

# Install jtk
choco install jira-ticket-cli

# Install cfl
choco install confluence-cli

Winget

# Install jtk
winget install OpenCLICollective.jira-ticket-cli

# Install cfl
winget install OpenCLICollective.cfl

Binary download

Download from the Releases page for your architecture.


Linux

Debian/Ubuntu (APT)

# Download the .deb package from Releases
sudo dpkg -i jtk_*.deb
sudo dpkg -i cfl_*.deb

RPM-based (Fedora, RHEL, etc.)

# Download the .rpm package from Releases
sudo rpm -i jtk-*.rpm
sudo rpm -i cfl-*.rpm

Binary download

Download from the Releases page for your architecture (amd64 or arm64).


Build from Source

Requires Go 1.24 or later.

git clone https://github.com/open-cli-collective/atlassian-cli.git
cd atlassian-cli
make build
# Binaries are in bin/

Migrating from the Old Repos

If you previously installed from jira-ticket-cli or confluence-cli:

Homebrew users:

# If you installed via the 'jtk' cask (legacy)
brew uninstall jtk
brew install open-cli-collective/tap/jira-ticket-cli

# If you installed via 'jira-ticket-cli', you're already set — just upgrade
brew upgrade jira-ticket-cli

# If brew upgrade says "already installed" but you're on an old version,
# refresh your local tap first:
git -C $(brew --repository open-cli-collective/tap) pull
brew upgrade jira-ticket-cli

GitHub release users:

All future releases are published here. Update your bookmarks/scripts to download from: https://github.com/open-cli-collective/atlassian-cli/releases

Your existing configuration (~/.config/jtk/ and ~/.config/cfl/) is unchanged — no reconfiguration needed.

Getting Started

Configuration

Both tools support interactive setup:

# Configure Jira credentials
jtk init

# Configure Confluence credentials
cfl init

The init wizards will prompt for:

  • Atlassian URL (e.g., https://mycompany.atlassian.net)
  • Email address
  • API token

Configuration is stored in:

  • jtk: ~/.config/jtk/config.json
  • cfl: ~/.config/cfl/config.yml

Authentication

Both tools use Atlassian API tokens for authentication. To create a token:

  1. Go to Atlassian Account Settings
  2. Click "Create API token"
  3. Give it a descriptive label (e.g., "CLI Tools")
  4. Copy the token and use it during init or set it as an environment variable

Shared Credentials

Use ATLASSIAN_* environment variables for shared authentication across both tools:

Variable Description
ATLASSIAN_URL Base URL (e.g., https://mycompany.atlassian.net)
ATLASSIAN_EMAIL Your Atlassian account email
ATLASSIAN_API_TOKEN Your API token

Tool-specific variables take precedence:

  • jtk: JIRA_URL, JIRA_EMAIL, JIRA_API_TOKEN
  • cfl: CFL_URL, CFL_EMAIL, CFL_API_TOKEN

Example:

# Set shared credentials (used by both tools)
export ATLASSIAN_URL="https://mycompany.atlassian.net"
export ATLASSIAN_EMAIL="you@example.com"
export ATLASSIAN_API_TOKEN="your-api-token"

# Now both tools work without additional configuration
jtk issues list --project PROJ
cfl page list --space DEV

jtk - Jira CLI

Manage Jira issues, sprints, and boards from the command line.

# Issues
jtk issues list --project PROJ
jtk issues get PROJ-123
jtk issues create --project PROJ --type Task --summary "Fix bug"
jtk issues update PROJ-123 --field priority=High
jtk issues search "project = PROJ AND status = 'In Progress'"
jtk issues assign PROJ-123 <account-id>
jtk issues move PROJ-123 --to-project OTHERPROJ

# Projects
jtk projects list
jtk projects get PROJ
jtk projects create --key PROJ --name "My Project" --lead <account-id>
jtk projects update PROJ --name "New Name"
jtk projects delete PROJ

# Transitions
jtk transitions list PROJ-123
jtk transitions do PROJ-123 "Done"

# Comments
jtk comments list PROJ-123
jtk comments add PROJ-123 --body "This is fixed"

# Sprints
jtk sprints list --board 123
jtk sprints current --board 123
jtk sprints issues 456
jtk sprints add 456 PROJ-123

# Boards
jtk boards list
jtk boards get 123

# Attachments
jtk attachments list PROJ-123
jtk attachments add PROJ-123 --file screenshot.png
jtk attachments get 12345 --output ./downloads/

# Users
jtk users search "john"
jtk me

# Automation rules
jtk automation list
jtk automation get 123
jtk automation export 123 > rule-backup.json
jtk automation create --file rule.json
jtk automation enable 123

Full documentation: tools/jtk/README.md

cfl - Confluence CLI

Manage Confluence pages with a markdown-first workflow.

# List pages in a space
cfl page list --space DEV

# View page in markdown
cfl page view 123456

# Create page from markdown
cfl page create --space DEV --title "New Page" --file content.md

# Edit page in your editor
cfl page edit 123456

# Search content
cfl search "my search query"
cfl search --cql "space = DEV AND type = page"

# Copy a page
cfl page copy 123456 --title "Copy of Page"

# List spaces
cfl space list

# Manage attachments
cfl attachment list --page 123456
cfl attachment upload --page 123456 --file diagram.png
cfl attachment download att789 -O ./diagram.png

Full documentation: tools/cfl/README.md

Shell Completion

Both tools support shell completion for bash, zsh, and fish.

Bash:

# jtk
jtk completion bash > /etc/bash_completion.d/jtk

# cfl
cfl completion bash > /etc/bash_completion.d/cfl

Zsh:

# jtk
jtk completion zsh > "${fpath[1]}/_jtk"

# cfl
cfl completion zsh > "${fpath[1]}/_cfl"

Fish:

# jtk
jtk completion fish > ~/.config/fish/completions/jtk.fish

# cfl
cfl completion fish > ~/.config/fish/completions/cfl.fish

Development

This is a Go workspace monorepo. Both tools can be built and tested together.

# Build both tools
make build

# Run all tests
make test

# Run linter
make lint

# Build, test, and lint
make all

# Build individual tools
make build-jtk
make build-cfl

# Run tests for a specific tool
go test ./tools/jtk/...
go test ./tools/cfl/...

Project Structure

atlassian-cli/
├── go.work              # Go workspace file
├── Makefile             # Build automation
├── shared/              # Shared packages
│   ├── adf/             # Atlassian Document Format helpers
│   ├── auth/            # Authentication (API token, env vars)
│   ├── client/          # HTTP client with retry and error handling
│   ├── config/          # Configuration loading
│   ├── errors/          # Unified error parsing (Jira, Confluence, Automation)
│   ├── exitcode/        # Exit code constants
│   ├── prompt/          # Interactive prompts
│   ├── url/             # URL utilities
│   ├── version/         # Build-time version info
│   └── view/            # Output formatting (table, JSON, plain)
└── tools/
    ├── cfl/             # Confluence CLI
    │   ├── api/         # API client
    │   ├── cmd/cfl/     # Entry point
    │   └── internal/    # Commands and config
    └── jtk/             # Jira CLI
        ├── api/         # API client
        ├── cmd/jtk/     # Entry point
        └── internal/    # Commands and config

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/my-feature)
  3. Make your changes with tests
  4. Run make all to verify
  5. Commit with conventional commit messages (feat:, fix:, etc.)
  6. Push and create a pull request

See the individual tool CLAUDE.md files for detailed development guidance:

License

MIT License. See LICENSE for details.

About

CLI tools for Atlassian products and capabilities

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages