Repository

To use Stethoscope to track your health and life data, you start by creating a repository using the template on GitHub.

Create a repository from the template

You can click on the following link to generate a repository using the template: Create a new repository from stethoscope-js/stethoscope. Alternately, you can follow these steps:

  1. Visit the Stethoscope repository on GitHub: https://github.com/stethoscope-js/stethoscope
  2. Click on the "Use this template" button on the top-right
  3. Enter a name for your new repository
  4. Click on "Create repository from template"

For more details on how to create repositories using template, read the article on the GitHub website: Creating a repository from a template.

note

Your data will be committed to this repository, so if you don't want it to be visible to everyone, you should set your repository as private (see Setting repository visibility). Note that all data points are opt-in, so we recommend a public repository with the data you want to share, and a private one with more in-depth tracking.

After creating your repository

The following steps apply to your new repository, not the stethoscope-js/stethoscope template repository.

Enable publishing

To access your API endpoints, you have to enable publishing using GitHub Pages:

  1. Go to your repository settings page
  2. Scroll to "GitHub Pages" settings
  3. Under "Source", change "None" to "master"
  4. Click on "Save"

After saving, you will see confirmation text "Your site is ready to be published at...". For more information on enabling GitHub Pages, see the article on the GitHub website: Configuring a publishing source for your GitHub Pages site.

If you don't want to have a publicly-available API, you don't have to enable publishing. If that is the case, you should also choose to keep your repository private.

Deleting sample data

There is sample data available in the data directory. You have to start by deleting the data directory in your new repository. To delete the directory, perform the following steps (source):

  1. Clone your newly created repository (see Cloning a repository)
  2. Enter the directory (cd stethoscope) in a terminal window
  3. Ensure you are in the default branch: git checkout master
  4. Recursively remove the folder: git rm -r data
  5. Commit the change: git commit -m ":fire: Remove sample data"
  6. Push the change to your remote repository: git push origin master

Update configuration

The .stethoscoperc.yml file is used as the central configuration store. In that file, you can specify which services you want to connect to using Integrations.

Enter the name (slugified) of each services you intend to use. In the following example, we have enabled all tracking data points for four integrations, all fetching the data every day:

.stethoscoperc.yml
integrations:
rescuetime:
frequency: "daily"
all: true
last-fm:
frequency: "daily"
all: true
pocket-casts:
frequency: "daily"
all: true
google-fit:
frequency: "daily"
all: true

Add tracking data points

All data points are opt-in, so you have to individually enable which items to track for each Integration.

For example, if you have enabled the RescueTime integration, you can track your overview, top categories, and top activities. In this example, we are enabling the overview and top categories, but not top activities in the .stethoscoperc.yml file. A sample file is available in the repository: .stethoscoperc.yml.

.stethoscoperc.yml
integrations:
rescuetime:
overview: true
categories: true
activities: false

Detailed documentation about which data points are available for each service is present in Integrations.

Add repository secrets

All sensitive information required, such as API keys, are provided as environment variables. These are stored as GitHub repository secrets (see Creating and storing encrypted secrets).

For example, if you have enabled the RescueTime integration, you need to provide the API key. Specify the environment variable RESCUETIME_API_KEY by adding it as a repository secret.

Detailed documentation about which environment variables are required for each service are available in Integrations.

Next steps

  1. Start tracking data by performing a manual trigger.
  2. Optionally, add older data from your integrations using by migrating old data
  3. Create embeds to add visualization to your website