Build a wrapper to integrate the GitLab CLI (glab) with the GDK
Problem Statement
Currently, developers working on the GitLab CLI (glab) need to manually configure authentication and specify the hostname when connecting to their local GDK instance. This involves multiple steps and environment variables that make the development workflow cumbersome.
The current process requires (example):
# authenticate
glab auth login --hostname "gdk.test:3443" --token "$GDK_GITLAB_TOKEN"
# execute a glab command
GITLAB_HOST=gdk.test:3443 glab duo ask list last 10 commit titles
Proposal
Implement a dedicated GDK command like gdk glab <glab command> that:
- Uses a dedicated configuration file that points to the local GDK instance
- Automatically includes auth token and hostname in the configuration
- Generates the auth token automatically for the root user via GDK
- Simplifies the development workflow by eliminating manual setup steps
Example Usage
# Instead of the current multi-step process
gdk glab duo ask list last 10 commit titles
gdk glab issue list
gdk glab mr create
Technical Implementation
- Create a GDK-specific
glabconfiguration file with:- Hostname:
gdk.test:3443(or configured GDK hostname) - Auth token: Auto-generated for root user
- Any other necessary local development settings
- Hostname:
- Implement a command like
gdk glabthat:- Uses the dedicated config file
- Passes through all
glabcommands and arguments - Handles configuration management automatically
Expected Outcome
-
Implement gdk glabcommand wrapper -
Create automatic configuration file generation -
Auto-generate and manage auth tokens for local development -
Update GDK documentation with usage examples -
Enable integration tests to run against local GDK data more easily
Additional Benefits
- Integration tests can be run with local data instead of requiring
gitlab.comtest projects - Improved developer experience for CLI feature development
- Consistent local development setup across different environments
Impacted categories
-
gdk-usability - Improves how developers interact with GDK for CLI development
Related Issues
- Original research issue: #3046 (closed)