Import your Linkding bookmarks to Margin.at, an AT Protocol bookmark service.
This tool fetches all bookmarks from your Linkding instance and imports them as bookmarks or annotations (if notes are present) to your AT Protocol account.
Ensure you have Go 1.25 or later installed, then:
go install go.hacdias.com/linkding-to-margin@latestOr clone the repository and run:
go buildCopy .env.example to .env and fill the environment variables as needed.
Required variables:
ATPROTO_HOST: The AT Protocol PDS host (e.g.,https://bsky.social)ATPROTO_IDENTIFIER: Your AT Protocol handle (e.g.,username.bsky.social)ATPROTO_PASSWORD: An (app) password for your AT Protocol accountLINKDING_ENDPOINT: The base URL of your Linkding instanceLINKDING_API_KEY: Your Linkding API key (found in Linkding settings)
Optional variables:
DRY_RUN: Set totrueto preview records without creating themIGNORE_ARCHIVED: Set totrueto skip archived bookmarksPROCESSED_IDS_FILE: Path to the CSV file tracking imported bookmarks (default:processed-bookmarks.csv)
linkding-to-marginThe tool will:
- Load environment variables from
.env - Fetch all bookmarks from your Linkding instance
- Import them to your AT Protocol account as bookmarks or annotations
- Display the count of imported bookmarks
Note: Bookmarks with notes will be imported as annotations. Bookmarks without notes will be imported as regular bookmarks.
If the import fails partway through, simply run the command again. The tool automatically tracks successfully imported bookmarks in processed-bookmarks.csv and will resume from where it left off. You can manually edit or delete the CSV file if needed to restart the import.
MIT © Henrique Dias