Run GitHub Actions CI/CD checks locally before pushing to GitHub β a VS Code extension powered by
act.
| Feature | Description | |
|---|---|---|
| π | Workflow Detection | Auto-discovers .github/workflows/*.yml with live YAML validation |
| β‘ | Local Act Runner | Runs full workflows, individual jobs, or specific events via act |
| π | Pre-Push Hook | Automatically blocks pushes when CI fails |
| β | Pre-Commit Hook | Runs lint + tests before every commit |
| π | Status Bar | Live CI status: Idle / Running / Passing / Failing |
| π² | Workflow Sidebar | Browse and run workflows, jobs, and steps visually |
| π³ | Docker & act Check | Validates dependencies, shows guided install instructions |
| β | Error Highlighting | Inline YAML diagnostics in the editor |
| π | Multi-Language | Go, Python, Node.js, and generic project support |
act requires Docker to spin up containers that simulate GitHub Actions runners.
| Platform | Command |
|---|---|
| macOS | brew install --cask docker |
| Ubuntu/Debian | sudo apt-get install docker.io && sudo systemctl start docker |
| Windows | Docker Desktop |
| Platform | Command |
|---|---|
| macOS | brew install act |
| Linux | curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash |
| Windows | choco install act-cli or scoop install act |
Search for LocalCI Guard in the VS Code Extensions panel, or:
code --install-extension localci-guard.localci-guard# 1 β Clone
git clone https://github.com/souvik03-136/localci-guard.git
cd localci-guard
# 2 β Install dependencies & compile
npm install && npm run compile
# 3 β Package
npm run package
# β dist/localci-guard-1.0.0.vsix
# 4 β Install in VS Code
code --install-extension dist/localci-guard-1.0.0.vsixnpm install
# Press F5 in VS Code β Extension Development Host opensOpen the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
| Command | Description |
|---|---|
LocalCI Guard: Run Local CI |
Run CI with the default event |
LocalCI Guard: Run Workflow |
Pick a workflow and run it |
LocalCI Guard: Run Job |
Run a specific job from the sidebar |
LocalCI Guard: Install Git Hooks |
Install pre-push and pre-commit hooks |
LocalCI Guard: Open CI Logs |
Show the output panel |
LocalCI Guard: Check Dependencies |
Verify Docker and act are installed |
LocalCI Guard: Stop Running CI |
Cancel active run |
LocalCI Guard: Refresh Workflows |
Reload the sidebar tree |
Add these to your .vscode/settings.json or VS Code global settings:
The pre-commit hook auto-detects your project language and runs appropriate checks:
| Language | Detected By | Lint | Tests |
|---|---|---|---|
| Go | go.mod |
golangci-lint / go vet |
go test ./... -short |
| Python | requirements.txt / pyproject.toml |
flake8 |
pytest -q |
| Node.js | package.json |
eslint / npm run lint |
npm test |
| Generic | fallback | workflow only | workflow only |
src/
βββ extension.ts entry point β wires all services together
βββ commands/
β βββ runCI.ts Run CI / workflow / job commands
β βββ installHooks.ts git hook install/uninstall
βββ services/
β βββ actRunner.ts spawns act, streams logs, owns CIStatus
β βββ workflowParser.ts parses YAML, validates, emits diagnostics
β βββ gitHookManager.ts writes pre-push/pre-commit scripts
β βββ dockerChecker.ts checks docker + act, shows install guide
βββ ui/
β βββ statusBar.ts bottom-bar status indicator
β βββ workflowTreeView.ts sidebar tree provider
βββ utils/
βββ logger.ts output channel wrapper
βββ shell.ts safe spawn/execFile + sanitisation
- All shell commands use
spawn/execFilewithshell: falseβ no injection possible - User arguments pass through
sanitizeArg()(strips metacharacters) before use - Path traversal prevented by
validatePath()checks - Existing git hooks are backed up before overwriting
- No credentials or tokens are ever written to logs
- Nothing executes without explicit user action
Go to your repo β Settings β Secrets and variables β Actions and add:
| Secret | Value |
|---|---|
VSCE_PAT |
Your VS Code Marketplace Personal Access Token |
OVSX_TOKEN |
Your Open VSX token (optional) |
Create a GitHub Actions environment named marketplace.
# Automated (recommended)
./scripts/release.sh patch # bumps 1.0.0 β 1.0.1, commits, tags, pushes
# Manual
npm version patch
git add package.json CHANGELOG.md
git commit -m "chore: release v1.0.1"
git tag v1.0.1
git push origin main --tagsgit push tag
β
βΌ
GitHub Actions: release.yml
βββ lint & type-check
βββ build (TypeScript compile)
βββ test (unit tests)
βββ docker (build + push image to GHCR)
βββ package (build .vsix)
βββ release (create GitHub Release, attach .vsix)
βββ publish-marketplace (VS Code Marketplace + Open VSX)
See CONTRIBUTING.md for development setup, coding standards, and PR process.
See CHANGELOG.md.
See SECURITY.md to report vulnerabilities privately.
MIT Β© LocalCI Guard Contributors
{ // Automatically run CI checks when workflow files are saved "localci.autoRunOnSave": false, // Run CI checks before git push (requires git hooks) "localci.runOnPush": true, // Enable pre-commit quality checks "localci.enablePreCommit": true, // Default GitHub Actions event to simulate "localci.defaultEvent": "push", // "push" | "pull_request" | "workflow_dispatch" // Path to the 'act' binary (default: "act") "localci.actPath": "act", // Path to the Docker binary (default: "docker") "localci.dockerPath": "docker", // Timeout in seconds for CI runs "localci.timeout": 300, // Enable verbose logging "localci.verbose": false }