Skip to content
This repository was archived by the owner on Jul 7, 2024. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

49 Commits

Repository files navigation

gitspace

Git-based workspaces

  • Similar to submodules without the check-in
  • Language agnostic
  • SSH config pass-through for authorization

Getting Started

  1. cargo install gitspace
  2. gitspace init
  3. Update config
    • Add your ssh host (info below)
    • Add your repos
  4. gitspace sync

Commands

Commands::Initialize

NameDescription
initCreate a new gitspace config
syncClone repos, update symlinks, update gitignore

Commands::Maintain

NameDescription
aliasgenerate aliases for gitspace repos, defaults to alias --zsh
alias --bashgenerate bash / zsh compatible aliases
alias --nushellgenerate nushell aliases
ignoreUpdate (or create) new gitignore file based on cloned repos
cleanWithout argument, defaults to clean --all
clean --allremoves everything besides gitignore and your gitspace config
clean --symlinksRemove all gitspace generated symlinks
clean --reposRemove all cloned repos (ie. .repos directory)
fetchFetch all updates from master for local repos
versionprint gitspace version

Space

  • A space...
    • is short for "workspace"
    • is any directory with a .gitspace file
    • combines multiple repositories into one place

Git

  • Git is how you configure...
    • Which repositories should be stored
      • How they should be nested
    • Your auth strategy
    • Your sync policy
      • How often it should run

Dependencies

NameLinkDescription
git2git2Clone git repos
serdeserdeSerializing/deserializing (for payloads and repogen config )
symlinksymlinkCross-platform symlinks
reqwest-graphqlreqwest-graphqlQuerying Github's GraphQL API
clapclapCLI argument parser

Prior Art

Origin of this project started when I wrote repogen. While this is still used internally, it's outdated & lacks features. We ended up using submodules last year and remembered some of the pain associated with an otherwise convenient feature. Ultimately wanted something that would allow a team of devs to have a consistent directory structure without being beholden to the all-mighty monolith

There are number of notable options in the monolith/package management space, ranging from pure workspaces to interactive build systems

Few notable examples:


Objectives

Objectives::MVP

  • Core commands (init and sync) work

Objectives::Post-MVP

  • Update README

    • install via cargo
    • Add support for install via brew
  • Initialize

    • Generate a config
      • allow selecting config language
        • js (default)
        • json
        • yaml
    • Parse config that...
      • uses a SSH config provider to work with SSH connections
      • allows people to designate package manager's path per sub-repo (eg. pnpm, cargo, etc)
    • Generate initial gitignore (or update existing) to include all sub-repos paths (to avoid syncing symlinks or cloned .repos directory)
    • Clone repositories to hidden .repo directory
    • Load all submodules for repos

      More info here

    • Make the CLI interactive (during file generation)
  • Maintain

    • One brew doctor equivalent command that can be used to do everything
    • Sync gitignore to match directories within .repo

      eg. "foo", "bar" repos cloned. Auto-added to .gitignore file

    • Fetch updates for all sub-repos

      eg. git pull origin master on all nested repos

    • Enable idempotent fetches (to allow re-running repogen without needing to remove previously cloned repos or generated symlinks)
    • Enable cleaning up all local repos
    • Enable cleaning up all local symlinks
    • Enable generating alias files for nested tree structure

      for now print out and allow them to source it

      • add prefix option in config
        • ${prefix}/${pwd}
      • add shell output options
        • zsh
        • nushell
  • Administrate

    • Create repo labels automagically ()

      eg. "foo", "bar" repos cloned. ${opt-label-prefix}-${reponame}-${opt-label-suffix} generated on Github and Gitea

    • Show visual of dependency graph of repo structure

About

git-based workspace manager with some improved QOL

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages