Skip to content

Stack overflow command line client. Search and browse stack overflow without leaving the terminal.

License

Notifications You must be signed in to change notification settings

pliniosilveira/socli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SoCLI

Stack overflow command line stack overflow client written in python. Using SoCLI you can search and browse stack overflow without leaving the terminal. Just use the socli command:

socli in action

Installation

Supported platforms
  • Linux
  • Windows
  • Mac
Requirements
  • python 3+ :
For Linux

Install python3 and just use pip command to install socli:

sudo apt-get install python3 python3-pip
sudo pip3 install socli
For Windows

Download and install python 3. Dont forget to check the option "Add to path".

Open a command prompt with administrative privileges and use pip command to install socli:

pip3 install socli

Use easy_install if your python path have a space in it Read more:"Failed to create process":

easy_install socli
For Mac (via homebrew)

Install python3 and socli:

brew install python3 python3-pip
pip3 install socli

Updating

Use the command below to update your existing version of socli to the newest version, so that you won't miss any features:

sudo pip install --upgrade socli

Usage

Quick search

Just use socli command followed by the search query:

socli for loop in python syntax

The above command will search for the query "for loop in python syntax" and displays the first most voted question in stack overflow with its most voted answer. Pretty quick, right?

Interactive search

You can search the stack overflow interactively by using the command below:

socli -iq html error 404

This will display a list of questions from stack overflow for the query "html error 404" and it will allow you to choose any of the question you like interactively. When you chose a question, it will display the complete description of the chosed question with its most voted answer. Now you can browse through all the answers of that questions on stack overflow interactively.

Manual search

This will allow you to choose a question number for example:

socli -r 2 -q javascript porotype function

Will search for "javascript porotype function" in stack overflow and displays the second question that contains it.

Syntax:

socli has the following syntax

Usage: socli [ Arguments] < Search Query >
Arguments (optional)
Short Long Description Example
-q --query Used to specify the query when arguments are used. A query value must be passed to it. If it is used alone (socli -q query) then it will display the same result as "socli query". socli -i -q query
-i --interactive Used to search interactively. It doesnt take any values. It must be followed by a -q or --query after it. socli -i -q query
-r --res Used for manual search. It takes the question number as the argument and it must be followed by a -q or --query after it. socli -r 4 -q query
-h --help Displays the help text. socli --help
Query

It refers to query to search in stack overflow.

Features

These are the amazing features of socli:

  • Manual Search
  • Interactively browse stack overflow using the interactive mode
  • Coloured interface
  • Question stats view
  • Can open the page in a browser

Contributing

If you are willing to contribute to SoCLI project, You are awesome! Just follow the steps below:

  1. Fork it!
  2. Make a local clone:
git clone https://github.com/{YOUR_USERNAME}/socli.git
  1. Switch to the directory: cd socli
  2. Create your new branch: git checkout -b feature name
  3. Make necessary changes to this source code
  4. Add changes to git index by using git add --all .
  5. Commit your changes: git commit -am 'Added new feature'
  6. Push to the branch: git push
  7. Submit a new pull request 😄

Todo

  • Make interface more formatted
  • Allow posting to stackoverflow using cli (I am not sure whether we can implement it!)

Contributors

Special thanks to these superheroes:

  • @Killbee for making SoCLI colorful
  • Sam Dean for adding Macintosh SoCLI installation instructions

Bugs

If you are experiencing any bugs, don’t forget to open a new issue.

Mentions

Special thanks to people who wrote about SoCLI on their blogs and websites:

Liked it?

Hope you liked this project, don't forget to give it a star ⭐

About

Stack overflow command line client. Search and browse stack overflow without leaving the terminal.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%