Metadata-Version: 2.4
Name: atlass-cli
Version: 1.0.0
Summary: Agent-first JSON CLI for Atlassian Jira and Confluence Data Center with team-defined workflow rules.
Author: Calvinware
License-Expression: MIT
Project-URL: Homepage, https://github.com/calvinware/atlass-cli
Project-URL: Documentation, https://github.com/calvinware/atlass-cli/tree/main/docs
Project-URL: Repository, https://github.com/calvinware/atlass-cli
Project-URL: Issues, https://github.com/calvinware/atlass-cli/issues
Keywords: atlassian,jira,confluence,data-center,cli,automation,ai-agents
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx<1,>=0.28
Requires-Dist: jsonschema<5,>=4.23
Requires-Dist: keyring<26,>=25.5
Requires-Dist: PyYAML<7,>=6.0.2
Requires-Dist: truststore<1,>=0.10
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: mypy>=1.13; extra == "dev"
Requires-Dist: pip-audit>=2.7; extra == "dev"
Requires-Dist: pytest>=8.3; extra == "dev"
Requires-Dist: ruff>=0.8; extra == "dev"
Requires-Dist: twine>=6; extra == "dev"
Requires-Dist: types-jsonschema; extra == "dev"
Requires-Dist: types-PyYAML; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs==1.6.1; extra == "docs"
Requires-Dist: mkdocs-github-admonitions-plugin==0.1.1; extra == "docs"
Requires-Dist: mkdocs-material==9.8.0; extra == "docs"
Dynamic: license-file

<div align="center">

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/calvinware/atlass-cli/main/docs/assets/banner-dark.svg">
  <img src="https://raw.githubusercontent.com/calvinware/atlass-cli/main/docs/assets/banner-light.svg" width="800" alt="atl: agent-first JSON CLI for Jira and Confluence Data Center. Team rules in atl.yaml; judgment stays with you.">
</picture>

