-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Description
Overview
Create a tool availability checker that enables graceful degradation when optional tools are missing.
Objective
Implement lib/platform/verify-tools.js to check availability and versions of development tools.
Tools to Check
- git
- gh (GitHub CLI)
- node
- npm
- pnpm
- yarn
- bun
- python
- pip
- poetry
- cargo
- rustc
- go
- docker
- railway (Railway CLI)
- vercel (Vercel CLI)
- netlify (Netlify CLI)
Implementation
Each check should:
- Try to run
command --version(or appropriate version flag) - Capture the version string
- Return
{ available: true, version: "x.y.z" }or{ available: false, version: null } - Handle errors gracefully (tool not found, not in PATH, etc.)
Output Format
{
"git": { "available": true, "version": "2.43.0" },
"gh": { "available": true, "version": "2.40.1" },
"node": { "available": true, "version": "v20.10.0" },
"railway": { "available": false, "version": null }
}Usage in Commands
Commands can check tool availability before using features:
const tools = JSON.parse(execSync('node lib/platform/verify-tools.js').toString());
if (!tools.gh.available) {
console.error('GitHub CLI required. Install: https://cli.github.com');
process.exit(1);
}
if (tools.railway.available) {
// Use Railway-specific features
} else {
// Skip Railway deployment validation
}Acceptance Criteria
- Checks all listed tools
- Returns structured JSON
- Handles missing tools gracefully
- Runs in <2 seconds
- Works cross-platform
Priority
HIGH - Required for commands to gracefully degrade.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels