• Stars
    star
    589
  • Rank 75,909 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created about 9 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Meta CLI toolkit : Personal shell command keeper and snippets manager

logo

logo

PyPI PyPI - Downloads

A Meta CLI toolkit

Your personal shell command keeper

Why?

Writwick Wraj loves using the command line.

Writwick googles "How to do X in terminal?" and multiple forums and blog posts finally provide him the magical command for the rescue. Problem Solved !

Fast forward couple weeks, Writwick has to do X in terminal, again. Wraj remembers solving this few weeks ago. Let him do a reverse-i-search with Ctrl+R. Nope, can't remember sh*t. Browser search history? 25 web pages found matching X. Argh!

Writwik finally finds the solution. From this time Writwik starts writing the commands somewhere online for the future.

Wait, why shouldn't he keep the command in his terminal itself if this is only place where he'll ever have use it?

Features

  • Save a new command with a brief description
  • Search the saved commands using powerful patterns
  • Save the commands as a secret GitHub gist
  • Use keep push and keep pull to sync the commands between GitHub gist and other computers.

ProTip : Save the commands you usually forget in ssh sessions and sync it with your local machine.

Installation

$ pip3 install keep

Use Python 3.6 or later.

You can install pip3 using apt-get as sudo apt install python3-pip.

Usage

Usage: keep [OPTIONS] COMMAND [ARGS]...

  Keep and view shell commands in terminal only.

  Read more at https://github.com/orkohunter/keep

Options:
  -v, --verbose  Enables verbose mode.
  --help         Show this message and exit.

Commands:
  edit          Edit a saved command.
  github_token  Register a GitHub Token to use GitHub Gists as a backup.
  grep          Searches for a saved command.
  init          Initializes the CLI.
  list          Shows the saved commands.
  new           Saves a new command.
  pull          Pull commands from saved GitHub gist.
  push          Push commands to a secret GitHub gist.
  rm            Deletes a saved command.
  run           Executes a saved command.
  update        Check for an update of Keep.

See the detailed usage and tutorial.

Command-line Completion

To enable command-line completion (TAB completion) follow these steps for the shell of your choice

bash

  1. Create a directory in your home directory called .bash

     mkdir -p $HOME/.bash
    
  2. Copy completion/keep.bash to $HOME/.bash/keep

     curl -SLo "$HOME/.bash/keep" "https://raw.githubusercontent.com/OrkoHunter/keep/master/completions/keep.bash"
    
  3. Add the following lines to $HOME/.bashrc file

     [ -f "$HOME/.bash/keep" ] && . "$HOME/.bash/keep"
    

zsh

  1. Create a directory in your home called .zsh

     mkdir -p $HOME/.zsh
    
  2. Copy completion/keep.zsh to $HOME/.zsh/_keep

     curl -SLo "$HOME/.zsh/_keep" "https://raw.githubusercontent.com/OrkoHunter/keep/master/completions/keep.zsh"
    
  3. Add the following lines inside $HOME/.zshrc file

     fpath=($HOME/.zsh $fpath)
     autoload -Uz compinit && compinit
    

Contribute

This is a very young project. If you have got any suggestions for new features or improvements, please comment over here. Pull Requests are most welcome !


Not a command line fanatic? Here are some resources for you :

More Repositories

1

pep8speaks

A GitHub :octocat: app to automatically review Python code style over Pull Requests
Python
584
star
2

python-easter-eggs

Curated list of all the easter eggs and hidden jokes in Python
423
star
3

ping-me

A cross platform personalized Ping
Python
192
star
4

gsoc-FAQs

An unofficial Google Summer of Code Frequently Asked Questions
111
star
5

Muriel

An electron app to binge-watch anything, without being bored
JavaScript
56
star
6

Minesweeper

🎲 The Game, as the name suggests
Java
26
star
7

PotterScript

/x/pel/e/r/mus
Python
14
star
8

depends

[Unmaintained] Analyze dependencies of Python libraries
Python
13
star
9

KOSS-Python-classes

Introduction to Programming with Python (and basic Open Source Software Development principles)
Jupyter Notebook
9
star
10

mfdf

A collection of My Favorite Daily Fortunes
Shell
7
star
11

orkohunter

Website and Blog (Himanshu Mishra)
JavaScript
7
star
12

MLinProduction

Making Machine Learning easy in production
Python
6
star
13

nxcpy

A NetworkX addon written in C
C
6
star
14

dctrends

/kgp/gonewild | See also https://github.com/OrkoHunter/dc-audio
Python
5
star
15

source_code_ktj

Reverse engineer the executables | Source Code event | Kshitij
Python
5
star
16

slides

Personal slides for public talks and demos
CSS
4
star
17

notify-on-broken-links

A GitHub app that keeps watching your repository for broken links and creates an issue if one is found
3
star
18

VectorEntry-Keyboard

VectorEntry Text Entry Mechanism | MTP Project
Java
3
star
19

test-pep8speaks

Testing the bot @pep8speaks and the app
Python
2
star
20

VectorEntry

Text Entry mechanism for blind people using handheld devices
Java
2
star
21

unnati

Codefundo++ idea
2
star
22

monitor-urls

A URL monitoring service in node js
JavaScript
2
star
23

dc-audio

Listen to the melody created by your DC network
JavaScript
2
star
24

mokita-frontend

https://github.com/nishnik/mokita-backend
CSS
2
star
25

orc

C
1
star
26

ping-me-tornado

Repository for ping-me server running on tornado
Python
1
star
27

jio-hackathon-backend

Backend for jio hackathon app - farmer's marketplace
Python
1
star
28

pep8speaks.org

Website of PEP 8 Speaks
HTML
1
star
29

ping-me-extension

Chrome extension for ping-me (https://github.com/orkohunter/ping-me)
JavaScript
1
star
30

notebooks

Collection of personal IPython notebooks | Feedback :
Jupyter Notebook
1
star
31

github.monitor

A minimalistic react native app using GitHub API for learning purposes
JavaScript
1
star