This is a quick note about how I switched from paying $165 per year for an app to paying nothing to get essentially the same functionality. tl;dr: Switch from Roam to LogSeq and use Github to sync.
Why I like Roam
Roam Research is a great tool for ad-hoc notetaking. The creators call it a “a note-taking tool for networked thought.”
I used Roam Research for a year and really enjoyed how it turned my unstructured thoughts into structure.
I particularly like that Roam automatically syncs between desktop and mobile (though the mobile app is terrible).
However, I don’t like the price of Roam ($165 per year), especially as a student. So when, my annual renewal came up a couple of days ago, I cancelled and began looking for other options.
LogSeq to the rescue
After some searching, I found LogSeq. LogSeq is essentially a local-first, open-source version of Roam. It has both desktop and mobile apps.
And, as you can see below, LogSeq can import Roam data (see this tutorial for step-by-step instructions).
The challenge is that LogSeq does not automatically sync between the desktop and mobile apps. The official suggestion is to use iCloud Drive, but that did not work for me nor other people.
A forum post pointed to this tutorial on syncing to Github, so I decided to try that. It worked!
LogSeq and Github
I’ll put here an abbreviated version of the tutorial with some of my customizations.
- I created a new Git repository inside the storage location of my LogSeq graph and created a private Github repository (assumes you have the Github command line installed)
- For desktop:
- I created a branch called
sync
to do the sync instead of main. This is so I don’t end up with a bunch of autosave commits for LogSeq on my Github profile. - I use the
pre-commit
(which pulls the repo) andpost-commit
hooks from the tutorial, but changed the post-commit to push the sync branch instead of main. - I turned on the “Git auto commit” setting in the LogSeq app
- Mobile (iOS): I used the Working Copy app and Apple shortcuts to automatically sync with GitHub. Just follow this section of the tutorial, but make sure you’re on the sync branch in Working Copy.
- Github Actions: I wrote a Github actions workflow to automatically create and merge a PR once a week from
sync
->main
. I use a squash commit when I merge the PR, so this gives me a clean set of commits to go back to if I ever need a backup. The action is below.
git init
gh repo create logseq_storage --private --source=. --remote=origin
git checkout -b sync
# In post-commit
git push origin sync
on:
schedule:
# Run once a week
- cron: '0 0 * * 1'
workflow_dispatch:
jobs:
pr:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: main
- name: Reset promotion branch
run: |
git fetch origin sync:sync
git reset --hard sync
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
body: "Repository last updated at ${{ github.event.repository.updated_at }}."
title: "Weekly backup"
branch: weekly-update
- name: Merge Pull Request
if: ${{ steps.cpr.outputs.pull-request-number }}
uses: juliangruber/merge-pull-request-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.cpr.outputs.pull-request-number }}
method: squash
repo: marcosfelt/logseq_storage
I hope this helps if you ever want to switch to LogSeq and thus save some money!