All Projects → rcaloras → Bashhub Client

rcaloras / Bashhub Client

Licence: apache-2.0
☁️ Bash history in the cloud. Indexed and searchable.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
bash
514 projects

Projects that are alternatives of or similar to Bashhub Client

Bashhub Server
Private cloud shell history. Open source server for bashhub https://github.com/rcaloras/bashhub-client
Stars: ✭ 189 (-77.97%)
Mutual labels:  cloud, terminal, zsh, history
Ls
ls on steroids
Stars: ✭ 458 (-46.62%)
Mutual labels:  terminal, zsh
Typewritten
A minimal, lightweight, informative zsh prompt theme
Stars: ✭ 442 (-48.48%)
Mutual labels:  terminal, zsh
Modernish
Modernish is a library for writing robust, portable, readable, and powerful programs for POSIX-based shells and utilities.
Stars: ✭ 586 (-31.7%)
Mutual labels:  zsh, shell-extension
Dotfiles
My personal dotfiles
Stars: ✭ 400 (-53.38%)
Mutual labels:  terminal, zsh
Dstask
Single binary terminal-based TODO manager with git-based sync + markdown notes per task
Stars: ✭ 431 (-49.77%)
Mutual labels:  terminal, zsh
Autoenv
Directory-based environments
Stars: ✭ 4,859 (+466.32%)
Mutual labels:  zsh, shell-extension
History Search Multi Word
Multi-word, syntax highlighted history searching for Zsh
Stars: ✭ 314 (-63.4%)
Mutual labels:  zsh, history
Sultan
Sultan: Command and Rule over your Shell
Stars: ✭ 625 (-27.16%)
Mutual labels:  terminal, zsh
Nord Iterm2
An arctic, north-bluish clean and elegant iTerm2 color scheme.
Stars: ✭ 651 (-24.13%)
Mutual labels:  terminal, zsh
Zsh Histdb
A slightly better history for zsh
Stars: ✭ 801 (-6.64%)
Mutual labels:  zsh, history
Termux Style
Simple script to change color-schemes and fonts for Termux.
Stars: ✭ 400 (-53.38%)
Mutual labels:  terminal, zsh
Cw
The best way to tail AWS CloudWatch Logs from your terminal
Stars: ✭ 368 (-57.11%)
Mutual labels:  terminal, zsh
Funky
Funky takes shell functions to the next level by making them easier to define, more flexible, and more interactive.
Stars: ✭ 434 (-49.42%)
Mutual labels:  terminal, zsh
Nord Dircolors
An arctic, north-bluish clean and elegant dircolors theme.
Stars: ✭ 328 (-61.77%)
Mutual labels:  terminal, zsh
Saws
A supercharged AWS command line interface (CLI).
Stars: ✭ 4,886 (+469.46%)
Mutual labels:  cloud, terminal
Atom One Dark Terminal
A Terminal theme that mimics the One Dark theme made by the Atom team.
Stars: ✭ 890 (+3.73%)
Mutual labels:  terminal, zsh
Resh
Rich Enhanced Shell History - Contextual shell history for zsh and bash
Stars: ✭ 310 (-63.87%)
Mutual labels:  zsh, history
Caporal.js
A full-featured framework for building command line applications (cli) with node.js
Stars: ✭ 3,279 (+282.17%)
Mutual labels:  terminal, zsh
Autocomplete
Autocomplete for terminals on MacOS
Stars: ✭ 569 (-33.68%)
Mutual labels:  terminal, zsh
Bashhub Logo

Bashhub saves every terminal command entered across all sessions and systems and provides powerful querying across all commands.

Build Status GitHub version

Features

  • Super command search by using context about how commands are executed.
    • e.g. the directory, session, system, exit status, etc.
  • Unlimited detailed terminal history stored in the cloud.
  • Support across systems. Access your terminal history from anywhere!
  • Support for Bash and Zsh with a sweet cli for everything.

gif

Quick Install

curl -OL https://bashhub.com/setup && bash setup

For Zsh

