From olm-team
Sets up OLM development repositories by forking and cloning upstream/downstream repos, configuring remotes, and providing educational context about the OLM ecosystem.
How this command is triggered — by the user, by Claude, or both
Slash command
/olm-team:dev-setup [target-directory]Files this command reads when invoked
The summary Claude sees in its command listing — used to decide when to auto-load this command
## Name olm-team:dev-setup ## Synopsis ## Description The `olm-team:dev-setup` command automates the onboarding process for new OLM team members by setting up all necessary development repositories. It forks repositories (if not already forked), clones them locally with proper remote configuration, and provides educational context about each repository to accelerate team onboarding. This command helps new developers understand the OLM ecosystem by explaining: - The difference between upstream (operator-framework) and downstream (openshift) organizations - The distinction between OLM v0 ...
olm-team:dev-setup
/olm-team:dev-setup [target-directory]
The olm-team:dev-setup command automates the onboarding process for new OLM team members by setting up all necessary development repositories. It forks repositories (if not already forked), clones them locally with proper remote configuration, and provides educational context about each repository to accelerate team onboarding.
This command helps new developers understand the OLM ecosystem by explaining:
Check for required tools and authentication:
Verify GitHub CLI is installed:
which gh
If not installed, provide installation instructions for the user's platform.
Verify GitHub CLI authentication:
gh auth status
If not authenticated, prompt user to run:
gh auth login
Verify git is installed:
which git
Get GitHub username:
gh api user --jq '.login'
Store this for later use when determining fork URLs.
If target directory is provided as argument:
~ to home directory if presentIf no target directory provided:
~/go/src/github.com/ (Go workspace convention)~/src/ (Simple source directory)~/code/olm/ (OLM-specific directory)Verify directory is writable:
test -w <target-directory> && echo "writable" || echo "not writable"
Before starting the setup process, display an educational overview to help the user understand the OLM ecosystem:
OLM Development Repository Structure
=====================================
The OLM project is split between upstream (operator-framework) and downstream (openshift) organizations:
**Upstream (operator-framework)**: Community-driven development and releases
**Downstream (openshift)**: OpenShift-specific customizations and productization
OLM v0 Repositories (Traditional Architecture)
-----------------------------------------------
UPSTREAM:
• operator-framework/operator-registry
Purpose: Catalog and bundle management for operators
Description: Defines the format for storing operator metadata and provides
tools (opm) for building and querying operator catalogs
• operator-framework/operator-lifecycle-manager
Purpose: Core OLM v0 runtime and controllers
Description: Manages operator installation, upgrades, and lifecycle on Kubernetes.
Includes controllers for CSV, Subscription, InstallPlan, and OperatorGroup resources
• operator-framework/api
Purpose: API definitions and CRD schemas
Description: Defines the Kubernetes Custom Resource Definitions (CRDs) used by OLM,
including ClusterServiceVersion, Subscription, InstallPlan, CatalogSource, etc.
DOWNSTREAM:
• openshift/operator-framework-olm
Purpose: OpenShift distribution of OLM v0
Description: Downstream fork that includes OpenShift-specific patches, security
enhancements, and integration points. This is what ships in OpenShift products
• operator-framework/operator-marketplace
Purpose: OperatorHub integration
Description: Provides the OperatorHub UI integration and marketplace functionality
for discovering and installing operators in OpenShift
OLM v1 Repositories (Next-Generation Architecture)
---------------------------------------------------
UPSTREAM:
• operator-framework/operator-controller
Purpose: Core OLM v1 runtime
Description: New architecture using ClusterExtension and Catalog resources.
Simplified design with better dependency resolution and cluster extensions
DOWNSTREAM:
• openshift/operator-framework-operator-controller
Purpose: OpenShift distribution of OLM v1 operator-controller
Description: Downstream fork with OpenShift-specific modifications
• openshift/cluster-olm-operator
Purpose: OLM cluster operator for OpenShift
Description: Manages the installation and lifecycle of OLM itself on OpenShift clusters.
Handles upgrades and configuration of OLM components
Documentation Repository
-------------------------
• openshift/openshift-docs
Purpose: OpenShift product documentation
Description: Official OpenShift documentation repository. Contains documentation for all
OpenShift features including OLM, operators, and OperatorHub. Documentation team members contribute
documentation updates for OLM-related features and improvements and work closely with engineering team members to ensure accurate content.
Execute the automated repository setup script to fork, clone, and configure all OLM repositories:
bash plugins/olm-team/scripts/setup-repos.sh "$target_directory" "$github_username"
The script automates the following for each repository:
gh repo view to check for existing forkgh repo fork if it doesn't exist$target_directory/$github_username/$repo_nameThe script processes these repositories:
The script will:
After processing all repositories, create a summary report:
Show repository locations: List all cloned repositories with their paths
Provide next steps:
Next Steps for OLM Development
===============================
1. Verify your setup:
cd ~/go/src/github.com/<username>/operator-lifecycle-manager
git remote -v
2. Keep your fork in sync with upstream:
git fetch upstream
git checkout main # or master, depending on the repo's default branch
git merge upstream/HEAD
git push origin HEAD
3. Create a feature branch for development:
git checkout -b feature/my-feature
4. Build and test (example for operator-lifecycle-manager):
make build
make test
5. Useful resources:
- OLM Documentation: https://olm.operatorframework.io/
- OpenShift OLM Docs: https://docs.openshift.com/container-platform/latest/operators/
- Confluence On-boarding Guide: https://spaces.redhat.com/pages/viewpage.action?pageId=467060465&spaceKey=OOLM&title=Onboarding
- How We Work Team Process Guide: https://spaces.redhat.com/spaces/OOLM/pages/467060455/_How+We+Work
- Contributing Guide: Check CONTRIBUTING.md in each repository
Display repository reference table: Create a quick reference table showing:
Handle common issues:
Fork creation fails:
Clone fails:
ssh -T [email protected]
Remote configuration fails:
Directory permission issues:
The command outputs a structured report containing:
/olm-team:dev-setup
The command will:
/olm-team:dev-setup ~/go/src/github.com/
Clones all repositories to ~/go/src/github.com/<username>/ directory structure.
/olm-team:dev-setup ~/go/src/github.com/
Creates standard Go workspace layout:
~/go/src/github.com/
<username>/
operator-registry/
operator-lifecycle-manager/
api/
operator-framework-olm/
operator-marketplace/
operator-controller/
operator-framework-operator-controller/
cluster-olm-operator/
openshift-docs/
target-directory (optional): Base directory where repositories will be cloned
~/go/src/github.com/, ~/src/, ~/code/olm/<target-directory>/<github-username>/<repo-name>/Fork vs Clone Strategy: The command uses the fork URL as "origin" and adds the original repository as "upstream". This follows the standard open-source contribution workflow where you push to your fork and create pull requests to upstream.
Directory Structure: Repositories are organized by username to support working with multiple GitHub accounts or collaborating with others who have different forks.
SSH vs HTTPS: The command uses SSH URLs ([email protected]:) for git operations. Ensure your SSH keys are configured with GitHub. If SSH is not available, the command will guide you through HTTPS setup.
Selective Setup: If you only need specific repositories, you can manually run the commands for individual repos after understanding the process from the overview.
Keeping Forks Updated: The command sets up remotes but doesn't automatically sync forks. Use the provided git commands in the summary to keep your forks up to date with upstream.
Build Requirements: Each repository may have specific build requirements (Go version, dependencies, etc.). Check each repository's README.md for detailed build instructions.
npx claudepluginhub jluhrsen/ai-helpers --plugin olm-team/dev-setupSets up OLM development repositories by forking and cloning upstream/downstream repos, configuring remotes, and providing educational context about the OLM ecosystem.
/github-cloneClones GitHub repositories into the local workspace by owner/repo name, URL, or SSH, with optional org-level bulk cloning and dry-run. Automatically skips already-cloned repos.
/onboard-repoBootstraps a new codebase by surveying the repo, writing CLAUDE.md, distilling review standards from merged PRs, and proposing a permissions allowlist. Accepts optional PR count argument.
/omni-primeAnalyzes codebase structure with git ls-files, reads README.md and kernel context to load essentials for a new agent session, providing a concise project overview.
/create-guideGenerates a project-specific onboarding guide for new developers, covering setup, architecture, workflow, and troubleshooting.
/opensourceAudits open source repo health and scaffolds community files, issue/PR templates, GitHub Actions workflows, CODEOWNERS, and governance models.