@lukeguo12210/canvas-cli 0.0.1 → 0.0.2

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.
@@ -15,12 +15,14 @@ Before using this skill, read `../canvas-shared/SKILL.md`.
15
15
  ## Commands
16
16
 
17
17
  ```bash
18
- canvas files list --course-id <course-id>
19
- canvas files show <file-id>
20
- canvas files download <file-id> --out <dir>
21
- canvas files download-linked --course-id <course-id> --out <dir>
22
- canvas folders list --course-id <course-id>
23
- canvas folders path --course-id <course-id> --path <path>
18
+ canvas files list --course-id <course-id> --page-all --format json
19
+ canvas files list --folder-id <folder-id> --page-all --format json
20
+ canvas files list --group-id <group-id> --page-all --format json
21
+ canvas files show <file-id> --format json
22
+ canvas files download <file-id> --out <dir> --format json
23
+ canvas files download-linked --course-id <course-id> --out <dir> --format json
24
+ canvas folders list --course-id <course-id> --page-all --format json
25
+ canvas folders path --course-id <course-id> --path <path> --format json
24
26
  ```
25
27
 
26
28
  ## Rules
@@ -30,3 +32,10 @@ canvas folders path --course-id <course-id> --path <path>
30
32
  - Preserve Canvas display names in metadata.
31
33
  - Record source API URL and source HTML URL in manifests.
32
34
  - Never write downloaded files outside the requested output directory.
35
+
36
+ ## Current Behavior
37
+
38
+ - `files list` returns metadata only; it does not download bytes.
39
+ - `files download` writes one file to the requested output directory.
40
+ - `files download-linked` currently downloads file IDs discoverable from module file items and assignment attachments when Canvas exposes them.
41
+ - Folder commands are separate top-level commands: use `canvas folders ...`, not `canvas files folders ...`.
@@ -30,11 +30,11 @@ Common module item types:
30
30
  ## Commands
31
31
 
32
32
  ```bash
33
- canvas modules list --course-id <course-id>
34
- canvas modules list --course-id <course-id> --include items,content_details
35
- canvas modules items --course-id <course-id> --module-id <module-id>
36
- canvas modules item --course-id <course-id> --module-id <module-id> --item-id <item-id>
37
- canvas modules export --course-id <course-id> --module-id <module-id> --out <dir>
33
+ canvas modules list --course-id <course-id> --page-all --format json
34
+ canvas modules list --course-id <course-id> --include items,content_details --page-all --format json
35
+ canvas modules items --course-id <course-id> --module-id <module-id> --page-all --format json
36
+ canvas modules item --course-id <course-id> --module-id <module-id> --item-id <item-id> --format json
37
+ canvas modules export --course-id <course-id> --module-id <module-id> --out <dir> --format json
38
38
  ```
39
39
 
40
40
  ## Notes
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: canvas-pages
3
+ version: 0.1.0
4
+ description: "Canvas LMS pages: list course pages, inspect page HTML, and export visible pages for local review workflows."
5
+ metadata:
6
+ requires:
7
+ bins: ["canvas"]
8
+ cliHelp: "canvas pages --help"
9
+ ---
10
+
11
+ # canvas-pages
12
+
13
+ Before using this skill, read `../canvas-shared/SKILL.md`.
14
+
15
+ ## Commands
16
+
17
+ ```bash
18
+ canvas pages list --course-id <course-id> --page-all --format json
19
+ canvas pages list --course-id <course-id> --search "syllabus" --format json
20
+ canvas pages show --course-id <course-id> --page <page-url> --format json
21
+ canvas pages export --course-id <course-id> --page <page-url> --out <dir> --format json
22
+ ```
23
+
24
+ ## Notes
25
+
26
+ - Canvas page identifiers are usually URL slugs such as `syllabus`, not numeric IDs.
27
+ - Page bodies are Canvas HTML. Preserve the original HTML in exports.
28
+ - Locked pages should be reported as locked, not treated as fatal when traversing a whole course.
@@ -16,7 +16,7 @@ Before using this skill, read `../canvas-shared/SKILL.md`.
16
16
 
17
17
  Before creating a review pack:
18
18
 
19
- 1. Inspect `canvas context show`.
19
+ 1. Inspect `canvas courses overview <course-id>`.
20
20
  2. Resolve the target course ID.
21
21
  3. Use `canvas review pack`.
22
22
 
@@ -24,10 +24,7 @@ Before creating a review pack:
24
24
 
