psforge-cli
v1.0.1
Published
PSForge CLI Companion — PowerShell intelligence in your terminal
Downloads
210
Readme
PSForge CLI Companion
PowerShell intelligence in your terminal. Diagnose errors, analyse logs, validate scripts, and generate PowerShell remediations — without opening a browser.
psforge diagnose 0xc1900200
psforge analyze-log C:\logs\WindowsUpdate.log
psforge explain "Get-ADUser -Filter {Enabled -eq $true} | Disable-ADAccount"
psforge validate fix-update.ps1Installation
Windows (recommended)
- Download
psforge.exefrom the GitHub Releases page - Move it to any directory on your PATH (e.g.
C:\Tools) - Open a terminal and run:
psforge loginBuild from source
Requires Node.js 18+ and pnpm.
pnpm install
pnpm run build
# Build standalone .exe (Windows)
pnpm run pkg:win
# Build for all platforms
pnpm run pkg:allAuthentication
Generate an API key from your PSForge account settings, then:
psforge loginTo check your account:
psforge whoamiTo log out:
psforge logoutCommands
| Command | Tier | Description |
|---|---|---|
| psforge login | Free | Authenticate with your API key |
| psforge logout | Free | Remove stored credentials |
| psforge whoami | Free | Show account details |
| psforge scripts list | Free | List your saved scripts |
| psforge scripts get <id> | Free | View a saved script |
| psforge validate <file> | Free | Validate PowerShell syntax |
| psforge diagnose <error> | Pro | AI-powered error diagnosis |
| psforge analyze-log <file> | Pro | Analyse log files |
| psforge fix <issue> | Pro | Diagnose + interactive fix menu |
| psforge explain <input> | Pro | Explain scripts/errors in plain English |
Pro Commands (requires $5/month subscription)
diagnose
Diagnose a Windows error code or message with AI:
psforge diagnose 0xc1900200
psforge diagnose "DISM error 0x800f081f"
psforge diagnose "Authentication unsuccessful" --context "Exchange 2019"
psforge d 0x80070005 --copy # copies PowerShell script to clipboardanalyze-log
Analyse a log file and get PowerShell remediations:
psforge analyze-log C:\logs\WindowsUpdate.log
psforge al C:\logs\setup.log --platform "Windows Update"
psforge analyze-log app.log --json # raw JSON outputSupports: .log, .txt, .json, .xml, .csv
fix
Diagnose an issue and get an interactive fix menu:
psforge fix "windows update stuck"
psforge fix sccm-client
psforge f "exchange mail flow"After diagnosis, choose to: copy script, save to library, run now, or exit.
explain
Explain any PowerShell script, error, or log excerpt:
psforge explain script.ps1
psforge explain "Get-ADUser -Filter {Enabled -eq $true} | Disable-ADAccount"
psforge explain error.log
psforge explain "0x80070005"Free Commands
scripts
psforge scripts list
psforge scripts list --favorites
psforge scripts list --search "winsxs"
psforge scripts get <script-id>validate
psforge validate fix-update.ps1
psforge validate script.ps1 --comprehensive # advanced validation (requires login)
psforge validate script.ps1 --jsonGlobal Options
--api-url <url> Override the PSForge API URL (useful for testing)
--json Output raw JSON (available on most commands)Environment Variables
| Variable | Description |
|---|---|
| PSFORGE_API_URL | Override the API URL (highest priority after --api-url) |
Configuration
Credentials are stored in ~/.psforge/config.json:
{
"apiKey": "psf_...",
"apiUrl": "https://psforge.io",
"userEmail": "[email protected]",
"userName": "Jane Smith",
"role": "subscriber"
}URL Resolution Order
--api-urlflagPSFORGE_API_URLenvironment variableapiUrlin~/.psforge/config.json- Hardcoded production URL (
https://psforge.io)
Local Testing
psforge --api-url http://localhost:5000 diagnose 0xc1900200
PSFORGE_API_URL=http://localhost:5000 psforge diagnose 0xc1900200