Skip to content
/ neh Public

A tool that redirects you to commonly used sites

License

Notifications You must be signed in to change notification settings

taneliang/neh

Repository files navigation

neh

CircleCI codecov Maintainability

https://neh.eltan.net

A tool that redirects you to some commonly used sites; intended to be an Alfred for your browser.

screencast

Inspired by Facebook's open source bunny tool, but rewritten for the cloud serverless edge computing age – neh runs in Cloudflare Workers on Cloudflare's edge servers located close to you. TL;DR it's fast.

Usage

The easiest way to use neh is to set https://neh.eltan.net/ as your browser's default search engine. Then, run commands by typing their command names followed by your query. If no command is detected, neh will just redirect you to DuckDuckGo.

Here are some examples:

Neh also does some basic query detection and is able to convert between different search engines. It's not completely reliable but works in most cases. Examples:

Neh! Liddat only. Easy.

Development

Setup

We use Cloudflare's Wrangler tool to run and publish neh.

  1. Run yarn to install dependencies.
  2. cp .env.example .env and fill it in.
  3. Modify the wrangler.toml file as appropriate.

Local development server

To start a local development server, run:

yarn start

You'll then be able to open neh at http://localhost:8787.

Cloudflare Workers preview

To preview neh, run:

yarn preview

Wrangler will open the preview in your web browser. If this does not happen, ensure that the BROWSER environmental variable has been set.

Publishing

Our CircleCI workflow automatically deploys neh's main branch to Cloudflare Workers.

Having said that, here's how you can publish neh manually:

  1. Add CF_API_TOKEN to your .env file.
  2. Run:
    yarn env-cmd yarn run publish