bashhub-server/README.md

76 lines
2.3 KiB
Markdown
Raw Normal View History

2020-02-07 16:02:18 +08:00
# bashhub-server
2020-02-10 14:59:55 +08:00
[![Go Report Card](https://goreportcard.com/badge/github.com/nicksherron/bashhub-server)](https://goreportcard.com/report/github.com/nicksherron/bashhub-server)
2020-02-07 16:02:18 +08:00
2020-02-10 14:22:20 +08:00
bashub-server is a open-source server for [bashhub-client](https://github.com/rcaloras/bashhub-client) with some
added features like regex search.
## Features
2020-02-07 16:02:18 +08:00
2020-02-10 14:22:20 +08:00
- All the benefits of bashhub without having to send your shell history to a third-party
- Regex search
- Very simple and easy to install and get running with existing bashhub-client
- Written in Go so it's fast and is actively maintained
## Why?
I love the idea behing bashhub. Having my shell history centralized and queryable from various systems whether it
be my home computer or from an ssh session on a server is great. BUT not if that means sending my shell history to a third-party,
regardless of their intentions or trustworthiness, so bashhub-server was created.
## Installation
#### Homebrew or Linuxbrew
```shell script
brew install bashhub-server/latest/bashhub-server
```
#### Docker
```shell script
docker pull nicksherron/bashhub-server
```
#### Releases
Static binaries for various os and architectures can be found in [releases](https://github.com/nicksherron/bashhub-server/releases).
If your system is not listed just add an issue requesting your os and architecture.
2020-02-10 14:35:12 +08:00
## Usage
```shell script
2020-02-10 14:35:48 +08:00
bashhub-server --help
2020-02-10 14:35:12 +08:00
Usage:
[flags]
[command]
Available Commands:
help Help about any command
version Print the version number and build info
Flags:
-a, --addr string Ip and port to listen and serve on. (default "0.0.0.0:8080")
2020-02-10 14:38:49 +08:00
--db string DB location (sqlite or postgres)
2020-02-10 14:35:12 +08:00
-h, --help help for this command
2020-02-10 14:38:49 +08:00
--log string Set filepath for HTTP log. "" logs to stderr.
2020-02-10 14:35:12 +08:00
Use " [command] --help" for more information about a command.
2020-02-10 14:38:49 +08:00
2020-02-10 14:35:12 +08:00
```
### Running
2020-02-10 14:35:12 +08:00
Just run the server
```shell script
2020-02-10 14:35:48 +08:00
bashhub-server
2020-02-10 14:35:12 +08:00
```
or on docker
```shell script
2020-02-10 14:35:48 +08:00
docker run -d -p 8080:8080 --name bashhub-server nicksherron/bashhub-server
2020-02-10 14:35:12 +08:00
```
Then add ```export BH_HOST=localhost:8080``` (or whatever you set your bashhub-server address to) to your .zshrc or .bashrc
Thats it! Restart your shell with `$SHELL` then re-configure bashhub-client to use your new
server by re-running ```bashhub setup``` .
2020-02-10 15:31:44 +08:00
### Changing default db
### Using Regex