25
25
  ```bash
26
26
  canvas review pack --course-id <course-id> --out <dir>
27
- canvas review pack --course "<course name or code>" --out <dir>
28
- canvas review pack --course-id <course-id> --module <module-id-or-name> --out <dir>
29
- canvas review index --path <pack-dir>
30
- canvas review search --path <pack-dir> --query <query>
27
+ canvas review pack --course-id <course-id> --out <dir> --include-all-files
31
28
  ```
32
29
 
33
30
  ## Review Pack Rules
@@ -38,3 +35,15 @@ canvas review search --path <pack-dir> --query <query>
38
35
  - Default excludes grades, submissions, conversations, and group member lists.
39
36
  - Record unavailable, locked, external, or skipped resources as warnings.
40
37
  - Always cite Canvas source URLs in `citations.json`.
38
+
39
+ ## Current Behavior
40
+
41
+ The current pack command writes JSON files:
42
+
43
+ - `manifest.json`
44
+ - `course.json`
45
+ - `modules.json`
46
+ - `assignments.json`
47
+ - `pages.json`
48
+
49
+ It includes visible course metadata, tabs, modules, assignments, and pages. With `--include-all-files`, it also includes visible file metadata. It does not yet write `citations.json`, build a search index, or download all file bytes.
@@ -12,6 +12,36 @@ metadata:
12
12
 
13
13
  Read this skill before using any other Canvas skill.
14
14
 
15
+ ## CLI Availability
16
+
17
+ First try:
18
+
19
+ ```bash
20
+ canvas auth status --format json
21
+ ```
22
+
23
+ If the shell returns `command not found: canvas`, the CLI is not on `PATH`.
24
+
25
+ Use this non-global fallback inside an agent session:
26
+
27
+ ```bash
28
+ npm exec --yes --package @lukeguo12210/canvas-cli -- canvas auth status --format json
29
+ ```
30
+
31
+ When using the fallback, replace the leading `canvas` in any command with:
32
+
33
+ ```bash
34
+ npm exec --yes --package @lukeguo12210/canvas-cli -- canvas
35
+ ```
36
+
37
+ For permanent install, tell the user:
38
+
39
+ ```bash
40
+ npm install -g @lukeguo12210/canvas-cli
41
+ ```
42
+
43
+ If global install fails with `EACCES` under `/usr/local`, do not use `sudo` or create symlinks in `/usr/local`. Ask the user to configure a user-level npm prefix, use a Node version manager, or continue with the `npm exec` fallback for this session.
44
+
15
45
  ## Current CLI Surface
16
46
 
17
47
  Implemented now:
@@ -26,13 +56,18 @@ Implemented now:
26
56
  - `canvas courses show <course-id>`
27
57
  - `canvas courses overview <course-id>`
28
58
  - `canvas tabs list --course-id <course-id>`
59
+ - `canvas review pack`
60
+ - `canvas api get`
61
+ - `canvas modules list/items/item/export`
62
+ - `canvas assignments list/show/export`
63
+ - `canvas pages list/show/export`
64
+ - `canvas files list/show/download/download-linked`
65
+ - `canvas folders list/path`
29
66
 
30
67
  Planned but not implemented yet:
31
68
 
32
69
  - `canvas context show`
33
- - `canvas review pack`
34
- - `canvas api get`
35
- - modules, pages, files, assignments, grades, submissions, discussions, calendar, groups, conversations
70
+ - grades, submissions, discussions, calendar, groups, conversations
36
71
 
37
72
  ## Core Rules
38
73
 
@@ -79,4 +114,5 @@ Do not include those in review packs unless the user explicitly asks.
79
114
  canvas auth status --format json
80
115
  canvas courses list --active --page-all --format json
81
116
  canvas courses search "course name" --format json
117
+ canvas courses overview <course-id> --format json
82
118
  ```
@@ -10,6 +10,15 @@ canvas config show --format json
10
10
  canvas me --format json
11
11
  ```
12
12
 
13
+ If `canvas` is not on `PATH`, use the npm exec fallback:
14
+
15
+ ```bash
16
+ npm exec --yes --package @lukeguo12210/canvas-cli -- canvas auth status --format json
17
+ npm exec --yes --package @lukeguo12210/canvas-cli -- canvas auth login
18
+ ```
19
+
20
+ Do not attempt `sudo npm install -g` from inside an agent session. Prefer the fallback above or ask the user to fix their npm global prefix.
21
+
13
22
  ## Login Flow
14
23
 
15
24
  `canvas auth login` is interactive.