ferret

command module
v2.0.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2016 License: MIT Imports: 6 Imported by: 0

README

Ferret

Build Status GoDoc Release

Ferret is a search engine that unifies search results from different resources such as Github, Slack, Trello, AnswerHub and more. It can be used via CLI, Web UI or REST API

Distributed knowledge and avoiding context switching are very important for efficiency. Ferret provides a unified search interface for retrieving and accessing to information with minimal effort.

Installation

Mac Linux Win
64bit 64bit 64bit

See for building from source.

Usage

Make sure Ferret is configured properly before use it. Also put ferret binary file to a path (i.e. /usr/local/bin) that can be accessible from anywhere in the command line.

Help
ferret -h
CLI
# Search Github
# For more Github search syntax see https://developer.github.com/v3/search/
ferret search github intent
ferret search github intent+extension:md

# Search Slack
ferret search slack "meeting minutes"

# Search Trello
ferret search trello milestone

# Search AnswerHub
ferret search answerhub vpn

# Search Consul
ferret search consul influxdb

# Pagination
# Number of search result for per page is 10
ferret search trello milestone --page 2

# Timeout
ferret search trello milestone --timeout 5000ms

# Limit
ferret search trello epics --limit 100

# Opening search results
# Search for 'milestone' keyword on Trello and go to the second search result
ferret search trello milestone
ferret search trello milestone --goto 2
UI
ferret listen

# open http://localhost:3030/

Ferret UI

REST API
# Listen for HTTP requests
ferret listen

# Search by REST API
curl 'http://localhost:3030/search?provider=answerhub&keyword=intent&page=1&timeout=5000ms'

Configuration

Add the following environment variable definitions in ~/.bash_profile (OSX and Linux) file. Replace export command with set for Windows.

Configurations for Providers

Each search provider needs set of environment variables for operating. You can define environment variables for one or more search provider.

# Github
export FERRET_GITHUB_URL=https://api.github.com/
# For a token see https://help.github.com/articles/creating-an-access-token-for-command-line-use/
export FERRET_GITHUB_TOKEN=
# It's optional for filtering specific Github user (i.e. yieldbot)
export FERRET_GITHUB_SEARCH_USER=


# Slack
# For a token see https://api.slack.com/docs/oauth-test-tokens
export FERRET_SLACK_TOKEN=


# Trello
# For a key see https://trello.com/app-key and visit (after update it);
# https://trello.com/1/authorize?key=REPLACEWITHYOURKEY&expiration=never&name=SinglePurposeToken&response_type=token&scope=read
export FERRET_TRELLO_KEY=
export FERRET_TRELLO_TOKEN=


# AnswerHub
# For enabling the REST API 
# see http://docs.answerhub.com/articles/1444/how-to-enable-and-grant-use-of-the-rest-api.html
export FERRET_ANSWERHUB_URL=https://answerhub.yourdomain.com
# For username and password information
# see 'My Preferences->Authentication Modes' page in your AnswerHub site
export FERRET_ANSWERHUB_USERNAME=
export FERRET_ANSWERHUB_PASSWORD=


# Consul
export FERRET_CONSUL_URL=http://consul.service.consul
Global Configuration
# The command is used by `--goto` argument for opening links.
# Default is `open`
export FERRET_GOTO_CMD=open

# Default timeout for search command
# Default is `5000ms`
export FERRET_SEARCH_TIMEOUT=5000ms

# HTTP address for the UI and the REST API
# Default is :3030
export FERRET_LISTEN_ADDRESS=:3030
# A URL path prefix for the UI
export FERRET_LISTEN_PATHPREFIX=
# A comma separated list of providers
# Default value is automatically determined from the ENV variables
export FERRET_LISTEN_PROVIDERS=

Building from source

go get -u -v github.com/yieldbot/ferret
cd $GOPATH/src/github.com/yieldbot/ferret
go generate ./assets
go build

License

Licensed under The MIT License (MIT)
For the full copyright and license information, please view the LICENSE.txt file.

Documentation

Overview

Ferret is a search engine

Directories

Path Synopsis
Package api provides REST API functionality
Package api provides REST API functionality
Package assets provides embedded assets
Package assets provides embedded assets
Package providers wraps the provider packages
Package providers wraps the provider packages
answerhub
Package answerhub implements AnswerHub provider
Package answerhub implements AnswerHub provider
consul
Package consul implements Consul provider
Package consul implements Consul provider
github
Package github implements AnswerHub provider
Package github implements AnswerHub provider
slack
Package slack implements Slack provider
Package slack implements Slack provider
trello
Package trello implements Trello provider
Package trello implements Trello provider
Package search provides search interface and functionality
Package search provides search interface and functionality

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL