Skip to content

Latest commit

 

History

History
255 lines (189 loc) · 6.04 KB

README.md

File metadata and controls

255 lines (189 loc) · 6.04 KB

DevBuddy

Go Report Card tests GitHub Release GitHub Release Date Gitter GitHub Release

Contents:

Note: contributors are welcome to join the project! 👩‍💻👨‍💻🤖

The project is evolving slowly, mostly because DevBuddy covers my current needs.

I would love to help people implement their languages/environments/tools/dev-flow.

What is this?

DevBuddy is an open-source implementation of an amazing internal tool developed at Shopify called "Dev".

The first goal of this tools is to automate the setup tasks required to work on a project.

With DevBuddy, pushing a change on a project you never touched look like this:

  • bud clone devbuddy/devbuddy
  • bud up
  • git commit
  • bud test
  • git push

Status and progress

DevBuddy is more useful for Python, Go and Node projects. More languages will be natively supported. DevBuddy is still useful for languages without native support thanks to the custom task.

See the project config documentation.

Tasks:

Python:

  • Python environment (pyenv + virtualenv)
  • Pip (requirements file)
  • Pipenv (support for Pipfile)

Go:

  • Go environment (with GOPATH)
  • Go modules
  • Dep (support for Go Dep)

Node:

  • Node environment
  • Dependencies with NPM
  • Dependencies with Yarn planned

Ruby: planned

Rust: planned

Others:

  • Homebrew
  • Apt
  • Custom (conditional shell command)
  • Docker Compose (manage a docker-compose setup): planned

Features:

  • Notification when important files (eg: requirements.txt) are updated locally (eg: by git pull)
  • A help command to guide a new developer based on dev.yml
  • A upgrade command to auto-upgrade DevBuddy

Code hosting platform:

  • Github
  • Gitlab
  • Bitbucket (with Git)

Shell integration

  • Bash
  • Zsh

Install

Homebrew

Install the Homebrew tap:

$ brew install devbuddy/devbuddy/devbuddy

Install the latest release:

$ brew install devbuddy

Install from the master branch:

$ brew install --HEAD devbuddy

Go install

Note: use this if your your PATH includes the GOBIN path.

Latest release:

$ go install github.com/devbuddy/devbuddy/cmd/bud@latest

Specify a version, like v0.11.1:

$ go install github.com/devbuddy/devbuddy/cmd/[email protected]

Manual

Select the version to download:

Latest:

$ VERSION=$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/devbuddy/devbuddy/releases/latest" | grep -oE "[^/]+$")

Previous releases:

$ VERSION="v0.12.0"

Download the binary

Linux Intel:

$ curl -L https://github.com/devbuddy/devbuddy/releases/download/${VERSION}/bud-linux-amd64 > /tmp/bud

Linux ARM:

$ curl -L https://github.com/devbuddy/devbuddy/releases/download/${VERSION}/bud-linux-arm64 > /tmp/bud

macOS Intel:

$ curl -L https://github.com/devbuddy/devbuddy/releases/download/${VERSION}/bud-darwin-amd64 > /tmp/bud

macOS Apple Silicon:

$ curl -L https://github.com/devbuddy/devbuddy/releases/download/${VERSION}/bud-darwin-arm64 > /tmp/bud

Install the binary

$ sudo install /tmp/bud /usr/local/bin/bud

Setup

★ Install the shell integration (in ~/.bash_profile, or ~/.zshrc):

eval "$(bud --shell-init --with-completion)"

A safer version:

type bud > /dev/null 2> /dev/null && eval "$(bud --shell-init --with-completion)"

Configuration

If you usual work with repos from the same organization (like your personal one), you can set it as a default:

export BUD_DEFAULT_ORG="google"

Then you can use it directly to create, clone and jump to those repos:

$ bud clone pytruth

Rather than:

$ bud clone google/pytruth

Usage

★ Add a dev.yml file in your project:

up:
  - go: 1.9.2
  - golang_dep
  - python: 3.6.4rc1
  - pip:
    - requirements.txt

commands:
  test:
    desc: Run the tests
    run: script/test
  lint:
    desc: Lint the project
    run: script/lint

open:
  staging: https://staging.myapp.com
  doc: https://godoc.org/github.com/org/myapp

See DevBuddy own dev.yml

$ bud
Usage:
  bud [flags]
  bud [command]

Available Commands:
  cd          Jump to a local project
  clone       Clone a project from github.com
  create      Create a new project
  help        Help about any command
  inspect     Inspect the project and its tasks
  open        Open a link about your project
  up          Ensure the project is up and running
  upgrade     [experimental] Upgrade DevBuddy to the latest available release.

Flags:
  -h, --help              help for bud
      --shell-init        Shell initialization
      --version           version for bud
      --with-completion   Enable completion during initialization

Use "bud [command] --help" for more information about a command.

License

MIT

Authors: