Skip to main content
3 of 7
added 2 characters in body
ᔕᖺᘎᕊ
  • 4.4k
  • 2
  • 16
  • 37

Stack overflow CLI

This post is to inform you that i had created a stack overflow command line interface. I need your comments and suggestions...

See the GitHub link for more info: https://github.com/gautamkrishnar/socli

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

SoCLI in action

Usage

Quick search

Just use socli command followed by the search query:

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 chosen 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 prototype function

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

Topic based search

Stack overflow supports topic by using tags. socli allows you to query stack overflow based on specific tags. Just specify the tag via the following command:

socli -t javascript -q window.open

You can also specify multiple tags, Just separate them with a comma:

socli -t javascript,node.js -q window.open

See the complete list of tags here.

New question

If you can't find an answer for your question in stack overflow, socli allows you to create a new question via the web browser. Just type the command below and socli will open the new question page of stack overflow in the web browser for you:

socli -n

Syntax:

socli has the following syntax

Usage: socli [ Arguments] < Search Query >
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
  • Tag support
  • Can open the page in a browser
  • Can create a new question via the web browser