turbot/reddit

GitHub
steampipe plugin install redditsteampipe plugin install reddit

Reddit + Steampipe

Steampipe is an open source CLI to instantly query cloud APIs using SQL.

Reddit is an American social news aggregation, web content rating, and discussion website.

Example query:

select
subreddit_name_prefixed,
name,
title,
score,
upvote_ratio
from
reddit_my_post
order by
rank;
+-------------------------+-----------+---------------------------------------+-------+--------------------+
| subreddit_name_prefixed | name | title | score | upvote_ratio |
+-------------------------+-----------+---------------------------------------+-------+--------------------+
| r/netsec | t3_q7llj8 | Open source automated NIST SP 800-53… | 146 | 0.949999988079071 |
| r/aws | t3_q1nwoz | What's your oldest S3 bucket? | 77 | 0.949999988079071 |
| r/netsec | t3_ot1kwy | Use SQL to query AbuseIPDB deny list… | 55 | 0.8899999856948853 |
| r/gitlab | t3_ot0tzw | New open source tool to query GitLab… | 31 | 0.9700000286102295 |
| r/blueteamsec | t3_q7lo6l | Open source automated NIST SP 800-53… | 25 | 0.9200000166893005 |
+-------------------------+-----------+---------------------------------------+-------+--------------------+

Documentation

Get started

Install

Download and install the latest Reddit plugin:

steampipe plugin install reddit

Configuration

Installing the latest reddit plugin will create a config file (~/.steampipe/config/reddit.spc) with a single connection named reddit:

connection "reddit" {
plugin = "reddit"
client_id = "aoxJBaKh9W_wnNLKzJhxSw"
client_secret = "P51-fNlprSkGcqdkQzogJ_noqcktis"
username = "jane"
password = "Pa$$w0rd"
}

Create a Reddit app to get your settings:

  • client_id - Client ID for your Reddit app.
  • client_secret - Client secret for your Reddit app.
  • username - Your username.
  • password - Your password.

Environment variables are also available as an alternate configuration method:

  • REDDIT_CLIENT_ID
  • REDDIT_CLIENT_SECRET
  • REDDIT_USERNAME
  • REDDIT_PASSWORD

Get involved