colenio-jira-cli 0.1.2__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.
@@ -0,0 +1,32 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ jobs:
10
+ test-and-build:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout
14
+ uses: actions/checkout@v4
15
+
16
+ - name: Install uv
17
+ uses: astral-sh/setup-uv@v4
18
+
19
+ - name: Sync dependencies
20
+ run: uv sync --frozen --extra dev
21
+
22
+ - name: Run tests
23
+ run: uv run pytest -q
24
+
25
+ - name: Build package
26
+ run: uv build
27
+
28
+ - name: Upload dist artifacts
29
+ uses: actions/upload-artifact@v4
30
+ with:
31
+ name: dist
32
+ path: dist/*
@@ -0,0 +1,48 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Checkout
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Install uv
20
+ uses: astral-sh/setup-uv@v4
21
+
22
+ - name: Sync dependencies
23
+ run: uv sync --frozen --extra dev
24
+
25
+ - name: Run tests
26
+ run: uv run pytest -q
27
+
28
+ - name: Build package
29
+ run: uv build
30
+
31
+ - name: Upload dist artifacts
32
+ uses: actions/upload-artifact@v4
33
+ with:
34
+ name: dist
35
+ path: dist/*
36
+
37
+ publish-pypi:
38
+ needs: build
39
+ runs-on: ubuntu-latest
40
+ steps:
41
+ - name: Download dist artifacts
42
+ uses: actions/download-artifact@v4
43
+ with:
44
+ name: dist
45
+ path: dist
46
+
47
+ - name: Publish to PyPI
48
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,47 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ develop-eggs/
9
+ dist/
10
+ downloads/
11
+ eggs/
12
+ .eggs/
13
+ lib/
14
+ lib64/
15
+ parts/
16
+ sdist/
17
+ var/
18
+ wheels/
19
+ *.egg-info/
20
+ .installed.cfg
21
+ *.egg
22
+
23
+ # Virtual environments
24
+ .venv
25
+ venv/
26
+ ENV/
27
+
28
+ # IDE
29
+ .vscode/
30
+ .idea/
31
+ *.swp
32
+ *.swo
33
+ *~
34
+ .DS_Store
35
+
36
+ # Testing
37
+ .pytest_cache/
38
+ .coverage
39
+ htmlcov/
40
+
41
+ # Environment
42
+ .env
43
+ local.env
44
+ .env.local
45
+
46
+ # Jira CLI
47
+ *.jira
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Colenio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,184 @@
1
+ Metadata-Version: 2.4
2
+ Name: colenio-jira-cli
3
+ Version: 0.1.2
4
+ Summary: Modular Jira CLI tool for issue listing, filtering, and management
5
+ Author-email: Colenio <dev@colenio.com>
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Requires-Python: >=3.11
9
+ Requires-Dist: click>=8.1.0
10
+ Requires-Dist: jira>=3.8.0
11
+ Requires-Dist: pydantic>=2.0.0
12
+ Requires-Dist: python-dotenv>=1.0.0
13
+ Requires-Dist: rich>=13.0.0
14
+ Requires-Dist: tabulate>=0.9.0
15
+ Provides-Extra: dev
16
+ Requires-Dist: black>=24.0.0; extra == 'dev'
17
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
18
+ Requires-Dist: ruff>=0.2.0; extra == 'dev'
19
+ Description-Content-Type: text/markdown
20
+
21
+ # Jira CLI
22
+
23
+ > Modular, class-based Jira command-line tool for issue listing, searching, and management.
24
+
25
+ ## Features
26
+
27
+ - **List issues** by project with optional filtering (status, assignee, labels)
28
+ - **Search** with custom JQL queries
29
+ - **Find** issues by text in summary/description
30
+ - **View** issue details with comments
31
+ - **Assign** issues to users
32
+ - **Transition** issues to new status
33
+ - **Multiple output formats**: table, JSON, CSV, Markdown
34
+ - **dotenv support**: Load credentials from `.env` or `local.env` in CWD or parent directories
35
+
36
+ ## Installation
37
+
38
+ ### Via uv (local development)
39
+
40
+ ```bash
41
+ cd colenio/tools/jira-cli
42
+ uv sync
43
+ uv run jira-cli list --help
44
+ ```
45
+
46
+ ### Via uvx (remote/published)
47
+
48
+ ```bash
49
+ uvx colenio-jira-cli list --project PROJ
50
+ ```
51
+
52
+ ## Setup
53
+
54
+ Create a `.env` or `local.env` file in your working directory:
55
+
56
+ ```bash
57
+ # Required
58
+ JIRA_URL=https://company.atlassian.net
59
+ JIRA_EMAIL=user@example.com
60
+ JIRA_API_TOKEN=your_api_token_here
61
+
62
+ # Optional
63
+ JIRA_PROJECT=PROJ # Default project for list/find
64
+ JIRA_PROJECT_KEY=PROJ # Backward-compatible fallback
65
+ ```
66
+
67
+ ### Getting your Jira API Token
68
+
69
+ 1. Log in to your Jira Cloud instance
70
+ 2. Go to Account Settings → Security
71
+ 3. Click "Create API Token"
72
+ 4. Copy the token and save to `.env`
73
+
74
+ ## Usage
75
+
76
+ ### List issues
77
+
78
+ ```bash
79
+ # Basic listing
80
+ jira-cli list --project PROJ
81
+
82
+ # With filters
83
+ jira-cli list --project PROJ --status "In Progress" --assignee "john@example.com"
84
+
85
+ # With custom JQL
86
+ jira-cli list --project PROJ --jql 'priority = High'
87
+
88
+ # Different output formats
89
+ jira-cli list --project PROJ --format json
90
+ jira-cli list --project PROJ --format csv > issues.csv
91
+ jira-cli list --project PROJ --format md
92
+ ```
93
+
94
+ ### Search with JQL
95
+
96
+ ```bash
97
+ jira-cli search 'project = PROJ AND status = "To Do" AND assignee is EMPTY'
98
+ jira-cli search 'text ~ "urgent"' --format json
99
+ ```
100
+
101
+ ### Find by text
102
+
103
+ ```bash
104
+ jira-cli find --project PROJ "database migration"
105
+ jira-cli find --project PROJ "performance issue" --max-results 100
106
+ ```
107
+
108
+ ### View issue details
109
+
110
+ ```bash
111
+ jira-cli view PROJ-123
112
+ jira-cli view PROJ-456 --comments
113
+ ```
114
+
115
+ ### Assign issue
116
+
117
+ ```bash
118
+ jira-cli assign PROJ-789 john@example.com
119
+ ```
120
+
121
+ ### Transition issue
122
+
123
+ ```bash
124
+ jira-cli transition PROJ-999 "In Progress" --comment "Starting work"
125
+ jira-cli transition PROJ-999 "Done"
126
+ ```
127
+
128
+ ## Architecture
129
+
130
+ - **`client.py`**: `JiraClient` class for REST API calls, auth, and endpoints
131
+ - **`query.py`**: `JiraQuery` class for JQL building and search logic
132
+ - **`render.py`**: `JiraRenderer` class for output formatting (table, JSON, CSV, Markdown)
133
+ - **`models.py`**: Pydantic models for Jira structures (`JiraIssue`, `JiraSearchResult`, `IssueRow`)
134
+ - **`dotenv.py`**: `DotEnv` class for robust `.env`/`local.env` loading
135
+ - **`cli.py`**: Click CLI commands (list, search, find, view, assign, transition)
136
+
137
+ All code uses proper classes, no helper functions. Follows informix-migration patterns.
138
+
139
+ ## Development
140
+
141
+ ```bash
142
+ # Install dev dependencies
143
+ uv sync --all-groups
144
+
145
+ # Run tests
146
+ uv run pytest
147
+
148
+ # Format and lint
149
+ uv run black jira_cli
150
+ uv run ruff check jira_cli
151
+ ```
152
+
153
+ ## Distribution
154
+
155
+ This tool is designed for publishing via uvx (like `helmrelease-verifier`):
156
+
157
+ 1. Push to GitHub at `colenio/jira-cli`
158
+ 2. Configure PyPI Trusted Publisher for this repository
159
+ 3. Tag with version: `git tag v0.1.0` and push tag (`git push origin v0.1.0`)
160
+ 4. GitHub Action `.github/workflows/release.yml` builds, tests, and publishes to PyPI
161
+ 5. Package can be invoked anywhere with: `uvx colenio-jira-cli list --project PROJ`
162
+
163
+ ## PowerShell Integration
164
+
165
+ Add to `$PROFILE` (e.g., via dotfiles/aliases.ps1):
166
+
167
+ ```powershell
168
+ function jira-cli {
169
+ uvx colenio-jira-cli @args
170
+ }
171
+
172
+ # Or use directly
173
+ alias jira = 'uvx colenio-jira-cli'
174
+ ```
175
+
176
+ Then:
177
+
178
+ ```powershell
179
+ jira list --project PROJ
180
+ ```
181
+
182
+ ## License
183
+
184
+ MIT
@@ -0,0 +1,164 @@
1
+ # Jira CLI
2
+
3
+ > Modular, class-based Jira command-line tool for issue listing, searching, and management.
4
+
5
+ ## Features
6
+
7
+ - **List issues** by project with optional filtering (status, assignee, labels)
8
+ - **Search** with custom JQL queries
9
+ - **Find** issues by text in summary/description
10
+ - **View** issue details with comments
11
+ - **Assign** issues to users
12
+ - **Transition** issues to new status
13
+ - **Multiple output formats**: table, JSON, CSV, Markdown
14
+ - **dotenv support**: Load credentials from `.env` or `local.env` in CWD or parent directories
15
+
16
+ ## Installation
17
+
18
+ ### Via uv (local development)
19
+
20
+ ```bash
21
+ cd colenio/tools/jira-cli
22
+ uv sync
23
+ uv run jira-cli list --help
24
+ ```
25
+
26
+ ### Via uvx (remote/published)
27
+
28
+ ```bash
29
+ uvx colenio-jira-cli list --project PROJ
30
+ ```
31
+
32
+ ## Setup
33
+
34
+ Create a `.env` or `local.env` file in your working directory:
35
+
36
+ ```bash
37
+ # Required
38
+ JIRA_URL=https://company.atlassian.net
39
+ JIRA_EMAIL=user@example.com
40
+ JIRA_API_TOKEN=your_api_token_here
41
+
42
+ # Optional
43
+ JIRA_PROJECT=PROJ # Default project for list/find
44
+ JIRA_PROJECT_KEY=PROJ # Backward-compatible fallback
45
+ ```
46
+
47
+ ### Getting your Jira API Token
48
+
49
+ 1. Log in to your Jira Cloud instance
50
+ 2. Go to Account Settings → Security
51
+ 3. Click "Create API Token"
52
+ 4. Copy the token and save to `.env`
53
+
54
+ ## Usage
55
+
56
+ ### List issues
57
+
58
+ ```bash
59
+ # Basic listing
60
+ jira-cli list --project PROJ
61
+
62
+ # With filters
63
+ jira-cli list --project PROJ --status "In Progress" --assignee "john@example.com"
64
+
65
+ # With custom JQL
66
+ jira-cli list --project PROJ --jql 'priority = High'
67
+
68
+ # Different output formats
69
+ jira-cli list --project PROJ --format json
70
+ jira-cli list --project PROJ --format csv > issues.csv
71
+ jira-cli list --project PROJ --format md
72
+ ```
73
+
74
+ ### Search with JQL
75
+
76
+ ```bash
77
+ jira-cli search 'project = PROJ AND status = "To Do" AND assignee is EMPTY'
78
+ jira-cli search 'text ~ "urgent"' --format json
79
+ ```
80
+
81
+ ### Find by text
82
+
83
+ ```bash
84
+ jira-cli find --project PROJ "database migration"
85
+ jira-cli find --project PROJ "performance issue" --max-results 100
86
+ ```
87
+
88
+ ### View issue details
89
+
90
+ ```bash
91
+ jira-cli view PROJ-123
92
+ jira-cli view PROJ-456 --comments
93
+ ```
94
+
95
+ ### Assign issue
96
+
97
+ ```bash
98
+ jira-cli assign PROJ-789 john@example.com
99
+ ```
100
+
101
+ ### Transition issue
102
+
103
+ ```bash
104
+ jira-cli transition PROJ-999 "In Progress" --comment "Starting work"
105
+ jira-cli transition PROJ-999 "Done"
106
+ ```
107
+
108
+ ## Architecture
109
+
110
+ - **`client.py`**: `JiraClient` class for REST API calls, auth, and endpoints
111
+ - **`query.py`**: `JiraQuery` class for JQL building and search logic
112
+ - **`render.py`**: `JiraRenderer` class for output formatting (table, JSON, CSV, Markdown)
113
+ - **`models.py`**: Pydantic models for Jira structures (`JiraIssue`, `JiraSearchResult`, `IssueRow`)
114
+ - **`dotenv.py`**: `DotEnv` class for robust `.env`/`local.env` loading
115
+ - **`cli.py`**: Click CLI commands (list, search, find, view, assign, transition)
116
+
117
+ All code uses proper classes, no helper functions. Follows informix-migration patterns.
118
+
119
+ ## Development
120
+
121
+ ```bash
122
+ # Install dev dependencies
123
+ uv sync --all-groups
124
+
125
+ # Run tests
126
+ uv run pytest
127
+
128
+ # Format and lint
129
+ uv run black jira_cli
130
+ uv run ruff check jira_cli
131
+ ```
132
+
133
+ ## Distribution
134
+
135
+ This tool is designed for publishing via uvx (like `helmrelease-verifier`):
136
+
137
+ 1. Push to GitHub at `colenio/jira-cli`
138
+ 2. Configure PyPI Trusted Publisher for this repository
139
+ 3. Tag with version: `git tag v0.1.0` and push tag (`git push origin v0.1.0`)
140
+ 4. GitHub Action `.github/workflows/release.yml` builds, tests, and publishes to PyPI
141
+ 5. Package can be invoked anywhere with: `uvx colenio-jira-cli list --project PROJ`
142
+
143
+ ## PowerShell Integration
144
+
145
+ Add to `$PROFILE` (e.g., via dotfiles/aliases.ps1):
146
+
147
+ ```powershell
148
+ function jira-cli {
149
+ uvx colenio-jira-cli @args
150
+ }
151
+
152
+ # Or use directly
153
+ alias jira = 'uvx colenio-jira-cli'
154
+ ```
155
+
156
+ Then:
157
+
158
+ ```powershell
159
+ jira list --project PROJ
160
+ ```
161
+
162
+ ## License
163
+
164
+ MIT
@@ -0,0 +1,4 @@
1
+ """Jira CLI — modular command-line interface for Jira issue management."""
2
+
3
+ __version__ = "0.1.2"
4
+ __author__ = "Colenio"