Skip to main content

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 :

Metadata

Release files for keep 2.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for keep 2.11
File Size Uploaded Provenance
keep-2.11.tar.gz 12.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for keep 2.11
File Interpreter ABI Platform
keep-2.11-py3-none-any.whl Python 3 none any Details

Total release size: 28.5 kB

Release files / keep-2.11.tar.gz

Download URL keep-2.11.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
06bc2fbbf65ebebf2c384dca0306a40c3cd531cd95a05c486f5a2b5c07acd94d
BLAKE2b-256 checksum
How to use checksums
602bcff99a6e90eb54f88ea4f96395a788dce3167b95b5e2a93642f16d8a10e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.7

Release files / keep-2.11-py3-none-any.whl

Download URL keep-2.11-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32016f7cf26b3cd55714f70a4271e187e879fc7d9484ca43a3060a6b68a54452
BLAKE2b-256 checksum
How to use checksums
a21db6231709f903198aa65ef30c21f58a33ef01eeeb963188b89c25e8c76de8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.7

Security for keep 2.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page