Web application that allows you to create smart bookmarks, commands and aliases by pointing your web browser's default search engine at a running instance. Similar to bunny1 or yubnub.
Self-host this app for $0.99/mo only!
golinks is a web app that allows you to create smart bookmarks, commands and aliases by pointing your web browser's default search engine at a running instance. Similar to bunny1 or yubnub.
$ go get git.mills.io/prologic/golinks
There is a formula provided that you can tap and install from prologic/homebrew-golinks:
brew tap prologic/golinks https://git.mills.io/prologic/homebrew-golinks.git
brew install golinks
NB: This installs the latest released binary; so if you want a more recent unreleased version from master you'll have to clone the repository and build yourself.
Set your browser's default custom search engine to your golinks hosted location, such as http://localhost:8000/?q=%s. Replacing localhost with wherever you host golinks from.
Then type help to view the main help page, g foo bar to perform a Google search for "foo bar" or list to list all available commands.
If using the binary golinks, then run it as follows, specifying the parameters individually or by specifying a configuration file
golinks -bind 0.0.0.0:8000 -baseURL http://localhost:8000
Or using a configuration file:golinks -config ~/.config/golinks/config.cfg
When using the binary, it supports any of the parameters specified in the Example Config File section.
NOTE: They are case sensitive and must be used, exactly as shown in the config file section such as baseURL.
To startup a container with an image from docker hub, run the following:
docker run -it -d -p 8000:8000 brokenscripts/golinks
This will start up the server on port 8000.
Or use the following docker-compose configuration that creates a bind mount from a golinks folder in the current user's home directory to where the environment variable DBPATH is pointed at in the container.
Note: The latest version of golinks, used in this docker image, uses
environmentvariables instead of the oldcommandvariables.
version: "3.9"
services:
golinks:
image: brokenscripts/golinks
container_name: golinks
restart: unless-stopped
volumes:
- "${HOME}/golinks:/search.db"
environment:
BIND: "0.0.0.0:8000"
BASEURL: "https://golinks.domain.net" # Using an internal proxy that will make this resolve correctly
DBPATH: "/search.db"
TITLE: "GoLinks"
SEARCHURL: "https://www.google.com/search?q=%s&btnK"
SUGGESTURL: "https://suggestqueries.google.com/complete/search?client=firefox&q=%s"
| FLAG | DEFAULT | Description |
|---|---|---|
BIND |
0.0.0.0:8000 |
Must be in IP:PORT format. Where the container listens at. |
BASEURL |
http://localhost:8000 |
Must start with http:// or https:// and can optionally have a port following the domain name. If using a proxy, ensure that this matches what your clients will visit. |
DBPATH |
/search.db |
Where in the container you want the bookmarks stored |
TITLE |
Search |
The OpenSearch service title (i.e. what your browser will call golinks' search) |
SEARCHURL |
https://www.google.com/search?q=%s&btnK |
The URL golinks will redirect searches to by default (if no custom bookmark matches) |
SUGGESTURL |
https://suggestqueries.google.com/complete/search?client=firefox&q=%s |
URL of autosuggest service to retrieve search suggestions from |
| --- | ||
| FLAG | DEFAULT | Description |
| ------ | --------- | ------------- |
CONFIG |
Path to an optional config file containing the below golinks variables |
See Configuration File below for more information.
To add a bookmark (or overwrite an existing one), enter add [name] [url] as your search query, where name is the shortcut for the bookmark and url the URL:
add imdb https://www.imdb.com
Now you can just enter imdb in your search bar to go straight to imdb.com.
You can also add %s to your URL, which will be replaced with your search query:
add ddg https://duckduckgo.com/?q=%s
Now you can use ddg [query] to search via DuckDuckGo, e.g. ddg free stuff to find yourself some free stuff.
To remove a search, use remove [name], so remove ddg will remove the above search.
help to view the online help page
list to see all your bookmarks and commands
add to create a new bookmark
remove to remove a bookmark
date to get the current container date (UTC default)
time to get the current container time (UTC default)
ping to get the current UNIX timestamp (epoch)
golinks can also use a configuration file (specified via CONFIG=/path/to/file) with a very simple format. Each line of the file should contain one option, specified in the same way as the corresponding CLI flag but without the leading -. Empty lines and lines beginning with #are ignored.
Note: If using a config file, do not specify the environment variables shown above
Save the variables shown below as config.cfg (example filename) and bind mount into the container and specify the environment CONFIG variable pointing to where this is mounted at.
bind 0.0.0.0:8000
baseURL http://localhost:8000
dbpath /search.db
title GoLinks
searchURL https://www.google.com/search?q=%s&btnK
suggestURL https://suggestqueries.google.com/complete/search?client=firefox&q=%s
Here is a quick example of having Chrome's search engine change the keyword go to point to my golinks.
After using go you can see the bar change to Search GoLinks.
Typing help (so.. go help) does a redirect to the defined help URL contained in golinks.
Support the ongoing development of Bitcask!
Sponsor
golinks is considered "production" software and is used daily. If you find this interresting or useful please fork and contribute back via pull-requests! If you find bugs or have ideas for new features, please file an issue!
MIT
Please login to review this project.
No reviews for this project yet.
Comments (0)
Please login to join the discussion on this project.