Keyword-based navigation bar in front of a search engine. Register it as a browser search engine, then type either:
| Input | Behavior |
|---|---|
go <keyword> |
302 redirect to the matching entry in hosts.yaml |
go (unknown/bare) |
Render the keyword menu |
| anything else | 302 redirect to the configured search engine with ?q=<query> |
| Route | Purpose |
|---|---|
/ and /search |
Main entry: ?q=<query> dispatches as above |
/go/<keyword> |
Direct keyword redirect (used by the menu links) |
/help |
Instructions to add GoBar as a browser search engine |
/opensearch.xml |
OpenSearch description so Firefox/Chrome can auto-add the engine |
Everything lives in hosts.yaml; the file is hot-reloaded on change
(mtime check on every query), so edits take effect without a restart.
# Search engine used for non-`go` queries.
search_url: "http://search.example-domain/search"
infra:
router: "https://router.example-domain"
media:
jellyfin: "http://10.10.1.10:8096"- Categories (top-level mappings) group keywords in the menu page.
- A flat
keyword: URLmapping at the top level also works; those entries are grouped under a trailingothercategory. search_urlis reserved: it configures the search engine and never appears as a keyword.- The
GOBAR_SEARCH_URLenvironment variable overrides the YAML value.
| Variable | Default | Purpose |
|---|---|---|
GOBAR_HOSTS_FILE |
./hosts.yaml |
Path to the hosts file |
GOBAR_SEARCH_URL |
(unset) | Overrides search_url from hosts.yaml |
GOBAR_HOST |
0.0.0.0 |
Bind address |
GOBAR_PORT |
5000 |
Bind port |
docker compose up -d --buildThe compose file maps host port 5055 (override with GOBAR_PORT) and
bind-mounts hosts.yaml read-only so edits hot-reload inside the
container. Uncomment the environment: block in docker-compose.yml
only if you need to override search_url outside the YAML.
pip install -r requirements.txt # flask, pyyaml
python app.pyapp.py Flask app: routing, hosts.yaml loading/hot-reload
hosts.yaml Search engine + category/keyword/URL mappings
templates/ base.html, keyword_list.html, help.html, opensearch.xml
static/style.css Menu/help styling
Dockerfile python:3.13-slim image
docker-compose.yml Single-service deployment
Open /help on a running instance: it shows the exact URL to register.
Once registered with shortcut go (or as the default engine), the
address bar accepts go x, go y, or any plain search.