pi-reddit
Read-only Reddit access for pi: Search, read posts, read comments
Package details
Install pi-reddit from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-reddit- Package
pi-reddit- Version
0.1.1- Published
- Oct 17, 2026
- Downloads
- 240/mo · 12/wk
- Author
- eliaskg
- License
- MIT
- Types
- extension
- Size
- 40.7 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-reddit
Read-only Reddit tools for Pi. The extension exposes three tools:
reddit-search: keyword search across Reddit or inside subreddits.reddit-top: top posts of a subreddit.reddit-post: one post with its comment tree.
The tools use the official Reddit API with script-app credentials. They never write.
Install
pi install npm:pi-reddit
Restart Pi after installation.
Setup
Create ~/.pi/agent/reddit.json:
{
"client_id": "your-script-app-id",
"client_secret": "your-script-app-secret"
}
Create the credentials at https://www.reddit.com/prefs/apps as a "script" app.
All other settings are optional. Defaults apply when a key is missing:
{
"userAgent": "pi-agent:pi-reddit:1.0 (by /u/yourname)",
"limits": {
"searchSelftextChars": 300,
"postSelftextChars": 2000,
"commentBodyChars": 1000,
"defaultComments": 20,
"maxComments": 50,
"defaultLimit": 10
}
}
Environment variables override the file credentials:
REDDIT_CLIENT_IDREDDIT_CLIENT_SECRET
Examples
Search:
Search reddit for the best way to run llama.cpp on Linux.
Search reddit for the most capable local LLMs, last week only.
Top posts:
Show the top posts in r/programming this month.
What were the most discussed posts in r/programming last year?
Compare opinions:
Search r/LocalLLaMA for reactions to new model releases. Summarize pros and cons from the comments.
Rate limits
The client keeps at least one second between requests. On HTTP 429 it waits for the Retry-After value once, then errors. Access tokens are cached and refreshed once on HTTP 401.