Skip to main content

A powerful CLI tool for managing Jira and Confluence

Project description

atlassian-cli

A powerful command-line tool for managing Jira and Confluence built on top of atlassian-python-api.

Languate - Python PyPI - License PyPI PyPI - Downloads

Features

  • ๐Ÿ› Jira: List, create, update, delete issues; manage projects, sprints, users
  • ๐Ÿ“„ Confluence: Manage spaces, pages, attachments; search with CQL
  • ๐Ÿ” Flexible auth: Config file + environment variable support
  • ๐ŸŽจ Rich output: Pretty, table, and JSON output formats
  • โ˜๏ธ Cloud & Server: Supports both Atlassian Cloud and self-hosted instances

Installation

pip install python-atlassian-cli

Quick Start

1. Configure credentials

atlassian-cli config set

You'll be prompted for:

2. Or use environment variables

export ATLASSIAN_URL=https://mycompany.atlassian.net
export ATLASSIAN_USERNAME=user@example.com
export ATLASSIAN_API_TOKEN=your_api_token

3. Verify connection

atlassian-cli whoami

Jira Commands

Issues

# List issues (all / by project / assignee / status)
atlassian-cli jira issue list
atlassian-cli jira issue list --project MYPROJ
atlassian-cli jira issue list --assignee me
atlassian-cli jira issue list --status "In Progress"
atlassian-cli jira issue list --jql "project = MYPROJ AND sprint in openSprints()"

# Different output formats
atlassian-cli jira issue list --format table
atlassian-cli jira issue list --format json

# Get a specific issue
atlassian-cli jira issue get PROJ-123
atlassian-cli jira issue get PROJ-123 --format json

# Create an issue
atlassian-cli jira issue create --project PROJ --summary "Fix login bug" --type Bug --priority High
atlassian-cli jira issue create \
  --project PROJ \
  --summary "New feature" \
  --description "Detailed description here" \
  --type Story \
  --assignee alice@example.com \
  --labels backend --labels api

# Update an issue
atlassian-cli jira issue update PROJ-123 --summary "Updated title"
atlassian-cli jira issue update PROJ-123 --priority Highest --assignee bob@example.com

# Transition an issue
atlassian-cli jira issue transition PROJ-123 "In Progress"
atlassian-cli jira issue transition PROJ-123 Done

# Add a comment
atlassian-cli jira issue comment PROJ-123 "This is fixed in v2.1.0"

# Delete an issue (with confirmation)
atlassian-cli jira issue delete PROJ-123

Projects

# List all projects
atlassian-cli jira project list
atlassian-cli jira project list --format json

# Get project details
atlassian-cli jira project get MYPROJ

Sprints

# List sprints for a board
atlassian-cli jira sprint list 42
atlassian-cli jira sprint list 42 --state future
atlassian-cli jira sprint list 42 --state closed

Users

# Search for users
atlassian-cli jira user search "alice"
atlassian-cli jira user search "alice@example.com" --format json

Confluence Commands

Spaces

# List all spaces
atlassian-cli confluence space list
atlassian-cli confluence space list --limit 50

# Get space details
atlassian-cli confluence space get MYSPACE

# Create a new space
atlassian-cli confluence space create --key NEWSP --name "New Space" --description "Team workspace"

Pages

# List pages in a space
atlassian-cli confluence page list MYSPACE
atlassian-cli confluence page list MYSPACE --format table
atlassian-cli confluence page list MYSPACE --parent 12345  # child pages

# Get a page
atlassian-cli confluence page get 67890
atlassian-cli confluence page get 67890 --format json
atlassian-cli confluence page get 67890 --format body  # raw HTML body

# Create a page
atlassian-cli confluence page create --space MYSPACE --title "Meeting Notes" --body "<p>Notes here</p>"
atlassian-cli confluence page create --space MYSPACE --title "From File" --body-file content.html
atlassian-cli confluence page create --space MYSPACE --title "Subpage" --parent 12345

# Update a page
atlassian-cli confluence page update 67890 --title "Updated Title"
atlassian-cli confluence page update 67890 --body-file updated.html
atlassian-cli confluence page update 67890 --minor-edit

# Move a page
atlassian-cli confluence page move 67890 --parent 99999

# Delete a page (with confirmation)
atlassian-cli confluence page delete 67890

# Search pages with CQL
atlassian-cli confluence page search "deployment guide"
atlassian-cli confluence page search "API" --space TECH
atlassian-cli confluence page search "authentication" --format table

Attachments

# List attachments on a page
atlassian-cli confluence attachment list 67890

# Upload a file to a page
atlassian-cli confluence attachment upload 67890 ./diagram.png --comment "Architecture diagram"

Configuration

Config is stored at ~/.atlassian-cli/config.json with 600 permissions.

{
  "url": "https://mycompany.atlassian.net",
  "username": "user@example.com",
  "api_token": "your_api_token",
  "cloud": true
}

Environment variables take precedence over the config file:

Variable Description
ATLASSIAN_URL Atlassian instance URL
ATLASSIAN_USERNAME Your email address
ATLASSIAN_API_TOKEN Your API token
ATLASSIAN_CLOUD true (Cloud) or false (Server)

Show current config (token redacted):

atlassian-cli config show

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

# Lint
ruff check atlassian_cli/

# Format
black atlassian_cli/

# Type check
mypy atlassian_cli/

Project Structure

atlassian-cli/
โ”œโ”€โ”€ atlassian_cli/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ main.py              # CLI entry point & top-level commands
โ”‚   โ”œโ”€โ”€ config.py            # Config file & env var management
โ”‚   โ”œโ”€โ”€ commands/
โ”‚   โ”‚   โ”œโ”€โ”€ jira_commands.py      # All Jira subcommands
โ”‚   โ”‚   โ””โ”€โ”€ confluence_commands.py # All Confluence subcommands
โ”‚   โ””โ”€โ”€ utils/
โ”‚       โ”œโ”€โ”€ client.py        # Atlassian API client factory
โ”‚       โ””โ”€โ”€ formatter.py     # Output formatting helpers
โ”œโ”€โ”€ tests/
โ”‚   โ””โ”€โ”€ test_cli.py          # Full test suite
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ README.md

License

MIT

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

python_atlassian_cli-0.1.0.tar.gz (18.3 kB view details)

Uploaded Source

File details

Details for the file python_atlassian_cli-0.1.0.tar.gz.

File metadata

  • Download URL: python_atlassian_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for python_atlassian_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ffb7d98773d70fb6ab9a3c60f416bc93c87ef0a6cedd4880ade7a7e1a204d948
MD5 99e3f62badada09babbbe8f33b5fcc67
BLAKE2b-256 f79d7cf64c2d7a34d6ad2b150d37e78fd34190e108f851c9e481c99ec46f1c7b

See more details on using hashes here.

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