Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build Windows EXE

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
Comment on lines +3 to +4
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check the Node.js compatibility of the GitHub Actions used in this workflow

echo "=== Checking Node.js compatibility for GitHub Actions ==="
echo ""
echo "Actions used in workflow:"
echo "- actions/checkout@v4"
echo "- actions/setup-python@v5"
echo "- actions/upload-artifact@v4"
echo "- softprops/action-gh-release@v2"
echo ""
echo "Checking if these actions support Node.js 24 by default..."

# Check each action's latest release/docs for Node.js compatibility
for action in "actions/checkout" "actions/setup-python" "actions/upload-artifact" "softprops/action-gh-release"; do
  echo ""
  echo "--- $action ---"
  gh api repos/$action/releases/latest --jq '.name, .published_at' 2>/dev/null || echo "Could not fetch release info"
done

Repository: ThiruNithish28/audiGen-cli

Length of output: 563


🌐 Web query:

Do GitHub Actions checkout@v4, setup-python@v5, upload-artifact@v4, and action-gh-release@v2 natively support Node.js 24?

💡 Result:

No, GitHub Actions checkout@v4, setup-python@v5, upload-artifact@v4, and action-gh-release@v2 do not natively support Node.js 24. They run on Node.js 20 by default and trigger deprecation warnings. Newer versions are required for native Node.js 24 support (e.g., checkout@v5+, setup-python@v6+, upload-artifact@v6+, action-gh-release@v3+).

Citations:


Update GitHub Actions to versions that natively support Node.js 24, or keep FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 as a compatibility measure.

The current actions (checkout@v4, setup-python@v5, upload-artifact@v4, action-gh-release@v2) do not natively support Node.js 24 and default to Node.js 20, triggering deprecation warnings. The FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 variable is necessary for your current setup.

For long-term maintenance, consider upgrading to action versions that natively support Node.js 24: checkout@v5+, setup-python@v6+, upload-artifact@v6+, action-gh-release@v3+. This would allow removing the environment variable.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build.yml around lines 3 - 4, The workflow currently sets
the compatibility env var FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 to force Node 24
for older actions; either keep that env var as-is for compatibility or upgrade
the referenced actions to versions that natively support Node.js 24 (replace
checkout@v4 → checkout@v5+, setup-python@v5 → setup-python@v6+,
upload-artifact@v4 → upload-artifact@v6+, action-gh-release@v2 →
action-gh-release@v3+) and then remove the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24
line; update the workflow action references accordingly and run the workflow to
confirm no deprecation warnings.


on:
push:
tags: ['v*']
workflow_dispatch:

jobs:
build:
runs-on: windows-latest
permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Poetry
run: pip install poetry

- name: Install dependencies
run: poetry install

- name: Build EXE
run: >
poetry run pyinstaller
--onefile
--name auditgen
--add-data "template;template"
--hidden-import audigen_cli.extractor
--hidden-import audigen_cli.llm_client
--hidden-import audigen_cli.excelWriter
--hidden-import audigen_cli.config
--hidden-import audigen_cli.banner
--hidden-import audigen_cli.utils
--collect-all google.genai
--collect-all docx
--collect-all openpyxl
--collect-all questionary
--collect-all rich
--collect-all pydantic
--collect-all PIL
audigen_cli/cli.py

- name: Upload EXE
uses: actions/upload-artifact@v4
with:
name: auditgen-windows
path: dist/auditgen.exe
retention-days: 30

- name: Create Github Release
uses: softprops/action-gh-release@v2
with:
files: dist/auditgen.exe
generate_release_notes: true
Comment on lines +60 to +64
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add condition to prevent release step failure on manual triggers.

The release creation step will run on both tag pushes and manual workflow_dispatch triggers. When triggered manually without a tag context, this step will likely fail or produce unexpected results.

🔧 Proposed fix to conditionally run release only on tags
       
       - name: Create Github Release
         uses: softprops/action-gh-release@v2
+        if: startsWith(github.ref, 'refs/tags/')
         with:
           files: dist/auditgen.exe
           generate_release_notes: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Create Github Release
uses: softprops/action-gh-release@v2
with:
files: dist/auditgen.exe
generate_release_notes: true
- name: Create Github Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/auditgen.exe
generate_release_notes: true
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build.yml around lines 60 - 64, The "Create Github
Release" step (uses: softprops/action-gh-release@v2) runs on manual
workflow_dispatch and tag pushes causing failures when no tag exists; add a
conditional like if: startsWith(github.ref, 'refs/tags/') to the step to ensure
the release action (files: dist/auditgen.exe, generate_release_notes: true) only
executes for tag-created workflows.

11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

