Generating Your Beatedit

To generate your own Beat, you use the Beat generator available in the beats repo on GitHub. If you haven’t downloaded the Beats source code yet, follow the instructions in Getting Ready.

Before running the Beat generator, you must install cookiecutter, a command-line utility that creates projects from project templates. Check out the installation guide. After installing cookiecutter, decide on a name for your beat. The name should be one word with the first letter capitalized. In our example, we use Countbeat.

Now create a directory under $GOPATH for your repository and change to the new directory:

mkdir $GOPATH/src/{user}
cd $GOPATH/src/{user}

Run cookiecutter and specify the path to the Beat generator:

cookiecutter $GOPATH/src/

Cookiecutter will prompt you to enter information about your Beat. For the project_name, enter Countbeat. For the github_name, enter your github id. The beat and beat_path are set to the correct values automatically (just press Enter to accept each default). For the full_name, enter your firstname and lastname.

project_name [Examplebeat]: Countbeat
github_name [your-github-name]: {username}
beat [countbeat]:
beat_path [{github id}]:
full_name [Firstname Lastname]: {Full Name}

The Beat generator creates a directory called countbeat inside of your project folder.

You now have a raw template of the Beat, but you still need to fetch dependencies and set up the Beat.