atlassian-cli 0.5.8__tar.gz → 0.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {atlassian_cli-0.5.8/src/atlassian_cli.egg-info → atlassian_cli-0.6.0}/PKG-INFO +39 -3
  2. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/README.md +38 -2
  3. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/pyproject.toml +1 -1
  4. atlassian_cli-0.6.0/src/atlassian_cli/__init__.py +7 -0
  5. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/src/atlassian_cli/config.py +30 -8
  6. atlassian_cli-0.6.0/src/atlassian_cli/confluence.py +986 -0
  7. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/src/atlassian_cli/http.py +3 -1
  8. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/src/atlassian_cli/jira.py +17 -4
  9. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/src/atlassian_cli/jira_assets.py +19 -1
  10. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/src/atlassian_cli/jira_issues.py +31 -3
  11. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/src/atlassian_cli/output.py +3 -0
  12. atlassian_cli-0.6.0/src/atlassian_cli/update_check.py +77 -0
  13. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0/src/atlassian_cli.egg-info}/PKG-INFO +39 -3
  14. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/src/atlassian_cli.egg-info/SOURCES.txt +1 -0
  15. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/tests/test_config.py +39 -0
  16. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/tests/test_confluence.py +148 -0
  17. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/tests/test_jira_assets.py +5 -2
  18. atlassian_cli-0.5.8/src/atlassian_cli/__init__.py +0 -3
  19. atlassian_cli-0.5.8/src/atlassian_cli/confluence.py +0 -504
  20. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/LICENSE +0 -0
  21. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/setup.cfg +0 -0
  22. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/src/atlassian_cli/adf.py +0 -0
  23. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/src/atlassian_cli/hints.py +0 -0
  24. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/src/atlassian_cli.egg-info/dependency_links.txt +0 -0
  25. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/src/atlassian_cli.egg-info/entry_points.txt +0 -0
  26. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/src/atlassian_cli.egg-info/requires.txt +0 -0
  27. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/src/atlassian_cli.egg-info/top_level.txt +0 -0
  28. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/tests/test_adf.py +0 -0
  29. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/tests/test_http.py +0 -0
  30. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/tests/test_jira_issues.py +0 -0
  31. {atlassian_cli-0.5.8 → atlassian_cli-0.6.0}/tests/test_output.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atlassian-cli
3
- Version: 0.5.8
3
+ Version: 0.6.0
4
4
  Summary: Fast CLI tools for Atlassian Cloud (Confluence + Jira) — optimized for AI agents
5
5
  Author-email: Alex Fishlock <alex.fishlock@catapult.cx>
6
6
  License-Expression: MIT
@@ -61,17 +61,29 @@ pip install git+https://github.com/catapultcx/atlassian-cli.git
61
61
 
62
62
  ## Setup
63
63
 
64
- Create a `.env` file (or export environment variables):
64
+ Create a config file with your credentials:
65
65
 
66
66
  ```bash
67
+ mkdir -p ~/.config/atlassian-cli
68
+ cat > ~/.config/atlassian-cli/config <<EOF
67
69
  ATLASSIAN_URL=https://your-site.atlassian.net
68
70
  ATLASSIAN_EMAIL=you@example.com
69
71
  ATLASSIAN_TOKEN=your-api-token
72
+ EOF
73
+ chmod 600 ~/.config/atlassian-cli/config
70
74
  ```
71
75
 
76
+ The CLI looks for credentials in this order (first match wins):
77
+
78
+ 1. `$ATLASSIAN_CLI_CONFIG` (explicit path override)
79
+ 2. `./.env` in the current working directory
80
+ 3. `$XDG_CONFIG_HOME/atlassian-cli/config` (defaults to `~/.config/atlassian-cli/config`)
81
+ 4. `~/.atlassian-cli/config`
82
+ 5. Environment variables (`ATLASSIAN_URL`, `ATLASSIAN_EMAIL`, `ATLASSIAN_TOKEN`)
83
+
72
84
  Get your API token at https://id.atlassian.com/manage-profile/security/api-tokens
73
85
 
74
- > Legacy `CONFLUENCE_URL` / `CONFLUENCE_EMAIL` / `CONFLUENCE_TOKEN` env vars are also supported.
86
+ > Legacy `CONFLUENCE_URL` / `CONFLUENCE_EMAIL` / `CONFLUENCE_TOKEN` are also supported.
75
87
 
76
88
  ## Confluence CLI
77
89
 
@@ -115,6 +127,30 @@ pages/
115
127
  page-index.json # searchable index
116
128
  ```
117
129
 
130
+ ### Comments
131
+
132
+ Read, reply to, and resolve inline and footer comments on pages.
133
+
134
+ ```bash
135
+ # List all comments on a page
136
+ confluence comments 9268920323
137
+
138
+ # List only open/unresolved comments
139
+ confluence comments 9268920323 --open
140
+
141
+ # Reply to an inline comment
142
+ confluence comment 10226663432 "Fixed — updated the wording"
143
+
144
+ # Reply to a footer comment
145
+ confluence comment 10226663432 "Noted, will action" --footer
146
+
147
+ # Resolve an inline comment
148
+ confluence resolve 10226663432
149
+
150
+ # Reopen a resolved comment
151
+ confluence resolve 10226663432 --reopen
152
+ ```
153
+
118
154
  ## Jira CLI
119
155
 
120
156
  ### Issues
@@ -30,17 +30,29 @@ pip install git+https://github.com/catapultcx/atlassian-cli.git
30
30
 
31
31
  ## Setup
32
32
 
33
- Create a `.env` file (or export environment variables):
33
+ Create a config file with your credentials:
34
34
 
35
35
  ```bash