## [v0.1.0] - 2025-04-26
Comment thread
ThiruNithish28 marked this conversation as resolved.
### Added
- Interactive dual-mode CLI (flags or questionary prompts)
- Config registry with `auditgen config setup`
- Generates Impact Analysis, Test Cases, Code Checklist from BRD
- Windows EXE via GitHub Actions
- Input validation with friendly error messages
- Path traversal protection on ticket ID
- Ctrl+C handling across all prompts
Comment thread
ThiruNithish28 marked this conversation as resolved.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# AudiGen CLI

Audit document generator CLI tool — generates Impact Analysis, Test Cases,
and Code Review Checklist from a BRD document using AI.

## Requirements
- Windows 10/11
- Gemini API key ([get one free here](https://aistudio.google.com/))

## Installation
1. Download `auditgen.exe` from [Releases](../../releases)
2. Place it in a folder e.g. `C:\Tools\auditgen\`
3. Add that folder to your Windows PATH
4. Open a new terminal and run `auditgen --help`

## First Time Setup
```cmd
auditgen config setup
```
Select all fields and enter your details when prompted.

## Usage
```cmd
# Interactive mode — prompts for everything
auditgen generate

# Direct mode — pass everything as flags
auditgen generate "path\to\brd.docx" TKT-001 -s 20-04-2025 -e 30-04-2025

# View your config
auditgen config show
```

## Output
Running `generate` produces three Excel files in your output folder:
- `TKT-001-Impact Analysis Template.xlsx`
- `TKT-001-Test Cases.xlsx`
- `TKT-001-Code Checklist.xlsx`

## Built With
- Python 3.12
- Click — CLI framework
- Google Gemini — test case generation
- openpyxl — Excel generation
- Rich + Questionary — terminal UI
Comment thread
ThiruNithish28 marked this conversation as resolved.
61 changes: 61 additions & 0 deletions audigen_cli/banner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
from rich.console import Console
from rich.text import Text
from rich.console import Console
from rich.panel import Panel
from rich.align import Align
Comment on lines +1 to +5
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove the duplicate Console import on Line 3.

from rich.console import Console appears on both line 1 and line 3.

🔧 Proposed fix
 from rich.console import Console
 from rich.text import Text
-from rich.console import Console
 from rich.panel import Panel
 from rich.align import Align
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
from rich.console import Console
from rich.text import Text
from rich.console import Console
from rich.panel import Panel
from rich.align import Align
from rich.console import Console
from rich.text import Text
from rich.panel import Panel
from rich.align import Align
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@audigen_cli/banner.py` around lines 1 - 5, The file imports Console twice;
remove the duplicate import statement so only a single "from rich.console import
Console" remains; edit audigen_cli/banner.py to delete the redundant Console
import (the duplicate line) and keep the other imports (Text, Panel, Align)
unchanged to avoid unused or duplicate import warnings.


console =Console()

VERSION = "0.1.0"

ASCII_ART = """\
█████╗ ██╗ ██╗██████╗ ██╗████████╗ ██████╗ ███████╗███╗ ██╗
██╔══██╗██║ ██║██╔══██╗██║╚══██╔══╝██╔════╝ ██╔════╝████╗ ██║
███████║██║ ██║██║ ██║██║ ██║ ██║ ███╗█████╗ ██╔██╗ ██║
██╔══██║██║ ██║██║ ██║██║ ██║ ██║ ██║██╔══╝ ██║╚██╗██║
██║ ██║╚██████╔╝██████╔╝██║ ██║ ╚██████╔╝███████╗██║ ╚████║
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝"""

def print_banner():
art= Text(ASCII_ART, style="bold cyan")
subtitle=Text(f"v{VERSION} | Audit Document Generator | by Thiru", style="dim white")
console.print()
console.print(art)
console.print(subtitle)
console.print()


def print_banner2():
# Brand line
title = Text()
title.append("AuditGen", style="bold #ff8c69")
title.append(f" v{VERSION}", style="bold white")

# Body
body = Text()
body.append("AI Audit Document Generator\n", style="bold white")
body.append("Generate test cases, review outputs, export Excel.\n", style="white")
body.append("\n")
body.append("/generate", style="bold #7aa2f7")
body.append(" Create audit documents from BRD\n", style="dim white")
body.append("/config", style="bold #7aa2f7")
body.append(" Manage API key, user, output folder\n", style="dim white")
body.append("/review", style="bold #7aa2f7")
body.append(" Inspect latest generated run\n", style="dim white")
body.append("/help", style="bold #7aa2f7")
body.append(" Show available commands", style="dim white")

panel = Panel(
Align.left(body),
title=title,
title_align="left",
border_style="#ff8c69",
padding=(1, 2),
expand=True,
)

console.print()
console.print(panel)
console.print("[dim]Ready. Type a command to continue.[/dim]")
console.print()

Loading