Self-hostable API for quick Obsidian captures
Report Bug
·
Request Feature
Table of Contents
This project was developped as an API middleware to quickly capture notes or audio-notes to a self-hosted REST API for later upload and organisation on Obsidian.
It grew out of frustration with the mobile Obsidian app that makes quick capture mostly impossible in case of inspiration burst
Running this command will start the service on port 8888 (replace with the one you want)
docker run -d -p 8888:8000 -v /your/persistent/directory:/obsidian-rest/var --name obsidian-rest ghcr.io/benbaja/obsidian-rest:latest
Make sure to map the X folder to a persistent space in your disk to keep the database alive
- Connect to your Obsidian-REST instance and create an admin password
- Generate your API token
- (Optional) Create a Swiftink account, and enter your Swiftink API token
- Download the quickAdd script and add it to your Obsidian vault
- In Obsidian, install quickAdd
- Create a new quickAdd macro named
Obsidian-REST
, add the downloaded script as the only step - In the script settings, add the Obsidian-REST endpoint URL and the token
- Create a quickAdd capture choice, and use
{{MACRO:Obsidian-REST}}
as the capture format
Payload :
capture_type: note | audio
for text notes
todo: boolean
(optional) formats the captured note as a to-do item
text: string
text of the note to capture
for audio
audio: base64
base64 encoding of the audio file
file_name: string
name of the audio file
Returns : new_note_id
or new_audio_id
Payload :
captureIDs: string[]
note IDs to mark as "fetched" on the database
Returns : captureIDs
Returns for each capture :
text: string
date_added: date
todo: boolean
following: note_id
(optional)
audio_id: audio_id
(optional)
capture_id: note_id
Returns :
text: string
date_added: date
todo: boolean
following: note_id
(optional)
audio_id: audio_id
(optional)
capture_id: note_id
An iOS shortcut can be downloaded here
- Swagger API documentation
- Browsable captures
- Re-trigger speech-to-text in case of failure
- Option for alternative speech-to-text (whisper)
- CI/CD
- Custom capture type and handling
- Auto-generated quickAdd script for custom captures
See the open issues for a full list of proposed features (and known issues).