@lukeguo12210/canvas-cli 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,57 +2,57 @@
2
2
 
3
3
  [![License: BUSL-1.1](https://img.shields.io/badge/License-BUSL--1.1-yellow.svg)](LICENSE)
4
4
 
5
- Canvas CLI for technical students and AI agents.
5
+ Connect Canvas courses to AI agents.
6
6
 
7
- `@lukeguo12210/canvas-cli` turns Canvas LMS into a local, scriptable, agent-readable workspace. It is built for students who already live in terminals, editors, notebooks, and AI coding tools. Use the `canvas` command directly, or install the bundled skills so Codex, Claude Code, and other local agents can authenticate, understand your courses, pull materials, inspect upcoming work, and build review packs.
7
+ `@lukeguo12210/canvas-cli` turns Canvas LMS into an agent-readable course workspace. Today, students dig through Canvas, download slides, find assignments, copy pages, and upload everything back into LLMs. Canvas CLI makes that one workflow: pull course materials, modules, files, assignments, pages, folders, and review packs into a structure AI agents can immediately understand.
8
8
 
9
9
  [Install](#installation--quick-start) · [Agent Skills](#agent-skills) · [Auth](#authentication) · [Commands](#command-system) · [Security](#security--privacy) · [License](#license) · [Roadmap](#roadmap)
10
10
 
11
11
  ## Why @lukeguo12210/canvas-cli?
12
12
 
13
- - **Built for technical students** — bring Canvas into your terminal, scripts, and local AI workflow.
13
+ - **Built for technical students** — bring Canvas into your terminal, scripts, and AI workflow.
14
14
  - **Agent-native design** — structured skills teach agents Canvas auth, pagination, course structure, and study workflows.
15
- - **Course context in minutes** — after login, the CLI gathers who you are, what courses you are taking, and where you are in the semester.
16
- - **Review-pack first** — export modules, pages, assignments, files, discussions, announcements, and calendar context into a structured local course folder.
15
+ - **No more manual Canvas digging** — pull slides, files, pages, assignments, folders, and module structure without download/upload loops.
16
+ - **Review-pack first** — export course structure into an agent-readable folder for study sessions.
17
17
  - **Canvas-native commands** — simple commands such as `canvas courses list`, `canvas modules list`, and `canvas review pack`.
18
- - **Local-first control** — personal access tokens stay local, and course exports are written to directories you choose.
18
+ - **Student-facing scope** — starts with the read-only course surface students need for review, planning, and coursework navigation.
19
19
 
20
20
  ## Features
21
21
 
22
22
  | Category | Capabilities |
23
23
  | --- | --- |
24
24
  | Auth | Interactive `canvas auth login`, school picker, Canvas settings walkthrough, local PAT config |
25
- | Context | Post-login context bootstrap: user profile, active courses, planner, calendar, upcoming assignments, modules |
26
25
  | Courses | List, search, inspect, and summarize active courses |
26
+ | Tabs | Inspect visible Canvas course tabs and external tool links |
27
27
  | Modules | Traverse modules and module items in Canvas order |
28
- | Pages | Fetch pages and export Canvas HTML to Markdown |
28
+ | Pages | List pages, inspect Canvas HTML, and export visible pages |
29
29
  | Files | List files/folders and download accessible course files safely |
30
- | Assignments | List assignments, due dates, descriptions, visible attachments, and assignment groups |
31
- | Calendar | Pull calendar, planner, and todo context for the semester |
32
- | Discussions | Inspect discussion prompts and announcements where visible |
33
- | Review Packs | Preserve Canvas course structure in an agent-readable local export |
34
- | Agent Skills | Lark-style skills for Codex, Claude Code, and other local agents |
30
+ | Folders | Browse Canvas folder trees and folder paths |
31
+ | Assignments | List assignments, due dates, descriptions, visible attachments, and exports |
32
+ | Raw API | Run read-only `GET` requests against Canvas API paths |
33
+ | Review Packs | Preserve Canvas course structure in an agent-readable export |
34
+ | Agent Skills | Skills that teach agents exact commands, output shapes, and Canvas workflows |
35
35
 
36
36
  ## Status
37
37
 
38
- Early scaffold.
38
+ Student read-only MVP in progress.
39
39
 
40
40
  Implemented:
41
41
 
42
- - TypeScript/Node package scaffold.
43
- - `canvas --help` and `canvas version`.
44
- - Core runtime utilities for output envelopes, redaction, config paths, pagination, and Canvas GET requests.
45
- - Initial unit tests for the safety-critical runtime.
42
+ - `canvas auth login/status/logout`, `canvas config show`, and `canvas me`.
43
+ - Courses, tabs, modules, assignments, pages, files, folders, raw GET, and review-pack foundation commands.
44
+ - Local JSON/HTML/Markdown exports for modules, assignments, pages, and review packs.
45
+ - Safe file download to a requested output directory.
46
+ - Core runtime utilities for output envelopes, redaction, config paths, pagination, and Canvas GET/download requests.
47
+ - Unit tests for command normalization, routing helpers, and safety-critical runtime.
46
48
  - Engineering PRD and executable build plan.
47
- - Initial Lark-style skill bundle skeleton.
49
+ - Agent skill bundle for the implemented command surface.
48
50
 
49
51
  Planned next:
50
52
 
51
- - `canvas auth login`.
52
- - Canvas school picker and PAT setup flow.
53
53
  - Post-login context bootstrap.
54
- - Course/resource commands.
55
- - Review packs.
54
+ - Broader review-pack indexing, citations, and linked-file resolution.
55
+ - Grades, submissions, discussions, announcements, calendar, groups, conversations, and richer review indexing.
56
56
 
57
57
  ## Installation & Quick Start
58
58
 
@@ -74,20 +74,20 @@ npm install -g @lukeguo12210/canvas-cli
74
74
  # 1. Authenticate with your Canvas school
75
75
  canvas auth login
76
76
 
77
- # 2. Inspect the automatically gathered student context
78
- canvas context show
79
-
80
- # 3. List courses
77
+ # 2. List courses
81
78
  canvas courses list
82
79
 
83
- # 4. Build a local review pack
80
+ # 3. Inspect a course
81
+ canvas courses overview <course-id>
82
+
83
+ # 4. Build a local review pack foundation
84
84
  canvas review pack --course-id <course-id> --out ./review/<course>
85
85
  ```
86
86
 
87
87
  ### Install Agent Skills
88
88
 
89
89
  ```bash
90
- npx skills add @lukeguo12210/canvas-cli -g -y
90
+ npx skills add lukeguo12210/canvas-cli -g --skill "*" -y
91
91
  ```
92
92
 
93
93
  ## Agent Skills
@@ -97,6 +97,7 @@ npx skills add @lukeguo12210/canvas-cli -g -y
97
97
  | `canvas-shared` | Auth, token safety, output formats, pagination, raw API usage, common Canvas errors |
98
98
  | `canvas-courses` | Course discovery, course name disambiguation, tabs, and overview |
99
99
  | `canvas-modules` | Module traversal, module item resolution, Canvas course order |
100
+ | `canvas-pages` | Page listing, page HTML inspection, local page export |
100
101
  | `canvas-files` | File metadata, folders, linked files, safe downloads |
101
102
  | `canvas-assignments` | Assignments, due dates, descriptions, visible attachments |
102
103
  | `canvas-review` | Review-pack workflow that preserves Canvas course structure |
@@ -128,25 +129,49 @@ Personal access tokens are for local/self use. Do not paste tokens into hosted a
128
129
  ### Student Workflows
129
130
 
130
131
  ```bash
131
- canvas context show
132
132
  canvas review pack --course-id <course-id> --out ./review/<course>
133
- canvas review search --path ./review/<course> --query "dynamic programming"
133
+ canvas review pack --course-id <course-id> --out ./review/<course> --include-all-files
134
134
  ```
135
135
 
136
- ### Domain Commands
136
+ ### Full Command Surface
137
137
 
138
138
  ```bash
139
+ canvas auth login
140
+ canvas auth status
141
+ canvas auth logout
142
+ canvas config show
143
+ canvas me
144
+
139
145
  canvas courses list
140
146
  canvas courses search "algorithms"
147
+ canvas courses show <course-id>
148
+ canvas courses overview <course-id>
149
+ canvas tabs list --course-id <course-id>
150
+
141
151
  canvas modules list --course-id <course-id>
152
+ canvas modules items --course-id <course-id> --module-id <module-id>
153
+ canvas modules item --course-id <course-id> --module-id <module-id> --item-id <item-id>
154
+ canvas modules export --course-id <course-id> --module-id <module-id> --out ./module
155
+
142
156
  canvas assignments list --course-id <course-id>
157
+ canvas assignments show --course-id <course-id> --assignment-id <assignment-id>
158
+ canvas assignments export --course-id <course-id> --assignment-id <assignment-id> --out ./assignment
159
+
160
+ canvas pages list --course-id <course-id>
143
161
  canvas pages show --course-id <course-id> --page <url-or-id>
162
+ canvas pages export --course-id <course-id> --page <url-or-id> --out ./page
163
+
164
+ canvas files list --course-id <course-id>
165
+ canvas files show <file-id>
144
166
  canvas files download <file-id> --out ./files
145
- ```
167
+ canvas files download-linked --course-id <course-id> --out ./files
146
168
 
147
- ### Raw Read-Only API
169
+ canvas folders list --course-id <course-id>
170
+ canvas folders path --course-id <course-id> --path "course files/week 1"
171
+
172
+ canvas review pack --course-id <course-id> --out ./review/<course>
173
+ canvas review pack --course-id <course-id> --out ./review/<course> --include-all-files
148
174
 
149
- ```bash
150
175
  canvas api get /api/v1/courses
151
176
  canvas api get /api/v1/courses/<course-id>/modules --params '{"include":["items"]}'
152
177
  ```
@@ -191,8 +216,8 @@ Near term:
191
216
  - Add school registry and custom Canvas URL setup.
192
217
  - Add post-login context bootstrap.
193
218
  - Implement courses, tabs, modules, assignments, pages, and files.
194
- - Build `canvas review pack`.
195
- - Package skills for `npx skills add @lukeguo12210/canvas-cli -g -y`.
219
+ - Expand `canvas review pack` with citations, indexing, and richer file resolution.
220
+ - Package skills for `npx skills add lukeguo12210/canvas-cli -g --skill "*" -y`.
196
221
 
197
222
  Later:
198
223