CLI tool for interacting with TheKey LMS platform API.
bun install
bun linkAfter bun link, the thekey command is available globally.
# Login (interactive)
thekey auth login
# Login with flags
thekey auth login --email user@example.com --password secret
# Check auth status
thekey auth status
# View profile
thekey auth me
# Logout
thekey auth logoutthekey courses list
thekey courses get <id>
thekey courses get <id> --full
thekey courses create --name "My Course"
thekey courses chapters <courseId>
thekey courses classrooms <courseId>
thekey courses stats <courseId>thekey assignments list
thekey assignments list --course <courseId>
thekey assignments get <id>
thekey assignments create --course <courseId> --name "Midterm"
thekey assignments content <courseId>
thekey assignments students <assignmentId>
thekey assignments in-progressthekey students list <courseId> <classroomId>
thekey students enroll --course <courseId> --emails "a@test.com,b@test.com"
thekey students progress <studentId>
thekey students assignments <studentId>
thekey students learning <studentId>
thekey students analyticsthekey quizzes start <objectiveId>
thekey quizzes submit <attemptId>
thekey quizzes complete <attemptId>
thekey quizzes questions <attemptId>
thekey quizzes eligibility <objectiveId>
thekey quizzes status <objectiveId>
thekey quizzes hint <questionId>thekey gradebook summary <classroomId>
thekey gradebook performance <classroomId>
thekey gradebook export <classroomId>
thekey gradebook student <studentId>
thekey gradebook flags <studentId>
thekey gradebook time <studentId>thekey community feed
thekey community posts
thekey community my-posts
thekey community create-post --content "Hello!"
thekey community leaderboard
thekey community top-performers
thekey community my-position
thekey community achievements
thekey community badges <userId>
thekey community categories
thekey community trendingthekey notifications list
thekey notifications count
thekey notifications read
thekey notifications read --ids "1,2,3"
thekey notifications clear
thekey notifications preferencesthekey ai questions generate <planId>
thekey ai questions plan <planId>
thekey ai questions list <planId>
thekey ai questions approve <planId>
thekey ai questions export <planId>
thekey ai outline get <sessionId>
thekey ai health# GET request
thekey api get /auth/protected/me
# POST request
thekey api post /some/endpoint --data '{"key": "value"}'
# PATCH request
thekey api patch /some/endpoint --data '{"key": "value"}'
# DELETE request
thekey api delete /some/endpoint
# PUT request
thekey api put /some/endpoint --data '{"key": "value"}'
# GET with query parameters
thekey api get /some/endpoint -q page=1 -q limit=10# JSON (default)
thekey courses list
# Table format
thekey --format table courses listAuth tokens are stored at ~/.config/thekey/auth.json.
Default: https://dev.api.thekey.sa