36
+ mkdir -p ~/.config/atlassian-cli
37
+ cat > ~/.config/atlassian-cli/config <<EOF
36
38
  ATLASSIAN_URL=https://your-site.atlassian.net
37
39
  ATLASSIAN_EMAIL=you@example.com
38
40
  ATLASSIAN_TOKEN=your-api-token
41
+ EOF
42
+ chmod 600 ~/.config/atlassian-cli/config
39
43
  ```
40
44
 
45
+ The CLI looks for credentials in this order (first match wins):
46
+
47
+ 1. `$ATLASSIAN_CLI_CONFIG` (explicit path override)
48
+ 2. `./.env` in the current working directory
49
+ 3. `$XDG_CONFIG_HOME/atlassian-cli/config` (defaults to `~/.config/atlassian-cli/config`)
50
+ 4. `~/.atlassian-cli/config`
51
+ 5. Environment variables (`ATLASSIAN_URL`, `ATLASSIAN_EMAIL`, `ATLASSIAN_TOKEN`)
52
+
41
53
  Get your API token at https://id.atlassian.com/manage-profile/security/api-tokens
42
54
 
43
- > Legacy `CONFLUENCE_URL` / `CONFLUENCE_EMAIL` / `CONFLUENCE_TOKEN` env vars are also supported.
55
+ > Legacy `CONFLUENCE_URL` / `CONFLUENCE_EMAIL` / `CONFLUENCE_TOKEN` are also supported.
44
56
 
45
57
  ## Confluence CLI
46
58
 
@@ -84,6 +96,30 @@ pages/
84
96
  page-index.json # searchable index
85
97
  ```
86
98
 
99
+ ### Comments
100
+
101
+ Read, reply to, and resolve inline and footer comments on pages.
102
+
103
+ ```bash
104
+ # List all comments on a page
105
+ confluence comments 9268920323
106
+
107
+ # List only open/unresolved comments
108
+ confluence comments 9268920323 --open
109
+
110
+ # Reply to an inline comment
111
+ confluence comment 10226663432 "Fixed — updated the wording"
112
+
113
+ # Reply to a footer comment
114
+ confluence comment 10226663432 "Noted, will action" --footer
115
+
116
+ # Resolve an inline comment
117
+ confluence resolve 10226663432
118
+
119
+ # Reopen a resolved comment
120
+ confluence resolve 10226663432 --reopen
121
+ ```
122
+
87
123
  ## Jira CLI
88
124
 
89
125
  ### Issues
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "atlassian-cli"
7
- version = "0.5.8"
7
+ version = "0.6.0"
8
8
  description = "Fast CLI tools for Atlassian Cloud (Confluence + Jira) — optimized for AI agents"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -0,0 +1,7 @@
1
+ """Atlassian Cloud CLI tools for Confluence and Jira."""
2
+
3
+ try:
4
+ from importlib.metadata import version
5
+ __version__ = version('atlassian-cli')
6
+ except Exception:
7
+ __version__ = '0.0.0-dev'
@@ -7,17 +7,39 @@ import requests
7
7
  from requests.auth import HTTPBasicAuth
8
8
 
9
9
 
10
- def load_env(path=None):
11
- """Manually parse a .env file into a dict, skipping comments and blank lines."""
12
- if path is None:
13
- paths = [os.path.join(os.getcwd(), '.env'), os.path.join(os.path.dirname(__file__), '.env')]
14
- else:
15
- paths = [path]
10
+ def _config_search_paths():
11
+ """Return ordered list of paths to look for a .env / config file.
12
+
13
+ Search order (first match wins):
14
+ 1. ATLASSIAN_CLI_CONFIG env var (explicit override)
15
+ 2. ./.env in the current working directory
16
+ 3. $XDG_CONFIG_HOME/atlassian-cli/config (XDG default ~/.config/...)
17
+ 4. ~/.atlassian-cli/config (legacy/dotfile location)
18
+ 5. <package_dir>/.env (last-ditch fallback for editable installs)
19
+ """
20
+ paths = []
21
+ override = os.environ.get('ATLASSIAN_CLI_CONFIG')
22
+ if override:
23
+ paths.append(override)
24
+ paths.append(os.path.join(os.getcwd(), '.env'))
25
+ xdg = os.environ.get('XDG_CONFIG_HOME') or os.path.expanduser('~/.config')
26
+ paths.append(os.path.join(xdg, 'atlassian-cli', 'config'))
27
+ paths.append(os.path.expanduser('~/.atlassian-cli/config'))
28
+ paths.append(os.path.join(os.path.dirname(__file__), '.env'))
29
+ return paths
16
30
 
31
+
32
+ def load_env(path=None):
33
+ """Parse a .env-style file into a dict, skipping comments and blank lines."""
34
+ paths = [path] if path else _config_search_paths()
17
35
  for env_path in paths:
18
- if os.path.exists(env_path):
36
+ if env_path and os.path.exists(env_path):
19
37
  with open(env_path, 'r') as file:
20
- return dict(line.strip().split('=', 1) for line in file if not line.startswith('#') and '=' in line)
38
+ return dict(
39
+ line.strip().split('=', 1)
40
+ for line in file
41
+ if not line.startswith('#') and '=' in line
42
+ )
21
43
  return {}
22
44
 
23
45