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, lessons, threads, and comments without leaving the terminal.
Features
- Courses: list all enrolled courses
- Lessons: list course lessons and inspect lesson slides
- Lesson read automation: read matching lessons and push their slide status forward
- 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
Agent Skill
Install the agent skill with the shared skills CLI spec:
npx skills add https://github.com/bunizao/edstem-cli
If you already installed edstem, the CLI exposes the same thing as a thin alias:
edstem skills add
If npx is not available, the alias falls back to npm exec.
Install from source:
git clone https://github.com/bunizao/edstem-cli.git
cd edstem-cli
uv sync
Update
Update the CLI in place:
edstem update
If you installed from source, update the checkout instead:
git pull
uv sync
Running an older version? Check with
edstem --versionfirst. If a command in this README does not exist locally, update the CLI before trying again.
Quick Start
Get your API token from: https://edstem.org/settings/api-tokens
# View your profile and courses
edstem user
# List enrolled courses
edstem courses
# List threads in a course
edstem threads 12345
# List lessons in a course
edstem lessons 12345
# View a thread with comments
edstem thread 67890
Usage
# Courses
edstem courses
edstem courses --archived
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
# Lessons
edstem lessons <course_id>
edstem lessons <course_id> --module "Week 1"
edstem lessons <course_id> --type python --status attempted
edstem lesson <lesson_id>
edstem lesson <lesson_id> --json
edstem lessons read <course_id> Pre-Reading
edstem lessons read <course_id> Week 3 Workshop
# Activity
edstem activity # all courses
edstem activity <course_id> # specific course
edstem activity --filter answer --json
# User
edstem user
edstem user --json
# Option 1: Environment variable
export ED_API_TOKEN="your-token-here"
# Option 2: Will prompt on first use and save automatically
edstem user
Mark Lessons Read
Use lessons read when you want the CLI to visit lessons and push their slide status forward.
Query words are matched case-insensitively against lesson titles and module names.
For non-quiz slides the CLI calls the lesson completion endpoint. For quiz slides it records a view.
# Mark all pre-reading lessons in a course as read
edstem lessons read 29579 Pre-Reading
# Mark week 1 applied/workshop content as read
edstem lessons read 29579 Week 1 Workshop
edstem lessons read 29579 Week 1 Applied
# Add a delay between slide actions
edstem lessons read 29579 Applied --delay 0.3
# Export a machine-readable summary
edstem lessons read 29579 Pre-Reading --json
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
Acknowledgements
This project builds on ideas and structure from
twitter-cli.
Thanks to the original project for the foundation and inspiration.
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.3.1.tar.gz.
File metadata
- Download URL: edstem_cli-0.3.1.tar.gz
- Upload date:
- Size: 77.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72f6ecd7bb4fe3924b4b468a9614c117c59266f42ce01b139f6b61ac778c4214
|
|
| MD5 |
cd6250c39b5ff376222b4ab514e92cf3
|
|
| BLAKE2b-256 |
e1621aee9d46c68aa681f24297cc87189370d71ebc5cd7ac464aa8b65ca759b8
|
Provenance
The following attestation bundles were made for edstem_cli-0.3.1.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.3.1.tar.gz -
Subject digest:
72f6ecd7bb4fe3924b4b468a9614c117c59266f42ce01b139f6b61ac778c4214 - Sigstore transparency entry: 1338866785
- Sigstore integration time:
-
Permalink:
bunizao/edstem-cli@a4387e15a916392886bdac52d9b5f252c7e1a5d5 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/bunizao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a4387e15a916392886bdac52d9b5f252c7e1a5d5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file edstem_cli-0.3.1-py3-none-any.whl.
File metadata
- Download URL: edstem_cli-0.3.1-py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
438790fa22158743e3132143935ee83eac8a37c79267bf418750c55ac945fcac
|
|
| MD5 |
53578f8a97a5f4dc09cddbcba6b0d993
|
|
| BLAKE2b-256 |
bc2d9cab580041cf559f20c413d565ff1ea597c27667af6624feac53b53ad6e8
|
Provenance
The following attestation bundles were made for edstem_cli-0.3.1-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.3.1-py3-none-any.whl -
Subject digest:
438790fa22158743e3132143935ee83eac8a37c79267bf418750c55ac945fcac - Sigstore transparency entry: 1338866833
- Sigstore integration time:
-
Permalink:
bunizao/edstem-cli@a4387e15a916392886bdac52d9b5f252c7e1a5d5 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/bunizao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a4387e15a916392886bdac52d9b5f252c7e1a5d5 -
Trigger Event:
push
-
Statement type: