A CLI for Ed Discussion — browse courses, threads, and comments in terminal
Project description
edstem-cli
A terminal-first CLI for Ed Discussion: browse courses, threads, and comments without leaving the terminal.
Features
- Courses: list all enrolled courses
- Threads: list, filter, and sort course threads
- Thread detail: view full thread with answers and comment tree
- Activity: browse your activity across courses
- User profile: view current user info
- JSON output: export any data for scripting and AI agent integration
AI Agent Tip: Always use
--jsonfor structured output instead of parsing the default rich-text display. Use--maxto limit results.
Installation
# Recommended: uv tool (fast, isolated)
uv tool install edstem-cli
# Alternative: pipx
pipx install edstem-cli
Install from source:
git clone https://github.com/bunizao/edstem-cli.git
cd edstem-cli
uv sync
Quick Start
# View your profile and courses
edstem user
# List enrolled courses
edstem courses
# List threads in a course
edstem threads 12345
# View a thread with comments
edstem thread 67890
Usage
# Courses
edstem courses
edstem courses --json
# Threads
edstem threads <course_id>
edstem threads <course_id> --sort top
edstem threads <course_id> --category "HW1"
edstem threads <course_id> --type question
edstem threads <course_id> --unanswered
edstem threads <course_id> --max 50 --json
# Thread detail
edstem thread <thread_id>
edstem thread <course_id>#<number> # by course thread number
edstem thread <thread_id> --json
# Activity
edstem activity # all courses
edstem activity <course_id> # specific course
edstem activity --filter answer --json
# User
edstem user
edstem user --json
Authentication
edstem-cli uses this auth priority:
- Environment variable:
ED_API_TOKEN - Token file:
~/.config/edstem-cli/token - Interactive prompt: asks for token and saves to file
Get your API token from: https://edstem.org/us/settings/api-tokens
# Option 1: Environment variable
export ED_API_TOKEN="your-token-here"
# Option 2: Will prompt on first use and save automatically
edstem user
Configuration
Create config.yaml in your working directory:
fetch:
count: 30
rateLimit:
requestDelay: 1.0
maxRetries: 3
retryBaseDelay: 3.0
maxCount: 100
fetch.countis the default item count when--maxis omitted
Development
# Install dev dependencies
uv sync --extra dev
# Lint + tests
uv run ruff check .
uv run pytest -q
Release
Push a version tag such as v0.1.0 to trigger the release workflows.
CIruns lint, tests, and package validationPublish GitHub Releasecreates a GitHub release and uploads the wheel and sdistPublish to PyPIuploads the package to PyPI through trusted publishing
Acknowledgements
This project builds on ideas and structure from
twitter-cli.
Thanks to the original project for the foundation and inspiration.
Project Structure
edstem_cli/
├── __init__.py
├── cli.py
├── client.py
├── auth.py
├── config.py
├── constants.py
├── filter.py
├── formatter.py
├── serialization.py
└── models.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file edstem_cli-0.1.0.tar.gz.
File metadata
- Download URL: edstem_cli-0.1.0.tar.gz
- Upload date:
- Size: 57.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04254f7ef7ed94c5c301facf740b4baea71a5389df9676427d561664999e08f2
|
|
| MD5 |
a6f195aa07090099f0b0de98460304b6
|
|
| BLAKE2b-256 |
d4d196022f381df8163c833dbac99d8f3f645943a88a5643375b12657e50bfb9
|
Provenance
The following attestation bundles were made for edstem_cli-0.1.0.tar.gz:
Publisher:
publish.yml on bunizao/edstem-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
edstem_cli-0.1.0.tar.gz -
Subject digest:
04254f7ef7ed94c5c301facf740b4baea71a5389df9676427d561664999e08f2 - Sigstore transparency entry: 1075724946
- Sigstore integration time:
-
Permalink:
bunizao/edstem-cli@08da129ecc1271becf3e05c704c0cffcfada150c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/bunizao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@08da129ecc1271becf3e05c704c0cffcfada150c -
Trigger Event:
push
-
Statement type:
File details
Details for the file edstem_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: edstem_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e287c691bcf4aaafe8e2e40d58c9c0bad566cec0d34e944d9d5d8dbae677cf83
|
|
| MD5 |
56ac6704d0e57c941d0847bc53029542
|
|
| BLAKE2b-256 |
c6380f9fa7e2aa302b59dee33e78ed0485bf9e89ef6a35b605a3da354d9fcdb6
|
Provenance
The following attestation bundles were made for edstem_cli-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on bunizao/edstem-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
edstem_cli-0.1.0-py3-none-any.whl -
Subject digest:
e287c691bcf4aaafe8e2e40d58c9c0bad566cec0d34e944d9d5d8dbae677cf83 - Sigstore transparency entry: 1075724983
- Sigstore integration time:
-
Permalink:
bunizao/edstem-cli@08da129ecc1271becf3e05c704c0cffcfada150c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/bunizao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@08da129ecc1271becf3e05c704c0cffcfada150c -
Trigger Event:
push
-
Statement type: