jira-report-tui 1.0.1

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,80 @@
1
+ name: Build and Test
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, develop ]
6
+ pull_request:
7
+ branches: [ main, develop ]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Set up Go
18
+ uses: actions/setup-go@v5
19
+ with:
20
+ go-version: '1.21'
21
+ cache-dependency-path: go-tui/go.sum
22
+
23
+ - name: Download dependencies
24
+ working-directory: ./go-tui
25
+ run: go mod download
26
+
27
+ - name: Build for Linux
28
+ working-directory: ./go-tui
29
+ run: go build -o bin/jira-report ./cmd/jira-report
30
+
31
+ - name: Verify binary
32
+ working-directory: ./go-tui
33
+ run: ./bin/jira-report --help
34
+
35
+ - name: Build all platforms
36
+ working-directory: ./go-tui
37
+ run: |
38
+ chmod +x build-all.sh
39
+ ./build-all.sh
40
+
41
+ - name: Upload artifacts
42
+ uses: actions/upload-artifact@v4
43
+ with:
44
+ name: jira-report-binaries
45
+ path: go-tui/bin/jira-report-*
46
+ retention-days: 7
47
+
48
+ test-npm-package:
49
+ runs-on: ubuntu-latest
50
+ needs: build
51
+
52
+ steps:
53
+ - name: Checkout code
54
+ uses: actions/checkout@v4
55
+
56
+ - name: Set up Go
57
+ uses: actions/setup-go@v5
58
+ with:
59
+ go-version: '1.21'
60
+ cache-dependency-path: go-tui/go.sum
61
+
62
+ - name: Set up Node.js
63
+ uses: actions/setup-node@v4
64
+ with:
65
+ node-version: '18'
66
+
67
+ - name: Build binaries
68
+ working-directory: ./go-tui
69
+ run: |
70
+ chmod +x build-all.sh
71
+ ./build-all.sh
72
+
73
+ - name: Test npm package
74
+ working-directory: ./go-tui
75
+ run: |
76
+ npm pack
77
+ mkdir -p /tmp/test-install
78
+ cd /tmp/test-install
79
+ npm install $GITHUB_WORKSPACE/go-tui/jira-report-tui-*.tgz
80
+ npx jira-report --help
@@ -0,0 +1,71 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*.*.*'
7
+ workflow_dispatch:
8
+ inputs:
9
+ version:
10
+ description: 'Version to publish (e.g., 1.0.0)'
11
+ required: true
12
+ type: string
13
+
14
+ jobs:
15
+ build-and-publish:
16
+ runs-on: ubuntu-latest
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Set up Go
23
+ uses: actions/setup-go@v5
24
+ with:
25
+ go-version: '1.21'
26
+ cache-dependency-path: go-tui/go.sum
27
+
28
+ - name: Set up Node.js
29
+ uses: actions/setup-node@v4
30
+ with:
31
+ node-version: '18'
32
+ registry-url: 'https://registry.npmjs.org'
33
+
34
+ - name: Build binaries for all platforms
35
+ working-directory: ./go-tui
36
+ run: |
37
+ chmod +x build-all.sh
38
+ ./build-all.sh
39
+
40
+ - name: Update version in package.json
41
+ if: github.event_name == 'workflow_dispatch'
42
+ working-directory: ./go-tui
43
+ run: |
44
+ npm version ${{ github.event.inputs.version }} --no-git-tag-version
45
+
46
+ - name: Extract version from tag
47
+ if: github.event_name == 'push'
48
+ id: extract_version
49
+ run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
50
+
51
+ - name: Update version from tag
52
+ if: github.event_name == 'push'
53
+ working-directory: ./go-tui
54
+ run: |
55
+ npm version ${{ steps.extract_version.outputs.VERSION }} --no-git-tag-version
56
+
57
+ - name: Publish to npm
58
+ working-directory: ./go-tui
59
+ run: npm publish --access public
60
+ env:
61
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
62
+
63
+ - name: Create GitHub Release
64
+ if: github.event_name == 'push'
65
+ uses: softprops/action-gh-release@v1
66
+ with:
67
+ generate_release_notes: true
68
+ files: |
69
+ go-tui/bin/jira-report-*
70
+ env:
71
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thuan Vo
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.
package/README.md ADDED
@@ -0,0 +1,169 @@
1
+ # Jira Daily Report - Go TUI
2
+
3
+ Fast, performant terminal interface for managing Jira tasks and logging time to Tempo.
4
+
5
+ **🚀 20x faster than the TypeScript version!**
6
+
7
+ ---
8
+
9
+ ## Quick Start
10
+
11
+ ### 1. Build
12
+ ```bash
13
+ cd go-tui
14
+ go build -o bin/jira-report ./cmd/jira-report
15
+ ```
16
+
17
+ ### 2. Configure
18
+
19
+ **Option A: Interactive Setup (Recommended)**
20
+ ```bash
21
+ ./bin/jira-report config init
22
+ ```
23
+
24
+ **Option B: Environment Variables**
25
+ ```bash
26
+ export JIRA_SERVER="https://your-domain.atlassian.net"
27
+ export JIRA_EMAIL="your-email@example.com"
28
+ export JIRA_API_TOKEN="your-api-token"
29
+ export TEMPO_API_TOKEN="your-tempo-token"
30
+ export JIRA_ACCOUNT_ID="your-account-id"
31
+
32
+ ./bin/jira-report tui
33
+ ```
34
+
35
+ **Option C: Manual Config File**
36
+ Create `~/.jira-daily-report.json` manually (see Configuration File section)
37
+
38
+ ### 3. Run
39
+ ```bash
40
+ ./bin/jira-report tui
41
+ ```
42
+
43
+ ---
44
+
45
+ ## Commands
46
+
47
+ ### `jira-report tui`
48
+ Launch the interactive TUI
49
+
50
+ ### `jira-report config init`
51
+ Initialize configuration interactively
52
+
53
+ **Example:**
54
+ ```bash
55
+ $ ./bin/jira-report config init
56
+
57
+ 🔧 Jira Daily Report - Configuration Setup
58
+ ==========================================
59
+
60
+ Jira Server URL: https://your-domain.atlassian.net
61
+ Jira Email/Username: you@example.com
62
+ Jira API Token (hidden): ****
63
+ Tempo API Token (hidden): ****
64
+ Jira Account ID: 1234567890abcdef
65
+ Theme (default: dark): dark
66
+
67
+ ✅ Config saved to: /home/user/.jira-daily-report.json
68
+
69
+ 🚀 You can now run: jira-report tui
70
+ ```
71
+
72
+ ### `jira-report config show`
73
+ Display current configuration (tokens masked)
74
+
75
+ **Example:**
76
+ ```bash
77
+ $ ./bin/jira-report config show
78
+
79
+ 📋 Current Configuration
80
+ =======================
81
+ Jira Server: https://your-domain.atlassian.net
82
+ Username: you@example.com
83
+ API Token: abc****xyz
84
+ Tempo Token: xyz****abc
85
+ Account ID: 1234567890abcdef
86
+ Theme: dark
87
+
88
+ Location: /home/user/.jira-daily-report.json
89
+ ```
90
+
91
+ ---
92
+
93
+ ## Keyboard Shortcuts
94
+
95
+ | Key | Action |
96
+ |-----|--------|
97
+ | `j` / `↓` | Move down |
98
+ | `k` / `↑` | Move up |
99
+ | `h` / `←` | Previous panel |
100
+ | `l` / `→` | Next panel |
101
+ | `1` | Today panel |
102
+ | `2` | Todo panel |
103
+ | `3` | Testing panel |
104
+ | `4` | Time Tracking panel |
105
+ | `q` / `Ctrl+C` | Quit |
106
+
107
+ ---
108
+
109
+ ## Features
110
+
111
+ ✅ **Fast Navigation** - Instant response (<10ms)
112
+ ✅ **Real Data** - Fetches from Jira & Tempo APIs
113
+ ✅ **Concurrent Loading** - Parallel data fetching
114
+ ✅ **Worklog Enrichment** - Shows task details with time logged
115
+ ✅ **Dark Theme** - Beautiful terminal UI
116
+ ✅ **Single Binary** - No dependencies
117
+
118
+ ---
119
+
120
+ ## Configuration File
121
+
122
+ Location: `~/.jira-daily-report.json`
123
+
124
+ ```json
125
+ {
126
+ "jiraServer": "https://your-domain.atlassian.net",
127
+ "username": "you@example.com",
128
+ "apiToken": "your-jira-api-token",
129
+ "tempoApiToken": "your-tempo-api-token",
130
+ "whoAmI": "your-account-id",
131
+ "autoClipboard": false,
132
+ "theme": "dark"
133
+ }
134
+ ```
135
+
136
+ **Security**: File permissions are set to `0600` (owner read/write only)
137
+
138
+ ---
139
+
140
+ ## Install
141
+
142
+ ### Option 1: Build from source
143
+ ```bash
144
+ cd go-tui
145
+ go build -o bin/jira-report ./cmd/jira-report
146
+ cp bin/jira-report /usr/local/bin/
147
+ ```
148
+
149
+ ### Option 2: Use directly
150
+ ```bash
151
+ cd go-tui
152
+ ./bin/jira-report tui
153
+ ```
154
+
155
+ ---
156
+
157
+ ## Performance
158
+
159
+ | Metric | TypeScript | Go | Improvement |
160
+ |--------|-----------|-----|-------------|
161
+ | Startup | ~500ms | **~50ms** | **10x faster** |
162
+ | Navigation | ~200ms | **<10ms** | **20x faster** |
163
+ | Memory | ~100MB | **~20MB** | **5x less** |
164
+
165
+ ---
166
+
167
+ ## License
168
+
169
+ Same as main project
Binary file
Binary file
package/install.js ADDED
@@ -0,0 +1,98 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { execSync } = require('child_process');
4
+ const fs = require('fs');
5
+ const path = require('path');
6
+ const https = require('https');
7
+
8
+ const PACKAGE_VERSION = require('./package.json').version;
9
+ const BINARY_NAME = 'jira-report';
10
+
11
+ function getPlatform() {
12
+ const type = process.platform;
13
+ const arch = process.arch;
14
+
15
+ if (type === 'win32') {
16
+ return arch === 'x64' ? 'windows-amd64' : 'windows-arm64';
17
+ }
18
+ if (type === 'darwin') {
19
+ return arch === 'x64' ? 'darwin-amd64' : 'darwin-arm64';
20
+ }
21
+ if (type === 'linux') {
22
+ return arch === 'x64' ? 'linux-amd64' : 'linux-arm64';
23
+ }
24
+
25
+ console.error(`Unsupported platform: ${type} ${arch}`);
26
+ process.exit(1);
27
+ }
28
+
29
+ function getBinaryPath() {
30
+ const platform = getPlatform();
31
+ const binDir = path.join(__dirname, 'bin');
32
+ const ext = process.platform === 'win32' ? '.exe' : '';
33
+
34
+ // Check if platform-specific binary exists
35
+ const platformBinary = path.join(binDir, `${BINARY_NAME}-${platform}${ext}`);
36
+ if (fs.existsSync(platformBinary)) {
37
+ return platformBinary;
38
+ }
39
+
40
+ // Fallback to generic binary name
41
+ const genericBinary = path.join(binDir, `${BINARY_NAME}${ext}`);
42
+ if (fs.existsSync(genericBinary)) {
43
+ return genericBinary;
44
+ }
45
+
46
+ return null;
47
+ }
48
+
49
+ function makeExecutable(filePath) {
50
+ if (process.platform !== 'win32') {
51
+ try {
52
+ fs.chmodSync(filePath, 0o755);
53
+ } catch (err) {
54
+ console.error(`Failed to make binary executable: ${err.message}`);
55
+ }
56
+ }
57
+ }
58
+
59
+ function install() {
60
+ console.log(`Installing jira-report-tui v${PACKAGE_VERSION}...`);
61
+
62
+ const binaryPath = getBinaryPath();
63
+
64
+ if (!binaryPath) {
65
+ console.error(`No binary found for ${getPlatform()}`);
66
+ console.error('Please check the bin/ directory or file an issue.');
67
+ process.exit(1);
68
+ }
69
+
70
+ // Make binary executable
71
+ makeExecutable(binaryPath);
72
+
73
+ // Create symlink for cross-platform compatibility
74
+ const binDir = path.join(__dirname, 'bin');
75
+ const symlinkPath = path.join(binDir, BINARY_NAME);
76
+
77
+ if (binaryPath !== symlinkPath) {
78
+ try {
79
+ if (fs.existsSync(symlinkPath)) {
80
+ fs.unlinkSync(symlinkPath);
81
+ }
82
+ if (process.platform === 'win32') {
83
+ fs.copyFileSync(binaryPath, symlinkPath);
84
+ } else {
85
+ fs.symlinkSync(path.basename(binaryPath), symlinkPath);
86
+ }
87
+ } catch (err) {
88
+ // If symlink fails, just copy the file
89
+ fs.copyFileSync(binaryPath, symlinkPath);
90
+ makeExecutable(symlinkPath);
91
+ }
92
+ }
93
+
94
+ console.log(`✅ jira-report-tui installed successfully!`);
95
+ console.log(`Run 'jira-report tui' to start.`);
96
+ }
97
+
98
+ install();
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "jira-report-tui",
3
+ "version": "1.0.1",
4
+ "description": "Fast, performant terminal interface for managing Jira tasks and logging time to Tempo - 20x faster than TypeScript version",
5
+ "main": "index.js",
6
+ "bin": {
7
+ "jira-report": "bin/jira-report"
8
+ },
9
+ "scripts": {
10
+ "postinstall": "node install.js",
11
+ "build": "./build-all.sh",
12
+ "test": "echo \"Error: no test specified\" && exit 1"
13
+ },
14
+ "keywords": [
15
+ "jira",
16
+ "tempo",
17
+ "tui",
18
+ "terminal",
19
+ "cli",
20
+ "worklog",
21
+ "time-tracking",
22
+ "productivity",
23
+ "atlassian",
24
+ "task-management",
25
+ "go",
26
+ "golang"
27
+ ],
28
+ "author": "Thuan Vo <voxuanthuan280194@gmail.com>",
29
+ "license": "MIT",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/voxuanthuan/daily-report.git",
33
+ "directory": "go-tui"
34
+ },
35
+ "bugs": {
36
+ "url": "https://github.com/voxuanthuan/daily-report/issues"
37
+ },
38
+ "homepage": "https://github.com/voxuanthuan/daily-report/tree/main/go-tui#readme",
39
+ "engines": {
40
+ "node": ">=14.0.0"
41
+ },
42
+ "os": [
43
+ "linux"
44
+ ],
45
+ "cpu": [
46
+ "x64",
47
+ "arm64"
48
+ ]
49
+ }