{"id":34031423,"url":"https://github.com/dbosk/canvaslms","last_synced_at":"2026-01-31T02:19:47.161Z","repository":{"id":43223797,"uuid":"293755227","full_name":"dbosk/canvaslms","owner":"dbosk","description":"Command-line interface to Canvas LMS","archived":false,"fork":false,"pushed_at":"2026-01-28T10:14:49.000Z","size":2396,"stargazers_count":4,"open_issues_count":41,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-29T02:04:05.086Z","etag":null,"topics":["canvas-lms","canvas-lms-api","cli","python3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/canvaslms/","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbosk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-09-08T08:55:04.000Z","updated_at":"2026-01-28T10:12:26.000Z","dependencies_parsed_at":"2023-02-04T16:31:20.416Z","dependency_job_id":"667a8468-7f26-4f4b-9904-e045bfdae958","html_url":"https://github.com/dbosk/canvaslms","commit_stats":{"total_commits":228,"total_committers":2,"mean_commits":114.0,"dds":0.00877192982456143,"last_synced_commit":"f38a87e857bd0e243e3038acee53869d1dcc44fb"},"previous_names":[],"tags_count":73,"template":false,"template_full_name":null,"purl":"pkg:github/dbosk/canvaslms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbosk%2Fcanvaslms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbosk%2Fcanvaslms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbosk%2Fcanvaslms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbosk%2Fcanvaslms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbosk","download_url":"https://codeload.github.com/dbosk/canvaslms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbosk%2Fcanvaslms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28926704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T22:32:35.345Z","status":"online","status_checked_at":"2026-01-31T02:00:09.179Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["canvas-lms","canvas-lms-api","cli","python3"],"created_at":"2025-12-13T18:15:13.971Z","updated_at":"2026-01-31T02:19:47.154Z","avatar_url":"https://github.com/dbosk.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# canvaslms: A CLI to Canvas LMS.\n\nThis program provides a command-line interface for Canvas. The command\nis `canvaslms` and it has several subcommands in the same style as Git.\n`canvaslms` provides output in a format useful for POSIX tools, this\nmakes automating tasks much easier.\n\n## Getting started\n\nStart by login to your Canvas server\n\n```bash\npipx install canvaslms\ncanvaslms login\n```\n\nLet's consider how to grade students logging into the student-shell SSH\nserver. We store the list of students' Canvas and KTH IDs in a file.\n\n```bash\ncanvaslms users -sc DD1301 | cut -f 1,2 \u003e students.csv\n```\n\nThen we check who has logged into student-shell.\n```bash\nssh student-shell.sys.kth.se last | cut -f 1 -d \" \" | sort | uniq \\\n  \u003e logged-in.csv\n```\n\nFinally, we check who of our students logged in.\nWe can set their grade to P and add the comment \"Well done!\" in\nCanvas. We set the grades for the two assignments whose titles match the\nregular expression `(Preparing the terminal|The terminal)`.\n```bash\nfor s in $(cut -f 2 students.csv); do\n  grep $s logged-in.csv \u0026\u0026 \\\n    canvaslms grade -c DD1301 -a \"(Preparing the terminal|The terminal)\" \\\n      -u $(grep $s students.csv | cut -f 1) \\\n      -g P -m \"Well done!\"\ndone\n```\n\n### Analyzing Quiz/Survey Results\n\nThe `quizzes analyse` command helps you analyze Canvas quiz or survey evaluation data. \nDownload the Student Analysis Report CSV from Canvas and run:\n\n```bash\n# Markdown output (default, rendered with rich)\ncanvaslms quizzes analyse --csv survey_results.csv\n\n# LaTeX output (for PDF compilation)\ncanvaslms quizzes analyse --csv survey_results.csv --format latex \u003e report.tex\n```\n\nThis will provide:\n- Statistical summaries for quantitative questions (ratings, multiple choice)\n- Proper handling of multi-select questions (comma-separated options)\n- All individual responses for qualitative questions (free text)\n- AI-generated summaries of qualitative responses (requires `llm`, install with `canvaslms[llm]`)\n\nIf you installed with the `[llm]` extra, configure your API keys:\n```bash\nllm keys set openai  # or another provider\n```\n\n### Managing Quiz Content\n\nView and edit quiz content directly from the command line:\n\n```bash\n# View quiz questions rendered as markdown\ncanvaslms quizzes view -c \"Course\" -a \"Quiz Name\"\n\n# Edit quiz content interactively\ncanvaslms quizzes edit -c \"Course\" -a \"Quiz Name\"\n\n# Export quiz items for backup or migration\ncanvaslms quizzes items export -c \"Course\" -a \"Quiz Name\" --importable\n\n# Add questions to a quiz bank (use --example to see question formats)\ncanvaslms quizzes items add -c \"Course\" -a \"Quiz Name\" --example\n```\n\n### Editing Announcements and Discussions\n\nEdit existing announcements using the same workflow as pages:\n\n```bash\n# Edit interactively (opens in editor)\ncanvaslms discussions edit -c \"Course\" -t \"Announcement Title\"\n\n# Edit from a markdown file with YAML front matter\ncanvaslms discussions edit -c \"Course\" -t \"Announcement Title\" -f announcement.md\n```\n\n## Installation\n\nInstall the PyPI package using `pip` or `pipx`:\n```bash\n# Basic installation (Python 3.8+)\npython3 -m pip install canvaslms\n# or\npipx install canvaslms # recommended\n\n# With optional LLM support for AI summaries (Python 3.9+)\npython3 -m pip install canvaslms[llm]\n# or\npipx install canvaslms[llm] # recommended\n```\n\nThe `[llm]` extra includes the `llm` package and various LLM provider plugins (OpenAI, Anthropic, Gemini, Azure) for AI-powered features like quiz analysis summaries.\n\nSome subcommands use `pandoc`, so you will likely have to [install \npandoc][pandoc] on your system manually.\n\n[pandoc]: https://pandoc.org/installing.html\n\n## Development\n\nThis project uses literate programming with [noweb](https://www.cs.tufts.edu/~nr/noweb/). \nThe source code is written in `.nw` files which combine documentation and code.\n\n### GitHub Copilot Setup\n\nThis repository includes GitHub Copilot configuration files:\n- `.github/copilot-instructions.md`: Project context and coding guidelines\n- `.copilotignore`: Files to exclude from Copilot context\n\nThe configuration helps Copilot understand the literate programming approach, \nCanvas LMS domain, and project-specific patterns.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbosk%2Fcanvaslms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbosk%2Fcanvaslms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbosk%2Fcanvaslms/lists"}