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:
- Visit the Stethoscope repository on GitHub: https://github.com/stethoscope-js/stethoscope
- Click on the "Use this template" button on the top-right
- Enter a name for your new repository
- 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:
- Go to your repository settings page
- Scroll to "GitHub Pages" settings
- Under "Source", change "None" to "master"
- 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):
- Clone your newly created repository (see Cloning a repository)
- Enter the directory (
cd stethoscope
) in a terminal window - Ensure you are in the default branch:
git checkout master
- Recursively remove the folder:
git rm -r data
- Commit the change:
git commit -m ":fire: Remove sample data"
- 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:
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
.
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
- Start tracking data by performing a manual trigger.
- Optionally, add older data from your integrations using by migrating old data
- Create embeds to add visualization to your website