Created
August 24, 2025 12:29
-
-
Save diegomarino/627445f2512c89a5ae32605e87e39033 to your computer and use it in GitHub Desktop.
.conductor - new workspace script (.claude/* and AGENTS.md)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Conductor Workspace Setup Script | |
| # Copies configuration files from parent repo to workspace | |
| set -e | |
| # Use Conductor environment variables with fallbacks | |
| PARENT_REPO="${CONDUCTOR_ROOT_PATH:-$(dirname "$(dirname "$(pwd)")")}" | |
| WORKSPACE_DIR="${CONDUCTOR_WORKSPACE_PATH:-$(pwd)}" | |
| WORKSPACE_NAME="${CONDUCTOR_WORKSPACE_NAME:-$(basename "$(pwd)")}" | |
| echo "π Setting up Conductor workspace: $WORKSPACE_NAME" | |
| echo "π Using paths:" | |
| echo "Root repo: $PARENT_REPO" | |
| echo "Workspace: $WORKSPACE_DIR" | |
| # Validate parent repo exists | |
| if [ ! -d "$PARENT_REPO" ]; then | |
| echo "β Error: Root repo not found at $PARENT_REPO" | |
| echo "Check CONDUCTOR_ROOT_PATH or workspace structure" | |
| exit 1 | |
| fi | |
| # Function to copy if source exists | |
| copy_if_exists() { | |
| local source="$1" | |
| local dest="$2" | |
| if [ -e "$source" ]; then | |
| echo "π Copying $(basename "$source")..." | |
| cp -r "$source" "$dest" | |
| echo "β Copied $source β $dest" | |
| else | |
| echo "β οΈ Source not found: $source" | |
| fi | |
| } | |
| # Create .conductor directory if it doesn't exist | |
| mkdir -p .conductor | |
| # 1. Copy .claude/ directory | |
| if [ -d "$PARENT_REPO/.claude" ]; then | |
| echo "π Copying .claude configuration..." | |
| cp -r "$PARENT_REPO/.claude" . | |
| echo "β Copied .claude directory" | |
| else | |
| echo "β οΈ .claude directory not found in parent repo" | |
| fi | |
| # 2. Copy AGENTS.md | |
| copy_if_exists "$PARENT_REPO/AGENTS.md" "./AGENTS.md" | |
| echo "" | |
| echo "π Workspace setup complete!" | |
| echo "" | |
| echo "Files copied:" | |
| echo "- .claude/ (if existed)" | |
| echo "- AGENTS.md (if existed)" | |
| echo "" | |
| echo "Remember to:" | |
| echo "- Review .claude/settings.local.json permissions" | |
| echo "- Verify MCP configurations match your needs" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment