| name | gdk |
| description | Handle GitLab Development Kit updates, local secrets, and GDK branch workflows. Use for fgdku-based updates, setting up GitLab secrets, managing branch-specific GDK state, and other local GitLab development environment operations. |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"developers","author":"pedropombeiro","keywords":"gdk, gitlab-development-kit, update, secrets, environment","workflow":"gitlab"} |
GDK Skill
Shell functions for managing the GitLab Development Kit: full update orchestration,
switching to main branch cleanly, and setting up API tokens from 1Password.
All functions are zsh functions loaded from ~/.shellrc/zshrc.d/functions/.
Available Commands
fgdku
Comprehensive GDK update orchestrator. Performs the full update cycle:
- Restores
bin/rake, bin/rspec, bin/rails, bin/spring, db/structure.sql, package.json
- Prompts to reset if there are uncommitted changes
- Resets network adapter if network is unreachable
- Installs mise tools and ensures the
gdk gem is available
- Stops Spring, restarts PostgreSQL, runs
gdk update
- Reinstalls bundle and regenerates Spring binstubs
- Runs a simple rspec test to bring up Gitaly
- Runs pending ClickHouse migrations
- Rebases all local branches, then prunes those whose tip is reachable from master
- Switches back to the original branch
- Runs
gdk cleanup, truncates large logs, restarts GDK
- Enables db sandbox, regenerates schema if branch migrations exist
- Warms up Rails environment
run-in-tmux-pane fgdku
Reports progress via iTerm2 badges and Home Assistant webhooks.
Must be run via run-in-tmux-pane
since it is an autoloaded zsh function and is long-running/interactive.
Set the Bash tool timeout to at least 1800000 ms (30 min).
gswm
Switches to the main branch, restoring db/ and package.json first and
resetting the GDK sandbox if inside a GDK directory.
gswm
setup_gitlab_secrets
Fetches GITLAB_TOKEN, GITLAB_STAGING_TOKEN, and GITLAB_GDK_TOKEN from
1Password and exports them as environment variables.
setup_gitlab_secrets
Requires 1Password CLI (op) and a gitlab account configured.
Agent Guidelines
- Never update from remote manually — do not run
git pull, git fetch + git rebase, or gdk update directly in a GDK repo. Always use run-in-tmux-pane fgdku instead; it handles fetching, rebasing all branches, bundle install, migrations, GDK restart, and post-update cleanup in the correct order
fgdku is interactive and long-running — always run via run-in-tmux-pane fgdku; it prompts on uncommitted changes so do not run without user confirmation
- Use
gswm when the user wants to return to main branch cleanly (safer than plain git switch)
setup_gitlab_secrets requires biometric auth — cannot be run non-interactively
- GDK_ROOT must be set —
gswm and fgdku check $GDK_ROOT to determine if they're in a GDK directory