360 Secure SkillHub
360 安全技能中心

Reddit Cli

reddit-cli 是基于 Node.js 的命令行工具,通过 REDDIT_SESSION/token_v2 Cookie 认证访问 Reddit(无需 API key),支持获取 subreddit 帖子(hot/new/top/rising)、全站或版块内搜索、查询版块信息与连接检测;仅供个人使用,Cookie 过期需刷新。

分类:搜索
kelsia14
kelsia14
热度 58.15
最近更新 2026-05-11 15:50:52

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add kelsia14/reddit-cli
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
reddit-cli
version
1.0.2
description
Reddit CLI using cookies for authentication. Read posts, search, and get subreddit info.
author
kelsia14

Reddit CLI

Read Reddit using your session cookies. No API key needed.

Quick start

reddit-cli posts programming 10       # Get 10 hot posts
reddit-cli posts gaming 5 top         # Get top 5 posts
reddit-cli search "python tutorial"   # Search all Reddit
reddit-cli search "help" --sub linux  # Search in subreddit
reddit-cli info AskReddit             # Subreddit info
reddit-cli check                      # Test connection

Commands

Get posts from subreddit

reddit-cli posts <subreddit> [limit] [sort]
  • limit: number of posts (default: 10)
  • sort: hot, new, top, rising (default: hot)

Search Reddit

reddit-cli search <query> [--sub <subreddit>] [limit]

Get subreddit info

reddit-cli info <subreddit>

Check connection

reddit-cli check

Environment

Set these in ~/.bashrc:

export REDDIT_SESSION="your_reddit_session_cookie"
export TOKEN_V2="your_token_v2_cookie"  # optional

Getting cookies

  1. Go to reddit.com (logged in)
  2. DevTools (F12) → Application → Cookies → reddit.com
  3. Copy reddit_session value
  4. Optionally copy token_v2 value

Notes

  • Cookies expire, you may need to refresh them periodically
  • Respects Reddit's rate limits
  • For personal use only