Skip to content
Merged
12 changes: 10 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ env:

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

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

steps:
- name: Checkout code
Expand Down Expand Up @@ -53,4 +55,10 @@ jobs:
with:
name: auditgen-windows
path: dist/auditgen.exe
retention-days: 30
retention-days: 30

- name: Create Github Release
uses: softprops/action-gh-release@v2
with:
files: dist/auditgen.exe
generate_release_notes: true
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"python-envs.defaultEnvManager": "ms-python.python:poetry",
"python-envs.defaultPackageManager": "ms-python.python:poetry"
}
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
### 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
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
2 changes: 1 addition & 1 deletion audigen_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,4 +270,4 @@ def generate(brd, ticket, start, end, user, complexity, priority, approver, outp
with open(log_path, "w") as f:
f.write(traceback.format_exc())
print(f"Crashed. Log saved to: {log_path}")
raise SystemExit(1)
raise SystemExit(1)
25 changes: 19 additions & 6 deletions audigen_cli/excelWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ def _get_base_path() -> Path:
return Path(sys._MEIPASS) # ← yes: use PyInstaller's temp folder
return Path(__file__).parent.parent # ← no: use normal project folder

def revisionHistoryChanges(wb, BRD_endDate,approver: str):
def revisionHistoryChanges(wb, BRD_startDate,approver: str):
revision_sheet = wb['Revision History']
revision_sheet['B8']=BRD_endDate
revision_sheet['D8']=BRD_endDate
revision_sheet['B8']=BRD_startDate
revision_sheet['D8']=BRD_startDate
revision_sheet['C8']=approver


Expand Down Expand Up @@ -59,6 +59,14 @@ def addTestCases(wb, llm_generateTestCase):
test_cases_sheet.column_dimensions['B'].width = 45
test_cases_sheet.column_dimensions['C'].width = 45

def updateTestResult(wb,end_date,user):
sheet = wb['Test Results - 1']
sheet['D5'].value = end_date
sheet['D7'].value = end_date

sheet['B5'].value=user
sheet['B7'].value=user

def updateImpactAnaylsis(
wb,
llm_generateTestCase,
Expand All @@ -85,6 +93,9 @@ def updateImpactAnaylsis(
# Prepared Date
sheet['E7'].value = BRD_startDate

# Allocated to
sheet['E10'].value = user

sheet['B10'].value = llm_generateTestCase.additional_info.componets_affected
#Estimated Effort
sheet['F10'].value = effort
Expand All @@ -95,7 +106,7 @@ def updateImpactAnaylsis(
# Actual Effort
sheet['I10'].value = effort
# assessed Date
sheet['E13'].value = BRD_endDate
sheet['E13'].value = BRD_startDate


def updateCodeCheckList(wb,llm_generateTestCase, BRD_endDate, user:str, approver:str):
Expand Down Expand Up @@ -146,18 +157,20 @@ def startExcelChange(
)

# 2 testcase xl
revisionHistoryChanges(test_case_xlsx,BRD_endDate,approver)
revisionHistoryChanges(test_case_xlsx,BRD_startDate,approver)

addTestCases(test_case_xlsx,llm_generateTestCase)

updateTestResult(test_case_xlsx,BRD_endDate,user)

# 3 codeCheckList
updateCodeCheckList(code_checkList_xlsx,llm_generateTestCase, BRD_endDate,user, approver)

#save
test_case_xlsx.calculation.fullCalcOnLoad = True

impact_analysis_xlsx.save(out / f'{ticket}-Impact Analysis Template.xlsx')
test_case_xlsx.save(out / f'{ticket}-sampleCases.xlsx')
test_case_xlsx.save(out / f'{ticket}-Test Cases.xlsx')
code_checkList_xlsx.save(out / f'{ticket}-Code Checklist.xlsx')


Expand Down