Giter Site home page Giter Site logo

workspaces's Introduction

workspaces

A small command line utility to quickly switch between repositories using a fuzzy finder.

Workspaces Preview

Usage

Install by running go install github.com/fawind/workspaces@latest.

Commands:

  • workspaces dir: Print the local directory of the selected repository. Clones the repo first if it does not exist locally yet.
  • workspaces github: Print the Github url of the selected repository.
  • workspaces refresh: Refresh the cached list of repositories.

This tool is meant to be used in combination with other cli utilities. For example using shell aliases:

# Navigate to local dir.
alias wscd="cd \$(workspaces dir | tail -1)"

# Open the repo url in the browser.
alias wsgh="workspaces github | xargs open"

# Navigate to local dir and open gradle project in Intellij.
alias wsidea="wscd && ./gradlew openIdea"

Setup

  1. Create a config file with the Github organizations you want to include:
    # ~/.config/workspaces/config.yml
    workspaces:
      - directory: "~/repos/google"
        organization: "https://github.com/google"
      - directory: "~/repos/apache"
        organization: "https://github.com/apache"
  2. (Optional) Create a secrets config file with your Github access token (using the repo scope). This is only required to access private repos, Github Enterprise endpoints, or to increase your API limit.
    # ~/.config/workspaces/.secrets.yml
    - endpoint: "https://github.com"
      token: "my-token"
  3. Refresh the list of repositories. The list is cached in ~/.config/workspaces/.repos.csv. You need to re-run this command to pick up new repositories.
    $ workspaces refresh
  4. (Optional) Setup your shell aliases.
    # Navigate to local dir of slected repo. Clone repo if it does not exist yet.
    alias wscd="cd \$(workspaces dir | tail -1)"
    
    # Open the repo url in the browser.
    alias wsgh="workspaces github | xargs open"

workspaces's People

Contributors

fawind avatar

Stargazers

Janek Szynal avatar Danijar Hafner avatar Leon Windheuser avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.