@gogd-core/ggd
v0.1.9
Published
GoGoodDev workspace CLI
Readme
@gogd-core/ggd
GoGoodDev workspace CLI — a unified command-line tool for environment management, git workflows, and Jenkins CI integration.
Install
npm install -g @gogd-core/ggdShell tab-completion is auto-installed on npm install -g (bash, zsh, powershell).
Requirements
- Node.js 20+
Commands
ggd env — Environment Management
ggd env use <name> # Switch to a named environmentggd run — Execute Shell Commands
ggd run <command...> # Run any shell command via cross-platform executorggd rsh — Git Reset Hard (Safe)
Reset current branch to origin/<branch> with safety checks.
ggd rshShows current branch name and uncommitted change count before prompting for confirmation. Prevents accidental data loss.
ggd mt — Merge Tool
Merge current branch into a target branch with automatic branch management.
ggd mt <target-branch>Switches to the target branch (re-creates from origin if it exists locally), then merges the source branch with confirmation.
ggd jenkins — Jenkins CI Integration
Trigger and monitor Jenkins builds from the terminal.
Setup
# Interactive setup (manual entry)
ggd jenkins setup
# Setup with a team preset file (recommended)
ggd jenkins setup --preset <path-to-preset.json>Saves config to ~/.ggd/jenkins.json. Re-running setup preserves existing values.
Build
# List available build targets
ggd jenkins build
# Trigger a build with defaults
ggd jenkins build <target>
# Override parameters
ggd jenkins build <target> --KEY=value --KEY2=value2
# Trigger without watching (detached mode)
ggd jenkins build <target> --detachThe build command will:
- Trigger the Jenkins job via REST API (with CSRF crumb support)
- Poll the queue until the build starts
- Stream console output (last 5 lines) in real-time
- Send a desktop notification when done (Windows/macOS/Linux)
Use --help to see all targets with their default parameters:
ggd jenkins build --helpView Config
ggd jenkins config # Print current config as JSONggd completion — Shell Completion
Tab-completion is auto-installed globally. To manually output the script:
ggd completion # Auto-detect shell
ggd completion bash
ggd completion zsh
ggd completion powershellPreset Files
Teams can share Jenkins configuration via preset files. These are JSON files that define environments, job paths, and build targets:
{
"url": "http://jenkins.example.com",
"environments": {
"staging": {
"ui": "staging/job/frontend",
"api": "staging/job/api"
},
"production": {
"ui": "production/job/frontend",
"api": "production/job/api"
}
},
"targets": [
{
"name": "ui",
"displayName": "UI (Frontend)",
"jobPathKey": "ui",
"defaults": {
"COMMIT_HASH": "a-staging",
"SITE": "acc"
}
}
]
}Load with: ggd jenkins setup --preset <file>
Configuration
All config is stored at ~/.ggd/jenkins.json. No environment variables required.
License
Private
