mark
Installation
There are four ways to install mark
, given here in order of simplicity:
- Download and run the installer script
- Use
go install
- Use a pre-built binary
- Build
mark
from scratch
Download and Run the Installer
First, do yourself a favor and just go check out the
installer script
to make sure you're okay with it. You owe it to yourself.
If so, you can run the following:
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/commondatageek/mark/main/install.sh | bash -s
Use go install
If you [already have Go installed], then installing mark
is as simple as:
go install github.com/commondatageek/mark
You'll then need to make sure that your GOPATH
(typically $HOME/go
by default) is on your PATH
variable.
Use a Pre-built Binary
- Download the appropriate pre-built binary from the Releases page.
- Extract the
mark
file from the tar archive. For example:
tar -xvf mark-v0.6.1-darwin-amd64.tar.gz
- Move the
mark
binary into your preferred location on your path. For example:
sudo mv ./mark /usr/local/bin
Build mark
from Scratch
- Install Go
- Clone the
mark
repository to your local machine
- From the
mark
repository directory, run go build .
- (Alternatively, if you have
just
task runner installed, you can run just build
)
- Move the newly built
mark
binary to some directory on your PATH
. For example:
sudo mv ./mark /usr/local/bin
In the future, we'll have a devcontainer that will make this easier.
Usage
The Database File
You must have a file called .bookmarks.jsonl
in your $HOME
directory.
It should have the following format, one item per line:
{"names": ["Hacker News", "hn"], "tags": ["news", "technology"], "url": "https://news.ycombinator.com/news"}
{"names": ["InfoQ News", "infoq"], "tags": ["news", "technology"], "url": "https://infoq.com"}
{"names": ["Mark Github Repository", "gh/mark"], "tags": ["personal", "github", "mark", "cli", "golang"], "url": "https://github.com/commondatageek/mark"}
You'll want to add good tags and names, as it will help immensely when you are searching for something 6 months from now.
Search your item database
The search functionality will perform indexing on your database and match all
the substrings of the words you type in against the substrings in the words in your items
--including names, tags, and URL.
When it gives you search results, you can Command
+Click on the URL and open it:
mark
Open a specific item
Open a specific item by giving one of its names:
mark my/cool/item/name