Docker-based GitHub Action for running iFlow CLI commands in workflows
View on GitHubA GitHub Action that enables you to run iFlow CLI commands within your GitHub workflows. This Docker-based action comes with Node.js 22, npm, and uv (ultra-fast Python package manager) pre-installed for optimal performance.
Pre-installed with Node.js 22, npm, and uv for optimal performance
Built with Go for fast, reliable execution
Support for iFlow API authentication with custom models and endpoints
Flexible command execution with configurable timeout (1-86400 seconds)
Works in any working directory with customizable paths
Rich execution reports in PR summaries with step summaries
Seamless integration with GitHub comments and PR reviews
Issue triage with iFLOW CLI:
name: 'π·οΈ iFLOW CLI Automated Issue Triage'
on:
issues:
types: ['opened', 'reopened']
issue_comment:
types: ['created']
jobs:
triage-issue:
runs-on: 'ubuntu-latest'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: 'Run iFlow CLI Issue Triage'
uses: iflow-ai/iflow-cli-action@v1.4.0
with:
api_key: ${{ secrets.IFLOW_API_KEY }}
timeout: "3600"
extra_args: "--debug"
prompt: |
## Role
You are an issue triage assistant. Analyze the current
GitHub issue and apply the most appropriate existing labels.
Use the available tools to gather information.
Input | Description | Required | Default |
---|---|---|---|
prompt |
The prompt to execute with iFlow CLI | β Yes | - |
api_key |
iFlow API key for authentication | β Yes | - |
settings_json |
Complete settings.json content (JSON string) | β No | - |
base_url |
Custom base URL for iFlow API | β No | https://apis.iflow.cn/v1 |
model |
Model name to use | β No | Qwen3-Coder |
timeout |
Timeout in seconds (1-86400) | β No | 86400 |
Output from iFlow CLI execution
Exit code from iFlow CLI execution
- name: Use analysis results
run: |
echo "Exit code: ${{ steps.analysis.outputs.exit_code }}"
echo "Results: ${{ steps.analysis.outputs.result }}"
IFLOW_API_KEY
The extra_args
input allows you to pass additional command-line arguments directly to the iFlow CLI:
- name: iFlow with Custom Arguments
uses: iflow-ai/iflow-cli-action@v1.4.0
with:
prompt: "Analyze this codebase with debug output"
api_key: ${{ secrets.IFLOW_API_KEY }}
extra_args: "--debug --max-tokens 3000"
Examples of Extra Arguments:
--debug
- Enable iFLOW CLI debug mode--max-tokens 3000
- Set maximum token limit--verbose
- Enable verbose outputThe precmd
input allows you to run shell commands before executing the iFlow CLI:
- name: iFlow with Pre-Execution Commands
uses: iflow-ai/iflow-cli-action@v1.4.0
with:
prompt: "Analyze this codebase after installing dependencies"
api_key: ${{ secrets.IFLOW_API_KEY }}
precmd: |
npm install
git fetch origin main
You can specify multiple commands by separating them with newlines:
precmd: |
npm ci
npm run build
echo "Environment ready"
For advanced users who need complete control over the iFlow configuration:
- name: Custom iFlow Configuration
uses: iflow-ai/iflow-cli-action@v1.4.0
with:
prompt: "Analyze this codebase with custom configuration"
api_key: ${{ secrets.IFLOW_API_KEY }}
settings_json: |
{
"theme": "Dark",
"selectedAuthType": "iflow",
"apiKey": "${{ secrets.IFLOW_API_KEY }}",
"baseUrl": "https://custom-api.example.com/v1",
"modelName": "custom-model",
"searchApiKey": "${{ secrets.SEARCH_API_KEY }}"
}
When settings_json
is provided, it takes precedence over individual configuration inputs. The api_key
input is still required for validation.
Specify custom versions of GitHub CLI and iFlow CLI:
- name: iFlow CLI with Custom Versions
uses: iflow-ai/iflow-cli-action@v1.4.0
with:
prompt: "Analyze this codebase with specific tool versions"
api_key: ${{ secrets.IFLOW_API_KEY }}
gh_version: "2.76.2"
iflow_version: "0.2.4"
Specify exact version for GitHub CLI compatibility
Use specific iFlow CLI versions with new features
MCP (Model Context Protocol) allows iFlow CLI to connect to external tools and services:
- name: iFlow CLI with MCP Server
uses: iflow-ai/iflow-cli-action@v1.4.0
with:
prompt: "use @deepwiki to search how to use Skynet to build a game"
api_key: ${{ secrets.IFLOW_API_KEY }}
settings_json: |
{
"selectedAuthType": "iflow",
"apiKey": "${{ secrets.IFLOW_API_KEY }}",
"baseUrl": "https://apis.iflow.cn/v1",
"modelName": "Qwen3-Coder",
"mcpServers": {
"deepwiki": {
"command": "npx",
"args": ["-y", "mcp-deepwiki@latest"]
}
}
}
Automated code review workflows for pull requests
Automatically generate technical documentation from codebase
Generate test cases and testing recommendations
Automatic issue triage, labeling, and feature implementation
Analyze code architecture and provide improvement suggestions
Increase the timeout
value for complex operations
timeout: "900" # 15 minutes
Verify your API key is correctly set in repository secrets
Ensure the path exists and checkout action is used
Enable verbose logging by setting environment variables:
env:
ACTIONS_STEP_DEBUG: true
Contributions are welcome! Please feel free to submit issues and pull requests.
Submit bug reports and feature requests on GitHub
Contribute code improvements and new features
Help improve documentation and examples
This project is licensed under the MIT License - see the LICENSE file for details.
Docs Site: https://iflow-ai.github.io/iflow-cli-action/
Start using iFlow CLI GitHub Action today!
Get StartedMade with β€οΈ by the iFlow AI team
For support, please visit our GitHub Issues