Provide bash client to integrate site into cli
This way, from a bash prompt, I could search for a command using tags or keywords and when I found the one I wanted, be able to edit or run it.
The flip side would be to have a way to quickly take a command you just ran and save it to the site.
8 comments
-
Samir Ahmed
commented
http://samirahmed.github.com/fu/
is a commandline client for the site
-
Rodney Gomes
commented
Here is my first attempt at the CLI tool written in Python 3... any feedback is welcome just report bugs, enhancements for the github project at: https://github.com/rlgomes/clifu
Currently it just does a simple search through either matching or tag search based on the API described here: http://www.commandlinefu.com/site/api but I want to be able to also have an easy way to add new commands to your account from the command line as well as possibly opening commandlinefu webiste directly in your browser for the term you wanted... we shall see what others upvote
-
Rodney Gomes
commented
I'm interested in creating this CLI tool that would be useful for me to look up and share commands whenever something useful is actually found. I'm wondering if anyone has a language preference as I was thinking of just writing this up in python, since it would be very portable and easier to maintain in the long run.
-
Mark
commented
Any progress on submitting commands?
-
me
commented
#!/bin/bash
if [[ -z $1 ]]; then
echo "Pass query as an argument"
exit 1
fi
query=$1
base64=`perl -MMIME::Base64 -e "print encode_base64($1);"`
curl "http://www.commandlinefu.com/commands/matching/$query/$base64/sort-by-votes/plaintext" | less -
I am working on an API for commandlinefu that will return results in plaintext so they are easily greppable. This should make it easy a client to be written for any shell.
-
grep
commented
PLEASE - PLEASE - PLEASE
make this shell agnostic (POSIX compliant - runnable using sh - not bash)
!!!!! -
Trevor Bergeron
commented
This could be used to both retrieve, submit, and save commands locally.
$ clf --help
CommandLineFu.com
-f "searchterms" Finds a command on the CLF site
-h Help (this)
-n "command" Creates a New command on the site. Interactive. User/Pass must be configured.
-r "command bit" Retrieves a locally saved command
-s "command" Saves a command for later use with -r