curl -OL https://bashhub.com/setup && zsh setup

For Fish

curl -OL https://bashhub.com/setup; and fish setup

Detailed installation instructions can be found at https://github.com/rcaloras/bashhub-client/wiki/Install

Usage

Bashhub can be accessed from the command line in a couple ways:

  • bh for searching
  • bashhub for everything else

It also provides a key binding of ctrl + b for quickly dropping into interactive search.

Search

You can search through your commands in a lot of different ways. Check bh --help for more specifics. By default bh will output the most recently used unique commands to standard out. Adding the -i argument to any bh search will make it interactive. There are also several arguments to pass to filter, query, and get more specific about your searches!

Examples

The last 100 commands you executed anywhere. (100 is default limit without -n)

$ bh

The last 20 files I've grep'd.

$ bh -n 20 "grep"

Find that wget command with interactive search to execute it again :P

$ bh -i "wget github"

Directory-specific Searching

The last commands you executed in this directory.

$ bh -d

The last 10 things you vim'd in this directory

$ bh -d -n 10 "vim"

System-specific Searching

The last 10 curl commands you produced on this system

$ bh -sys -n 10 "curl"

How Search Results are Ordered

By default results are sorted by most recently used, and are unique. This means frequent commands like git status or ls will only appear once in the position they were most recently invoked.

This can be altered by using the -dups command to include duplicates

Your git commands including duplicates.

$ bh -dups "git"

Interactive Search

One of the most useful features is interactive search which is accessed via bh -i or ctrl + b. This is similar to reverse search i.e. ctrl + r. Interactive search drops you into a small menu where you can select a command to run on the command line.

Enter interactive search for all the rsync commands executed in this directory

$ bh -i -d
(bashhub-i-search): rsync

Command Details

From interactive search you can also access detailed information on each command by hitting i or space on any listed command.

Command Details

Bashhub Status

You can get a summary of your user's stats/status by using the status command.

bashhub status

Most of this information is also displayed on the user profile page.

=== Bashhub Status
http://bashhub.com/u/rccola
Total Commands: 94965
Total Sessions: 16400
Total Systems:  18
===
Session PID 15311 Started 9 days ago
Commands In Session: 3
Commands Today: 47

Search with Fuzzy Finder

An efficient way of searching is using bashhub in combination with fzf. Put this in your .bashrc.

function my_alias {
  eval $(bh | fzf)
}

This will make the function available globally in your terminal.

Filtering Commands

You can filter commands from being recorded to Bashhub via a regex set to the environment variable BH_FILTER. These commands will be ignored and omittted from Bashhub.

# Filter out any commands for postgres or ssh
export BH_FILTER="(psql|ssh)"
ssh [email protected] # will not be saved

You can check the configuration of this command via the bashhub filter subcommand.

# Check if a command is filtered by my regex
export BH_FILTER="(-p)"
bashhub filter "mysql -u root -p plain-text-password"
BH_FILTER=(-p)
mysql -u root -p plain-text-password
Is Filtered. Matched ['-p']

Disabling Recording Commands

You can turn on/off recording to Bashhub via bashhub on and bashhub off. By default this only affects the current bash session.

$ bashhub off
$ echo "Recording is now disabled for this session. This command won't be saved."
....
$ bashhub on
$ echo "Recording commands is now re-enabled"

You can disable for all sessions by setting bashhub off --global this sets save_commands = False in your bashhub config.

Ignoring Commands

#ignore added to any command will omit it from being saved. Simply add it to the end of any command and it won't be recorded in Bashhub.

$ echo "this command won't be saved" #ignore

Deleting Commands

You can delete commands from Bashhub through interactive search by pressing Delete or Backspace while a command is highlighted. A small dialog box will open to confirm the commands deletion. If a command is deleted, it is permanently removed from Bashhub.

gif

Feature Requests, Bugs, and Issues

Feel free to post in: https://github.com/rcaloras/bashhub-client/issues

You can also get support and follow updates @Bashhub on Twitter.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].