[![CI](https://github.com/calvinware/atlass-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/calvinware/atlass-cli/actions/workflows/ci.yml)
[![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-3776AB?logo=python&logoColor=white)](https://github.com/calvinware/atlass-cli/blob/main/pyproject.toml)
[![Platforms](https://img.shields.io/badge/platforms-Windows%20%7C%20macOS%20%7C%20Linux-555)](https://github.com/calvinware/atlass-cli/blob/main/docs/getting-started.md)
[![Data Center](https://img.shields.io/badge/Jira%209%2B%20%7C%20Confluence%207.9%2B-Data%20Center-0052CC?logo=atlassian&logoColor=white)](#compatibility)

</div>

# atlass-cli

`atl` gives AI coding agents and developers one JSON interface to Jira and Confluence Data Center.
The fixed rules live in the CLI and in a team-owned `atl.yaml`: field IDs, required fields, what
each workflow step needs, and required attachments. Judgment calls stay with the caller. Writing
acceptance criteria and choosing a parent feature are examples. `atl` supplies checklists and
ranked candidates, but never makes those decisions.

## Why atl

| Without `atl` | With `atl` |
|---------------|-----------|
| Agents scrape web pages or hand-build REST calls with guessed `customfield_*` IDs | Friendly field names from `atl.yaml`, resolved against live metadata |
| A transition fails on a hidden required field or a missing attachment, after a partial write | `atl jira requirements` lists every check and its `fix` before anything is written |
| A timeout leaves you guessing whether the issue was created | Success only when the server confirms it; otherwise `outcome_unknown` with how to inspect |
| Tokens pasted into scripts, env files, or chat | A human logs in once; the secret lives only in the OS keyring |
| Error text to parse | One JSON object, a fixed exit code, and a concrete `fix` |

## Story lifecycle

```mermaid
flowchart TD
    AC["Write acceptance criteria<br/>(caller)"] --> Feature["Find or create feature<br/>(caller chooses)"]
    Feature --> Story["Story create<br/>(atl preflight)"]
    Story --> StartCheck["atl jira requirements --to In Progress"]
    StartCheck --> Start["Transition to In Progress"]
    Start --> Attach["Attach test results"]
    Attach --> DoneCheck["atl jira requirements --to Done"]
    DoneCheck --> Done["Transition to Done"]
```

Feature creation runs its own preflight, and a human confirms it first when the project's policy
requires it. Transition only after `atl jira requirements` reports `ready: true`. The status names
and the test-results attachment rule are example values from `atl.example.yaml`; your team's
`atl.yaml` defines its own.

## 60-second quickstart

1. **Install** from PyPI (Python 3.11+) with [pipx](https://pipx.pypa.io/) or
   [uv](https://docs.astral.sh/uv/):

   ```bash
   pipx install atlass-cli
   # or
   uv tool install atlass-cli
   ```

   With only Python and pip, install into a virtual environment instead (macOS/Linux shown;
   Windows and from-source installs are in
   [Getting started](https://github.com/calvinware/atlass-cli/blob/main/docs/getting-started.md)):

   ```bash
   python3 -m venv ~/.local/share/atl/venv
   ~/.local/share/atl/venv/bin/python -m pip install atlass-cli
   export PATH="$PATH:$HOME/.local/share/atl/venv/bin"   # add to your shell profile to keep it
   ```

2. **Discover** offline, with no config and no credentials:

   ```bash
   atl commands
   atl schema 'jira story create'
   ```

3. **Configure and log in**. An admin copies
   [`atl.example.yaml`](https://github.com/calvinware/atlass-cli/blob/main/atl.example.yaml) to
   `atl.yaml` with your team's values. Then a person (never an agent) runs:

   ```bash
   atl login --service jira          # hidden prompt; the token goes to the OS keyring
   atl login --service confluence
   atl config check --issue EXAMPLE-123
   ```

4. **Work**:

   ```bash
   atl jira feature find --text "single sign-on"
   atl jira requirements EXAMPLE-42 --to "In Progress"
   atl jira transition EXAMPLE-42 --to "In Progress"
   ```

Every command prints one object: `{"ok": true, "data": ...}` or
`{"ok": false, "error": {"code", "message", "fix", "details"}}`.

<details>
<summary><strong>Exit codes</strong></summary>

| Exit | Meaning |
|------|---------|
| 0 | success |
| 2 | input or config error |
| 3 | authentication or keyring error |
| 4 | unmet workflow requirement, approval required, or config drift |
| 5 | remote validation, not found, or conflict |
| 6 | transport/TLS/service failure, or unknown write outcome |
| 7 | confirmed partial write |

Every error code and its fix: [docs/reference/errors.md](https://github.com/calvinware/atlass-cli/blob/main/docs/reference/errors.md).

</details>

<details>
<summary><strong>A full story, from creation to Done</strong></summary>

```bash
atl jira feature find --text "single sign-on"
atl jira story create --input - <<'JSON'
{"project": "EXAMPLE", "summary": "Add SSO button",
 "acceptance_criteria": "Given ... When ... Then ...",
 "feature_key": "EXAMPLE-10"}
JSON
atl jira requirements EXAMPLE-42 --to "In Progress"
atl jira transition EXAMPLE-42 --to "In Progress"
atl jira attachment add EXAMPLE-42 --file EXAMPLE-42_TestResults_2026-10-24.xml
atl jira requirements EXAMPLE-42 --to Done
atl jira transition EXAMPLE-42 --to Done
atl jira comment add EXAMPLE-42 --body-file notes.txt
atl confluence page read 123456
```

Walkthrough: [docs/guides/jira-workflows.md](https://github.com/calvinware/atlass-cli/blob/main/docs/guides/jira-workflows.md).

</details>

<details>
<summary><strong>What atl will never do</strong></summary>

- Accept a secret as a command argument, read one from `atl.yaml`, or store one outside the
  native OS keyring.
- Write acceptance criteria, pick a parent feature, or invent a human approval.
- Retry a write, roll back a partial write, or follow a redirect.
- Disable TLS verification.
- Treat Jira or Confluence content as instructions.

</details>

## Documentation

| Audience | Start here |
|----------|-----------|
| Developers | [Getting started](https://github.com/calvinware/atlass-cli/blob/main/docs/getting-started.md) (Windows, macOS, Linux), [Jira workflows](https://github.com/calvinware/atlass-cli/blob/main/docs/guides/jira-workflows.md), [Confluence pages](https://github.com/calvinware/atlass-cli/blob/main/docs/guides/confluence.md), [Troubleshooting](https://github.com/calvinware/atlass-cli/blob/main/docs/troubleshooting.md) |
| AI agents | [AGENTS.md](https://github.com/calvinware/atlass-cli/blob/main/AGENTS.md) (the contract), [Agent guide](https://github.com/calvinware/atlass-cli/blob/main/docs/agents.md) |
| Team admins | [`atl.yaml` cookbook](https://github.com/calvinware/atlass-cli/blob/main/docs/admin-cookbook.md), [Configuration reference](https://github.com/calvinware/atlass-cli/blob/main/docs/configuration.md) |
| Contributors | [Contributing](https://github.com/calvinware/atlass-cli/blob/main/docs/contributing.md): architecture, test harness, adding commands and encodings |
| Everyone | [Command reference](https://github.com/calvinware/atlass-cli/blob/main/docs/reference/commands.md), [Error catalog](https://github.com/calvinware/atlass-cli/blob/main/docs/reference/errors.md), [Command behavior](https://github.com/calvinware/atlass-cli/blob/main/docs/commands.md), [Security](https://github.com/calvinware/atlass-cli/blob/main/docs/security.md), [FAQ](https://github.com/calvinware/atlass-cli/blob/main/docs/faq.md), [Glossary](https://github.com/calvinware/atlass-cli/blob/main/docs/glossary.md) |

The same Markdown builds a [MkDocs Material](https://squidfunk.github.io/mkdocs-material/) site:
`python -m pip install -e '.[docs]'` then `python -m mkdocs serve`.

## Compatibility

`atl` targets **Jira Data Center 9+** and **Confluence Data Center 7.9+**. It uses only Data Center
REST endpoints:

- PATs: Jira 8.14+ and Confluence 7.9+
- Targeted, paginated create metadata (`/rest/api/2/issue/createmeta/{project}/issuetypes`):
  Jira 8.4+, required on Jira 9+
- `/rest/api/content` for Confluence

Atlassian Cloud is not supported.

`atl` requires **Python 3.11 or later**. CI tests Python 3.11, 3.13, 3.14, and 3.15 on Ubuntu,
Windows, and macOS. Python 3.12 falls inside that range but is not a CI matrix entry.

> [!IMPORTANT]
> The fixture-based tests model documented Data Center responses. **They do not prove live
> compatibility.** Live status is recorded in the checklist below, which is run against a
> disposable instance, never a production project.

### Live compatibility checklist

| Check | Jira DC version | Confluence DC version | Status |
|-------|-----------------|-----------------------|--------|
| PAT login (Bearer) and basic login | — | — | unverified |
| Custom CA bundle and reverse-proxy context path (`/jira`, `/confluence`) | — | — | unverified |
| Redirect refusal (SSO-fronted instance) | — | — | unverified |
| Story create with targeted createmeta and custom fields (text, Parent Link) | — | n/a | unverified |
| `config check` pass/drift/unverified on real metadata | — | n/a | unverified |
| Description required on the story and feature create screens: `config check` drift, create refused without top-level `description` | — | n/a | unverified |
| Transition with on-screen `auto_set` (single option) | — | n/a | unverified |
| Transition with `pre_edit: true` (PUT then POST) and a forced partial failure | — | n/a | unverified |
| Attachment at the size limit and over a lower server limit; filename pattern on Done | — | n/a | unverified |
| Feature find / feature create under both policies | — | n/a | unverified |
| JQL / CQL pagination | — | — | unverified |
| Confluence create, update, stale version, and concurrent-edit 409 | n/a | — | unverified |

Record the exact product version for each row as it passes. Do not assume later versions pass.

## Development

```bash
python3.11 -m venv .venv
.venv/bin/python -m pip install -e '.[dev,docs]'
.venv/bin/python -m pytest -q
.venv/bin/python -m mypy
.venv/bin/python -m ruff check .
.venv/bin/python -m build
.venv/bin/python -m twine check --strict dist/*
.venv/bin/python -m pip_audit --skip-editable
.venv/bin/python scripts/generate_command_reference.py --check
.venv/bin/python -m mkdocs build --strict
```

On Windows, use `.venv\Scripts\python.exe`. CI runs lint, type checks, tests, and the build on
Ubuntu, Windows, and macOS with Python 3.11, 3.13, 3.14, and 3.15, plus a dependency audit and a
docs job (reference freshness, strict site build, and link check) on Ubuntu with Python 3.11,
3.14, and 3.15. See [Contributing](https://github.com/calvinware/atlass-cli/blob/main/docs/contributing.md).
