BreadTube Bake CLI
bake cli is a companion CLI to the breadtubetv/breadtubetv project.
Scripts are being written in Go, this keeps the scripting and operational language the same, provides cross system compatibility, and gives everyone an opportunity to learn a new programming language.
The compiled bake binary has no dependencies, so you can download your platforms release from the release page, pop it in your
$PATH and off you go.
If you want to build from source you will need the Go programming language installed, and your
# Enable Go 1.11+ module support export GO111MODULE=on go get github.com/breadtubetv/bake
This will install the binary into your
$GOPATH/bin folder. If you don't already it's recommended you add this directory to your
.bake.yaml configuration file can be stored in the following locations:
./bake.yaml(In other words, the current directory from which you're running the CLI)
Current configuration options and default values:
projectRoot: "../": Directory of channel data files.
Once you have
Import a Channel
bake channel import creator_slug youtube channel_url
Import a Video
Using the Video ID
bake import video --creator creator_slug --provider youtube --id VIDEO_ID
Using the Video URL
bake import video --creator creator_slug --provider youtube --url https://VIDEO_URL
Note: The following formats are supported
You'll need the Go programming language installed. We recommend version v1.12+. This is going to be dependent on your system, we recommend following https://golang.org/doc/install
Clone the repo and pull dependencies:
# Enable Go 1.11 module support export GO111MODULE=on # Clone directory git clone https://github.com/breadtubetv/bake cd bake # Download dependencies go mod download
spf13/cobragenerator CLI won't work if you don't clone the project into
$GOPATH. This is not a requirement to develop for the project.
Linting & Pre-Commit
We recommend using
golangci/golangci-lint for linting. A development config (
.golangci.dev.yaml) is provided. To use this config:
golangci-lint run --config=.golangci.dev.yml
.pre-commit-config.yaml is provided for pre-commit hooks using
Submitting a PR
We welcome PRs! The only thing we ask is that you ensure you keep the
go.sum files clean by running the following:
GO111MODULE=on go mod tidy
Bake has some very basic tests for now, they can be run with the standard go test command line:
go get -t ./... go test ./...
Releasing is automated via
git tag and CircleCI. Users with write permissions will be able to create tags. To create a new release:
# vX.Y.Z needs to be a valid SemVer version number git tag vX.Y.Z git push --tags
CircleCI will do the rest!