![](https://raw.githubusercontent.com/loghinalexandru/loghinalexandru.github.io/master/static/img/anchor_banner_light.png)
![](https://raw.githubusercontent.com/loghinalexandru/loghinalexandru.github.io/master/static/img/anchor_title_light.png)
Anchor is a simple CLI tool for storing bookmarks neatly organized in a flattened label hierarchy. It features a custom and intuitive TUI via bubbletea and automatic syncing with git via go-git as a backing storage.
Download one of the pre-built binaries and make it available for the shell you are using. Make sure to grab the right one for the operating system/architecture you intend to use it on.
Prerequisites to build anchor from source:
- Go 1.21 or later
Build and place it under $GOBIN
:
go install github.com/loghinalexandru/anchor@latest
For now by default it uses the local file system as storage. You can specify what kind of backing storage you want via a config file explained in the next section.
Valid options:
- local
- git via ssh auth
In order to use anchor you first need to create a home for all your bookmarks. Before any operation you need to initialize the storage by running the following command:
anchor init
In order to change the default behaviour create a file under ~/.config/anchor/anchor.yaml
with the following config values:
storage: git # Use git as backing storage (default: local)
path: /Users/anchor-user # Change storage path (default: ~/)
sync: none # Change sync mode from (default: always)
For this to work you need to have a repository already created and a ssh key already setup. The authentication is done via ssh-agent as mentioned in the go-git documentation.