Skip to main content

Command line tool to search snippets on

Project description is the place to record awesome command-line snippets. This tool allows you to search and view the results into your terminal.

Example 1

$ clf python server

  # python smtp server
  python -m smtpd -n -c DebuggingServer localhost:1025

  # Python version 3: Serve current directory tree at http://$HOSTNAME:8000/
  python -m http.server

  # Start a HTTP server which serves Python docs
  pydoc -p 8888 & gnome-open http://localhost:8888

  # put current directory in LAN quickly
  python -m SimpleHTTPServer

  # An alternative to: python -m SimpleHTTPServer for Arch Linux
  python3 -m http.server

Example 2

$ clf recursive line count

  # Recursive Line Count
  find ./ -not -type d | xargs wc -l | cut -c 1-8 | awk '{total += $1} END {print total}'

  # Recursive Line Count
  find * -type f -not -name ".*" | xargs wc -l

  # Get Total Line Count Of All Files In Subdirectory (Recursive)
  find . -type f -name "*.*" -exec cat {} > totalLines 2> /dev/null \; && wc -l totalLines && rm totalLines

  # Recursive Line Count
  wc -l `find . -name *.php`


The tool works with Python 2 and Python 3. It can be installed with Pip :

pip install clf


Command line tool to search snippets on

  clf --browse [options]
  clf <command> [options]
  clf <keyword> <keyword>... [options]

  -h, --help     Show this help.
  -v, --version  Show version.
  -c, --color    Enable colorized output.
  -b, --browse   Browse the archive.
  --order=ORDER  The order output (votes|date) [default: votes].
  --proxy=PROXY  The proxy used to perform requests.

  clf tar
  clf python server
  clf tar --proxy=
  clf --browse --order=date


  • You can set the CLF_COLOR environment variable to enable the colorized output by default.
  • You can import the clf module and use it in your own scripts :
>>> from clf import Clf
>>> c = Clf()
>>> for cmd in c.browse():
>>>     print(cmd.summary)
>>>     print(cmd.command)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for clf, version 0.5.7
Filename, size File type Python version Upload date Hashes
Filename, size clf-0.5.7.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page