Use qckfx CLI in GitHub Actions workflows for automated code analysis, testing, and repository management
The qckfx CLI can be seamlessly integrated into GitHub Actions workflows to provide AI-powered code analysis, automated testing, documentation generation, and repository management. This enables powerful automation capabilities in your CI/CD pipeline.
name: AI Code Reviewon: pull_request: types: [opened, synchronize]jobs: ai-review: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 # Fetch full history for better context - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '18' - name: Run AI Code Review env: LLM_API_KEY: ${{ secrets.LLM_API_KEY }} run: | npx qckfx --quiet << 'EOF' Please review the changes in this pull request. Focus on: 1. Code quality and best practices 2. Potential bugs or security issues 3. Performance considerations 4. Documentation completeness Provide a summary of your findings and any recommendations. EOF
name: Update Documentationon: push: branches: [main] paths: ['src/**', 'lib/**']jobs: update-docs: runs-on: ubuntu-latest permissions: contents: write pull-requests: write steps: - uses: actions/checkout@v4 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Generate Documentation env: LLM_API_KEY: ${{ secrets.LLM_API_KEY }} run: | npx qckfx << 'EOF' Please update the documentation based on recent code changes: 1. Review the git diff since the last documentation update 2. Update README.md with any new features or API changes 3. Generate or update API documentation for modified functions 4. Ensure all examples are current and working 5. Update the changelog with a summary of changes EOF - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: title: "docs: automated documentation update" body: "Automated documentation update based on recent code changes" branch: docs/auto-update
The --quiet (or -q) flag is highly recommended for GitHub Actions and other CI/CD environments. It provides several benefits:
Clean Logs: Suppresses all output except the final response and errors
Better Performance: Reduces I/O overhead by eliminating progress indicators and verbose logging
Easier Parsing: Makes it simple to capture and process the AI’s response in scripts
Professional Output: Provides clean, focused results perfect for automated workflows
Always use --quiet in GitHub Actions workflows to keep your action logs clean and focused on the actual AI analysis results.
Copy
# ✅ Recommended for GitHub Actionsnpx qckfx --quiet "Analyze this pull request for security issues"# ❌ Not recommended for CI/CD (too verbose)npx qckfx "Analyze this pull request for security issues"
Be specific in your prompts to get focused, actionable results:
Copy
npx qckfx << 'EOF'Review only the files changed in this PR for:1. TypeScript type safety issues2. React component best practices3. Performance implicationsIgnore formatting and style issues.EOF
- name: Run Tests run: npm test- name: AI Test Analysis env: LLM_API_KEY: ${{ secrets.LLM_API_KEY }} run: | npx qckfx << 'EOF' Analyze the test results and suggest: 1. Additional test cases for better coverage 2. Improvements to existing tests 3. Performance optimizations for the test suite EOF- name: Deploy if Analysis Passes if: success() run: npm run deploy
Create reusable workflows for common analysis patterns:
Copy
# .github/workflows/reusable-ai-review.ymlname: Reusable AI Reviewon: workflow_call: inputs: focus-area: required: true type: string secrets: llm-api-key: required: truejobs: review: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: AI Review env: LLM_API_KEY: ${{ secrets.llm-api-key }} run: | npx qckfx << EOF Focus on ${{ inputs.focus-area }} in this codebase. Provide specific recommendations and examples. EOF
The qckfx CLI’s integration with GitHub Actions enables powerful automation capabilities that can significantly improve code quality, security, and development workflows. By leveraging AI-powered analysis in your CI/CD pipeline, you can catch issues early, maintain consistent code quality, and accelerate development cycles.