Skip to content

dheater/viewyard

Repository files navigation

Viewyard

Monorepo experience, multi-repo reality.

Viewyard creates synchronized development environments across multiple Git repositories. Instead of forcing everything into a monorepo or manually juggling scattered repos, Viewyard gives you the best of both worlds: lightweight coordination without monorepo complexity.

Why Viewyard?

  • Monorepos are slow to clone, complex to build, and create tight coupling
  • Scattered repos lack coordination and require manual branch management
  • Viewyard provides synchronized branches across repositories with flexible organization

πŸš€ Quick Start

# 1. Install and authenticate
gh auth login                           # One-time GitHub CLI setup

# 2. Create a viewset (project workspace)
viewyard viewset create my-project      # Interactive repository selection

# 3. Create a view (synchronized branch workspace)  
cd my-project
viewyard view create feature-123        # Creates branch across all repos

# 4. Work normally - all repos are synchronized on the same branch
cd feature-123
# Edit files in any repository...

# 5. Coordinate across repositories
viewyard status                         # Status of all repos
viewyard commit-all "Add feature"       # Commit to all dirty repos  
viewyard push-all                       # Push all repos with commits

πŸ“‹ Core Commands

Viewset Management (project-level)

viewyard viewset create <name>          # Create new project workspace
viewyard viewset create <name> --account <github-user>  # From specific account
viewyard viewset update                 # Add new repositories to existing viewset

View Management (branch-level)

viewyard view create <branch-name>      # Create synchronized branch workspace
viewyard view update                    # Add new repositories from viewset to current view

Workspace Commands (run from within a view directory)

viewyard status                         # Status of all repos (validates branch sync)
viewyard commit-all "message"           # Commit to all dirty repos
viewyard push-all                       # Push repos with commits ahead
viewyard rebase                         # Rebase all repos against their default branch

πŸ—οΈ How It Works

1. Authenticate with GitHub

# One-time setup - authenticate with GitHub CLI
gh auth login
# Supports multiple accounts for work/personal separation

2. Create a Viewset (Project Workspace)

viewyard viewset create my-project
# Interactive selection from your GitHub repositories
# Creates .viewyard-repos.json configuration file

3. Create Views (Synchronized Branch Workspaces)

cd my-project
viewyard view create feature-123
# Creates 'feature-123' branch in all repositories
# All repos are synchronized on the same branch

4. Work Across Repositories

cd feature-123
# Edit files in any repository
# All repositories are on the same branch for coordinated development

5. Coordinate Changes

viewyard status                 # See status of both repos (branch sync validated)
viewyard commit-all "Add user authentication"
viewyard push-all              # Push both repos

6. Create Additional Views

cd ..  # Back to viewset root
viewyard view create bug-fix-456  # Creates new synchronized branch workspace

πŸ—‚οΈ Directory Structure

my-project/                      # Viewset (project workspace)
β”œβ”€β”€ .viewyard-repos.json        # Repository configuration
β”œβ”€β”€ feature-123/                # View (synchronized branch workspace)
β”‚   β”œβ”€β”€ web-frontend/           # Repository on 'feature-123' branch
β”‚   └── api-backend/            # Repository on 'feature-123' branch
└── bug-fix-456/               # Another view
    β”œβ”€β”€ web-frontend/          # Repository on 'bug-fix-456' branch
    └── api-backend/           # Repository on 'bug-fix-456' branch

Key Benefits:

  • Minimal configuration - only one JSON file per viewset (auto-generated)
  • Hierarchical organization - viewsets contain multiple synchronized views
  • Branch synchronization - all repos in a view are on the same branch
  • Automatic detection - context determined from directory structure
  • Clean deletion - just rm -rf viewset-name when done

πŸ€– Manual Configuration

You can bypass interactive selection by creating the .viewyard-repos.json file directly:

# Create a viewset directory
mkdir my-project && cd my-project

# Create the repository configuration manually
cat > .viewyard-repos.json << 'EOF'
[
  {
    "name": "frontend",
    "url": "git@github.com:myorg/frontend.git",
    "is_private": false,
    "source": "GitHub (myorg)"
  },
  {
    "name": "backend", 
    "url": "git@github.com:myorg/backend.git",
    "is_private": true,
    "source": "GitHub (myorg)"
  }
]
EOF

# Now create views normally
viewyard view create feature-123

πŸ“š Documentation

πŸ” Repository Discovery

Viewyard automatically discovers repositories from your GitHub accounts:

  • Personal repositories from your authenticated account
  • Organization repositories from organizations you belong to
  • Multiple account support for work/personal separation

Monorepo experience, multi-repo reality.

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •