diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 946365f..d285cb5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -53,4 +55,10 @@ jobs: with: name: auditgen-windows path: dist/auditgen.exe - retention-days: 30 \ No newline at end of file + retention-days: 30 + + - name: Create Github Release + uses: softprops/action-gh-release@v2 + with: + files: dist/auditgen.exe + generate_release_notes: true diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6a742d9 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "python-envs.defaultEnvManager": "ms-python.python:poetry", + "python-envs.defaultPackageManager": "ms-python.python:poetry" +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..3f6d85e --- /dev/null +++ b/CHANGELOG.md @@ -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 \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e0dc400 --- /dev/null +++ b/README.md @@ -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 \ No newline at end of file diff --git a/audigen_cli/cli.py b/audigen_cli/cli.py index c97a8c5..372d12b 100644 --- a/audigen_cli/cli.py +++ b/audigen_cli/cli.py @@ -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) \ No newline at end of file + raise SystemExit(1)