
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Automate your Canvas LMS submissions with a git like command-line interface!
Are you tired of navigating through the Canvas web interface to submit assignments? Canvas CLI puts the power of Canvas in your terminal, making it easy to submit assignments and manage your Canvas interactions with simple commands.
config
, init
, push
, pull
, status
, and clone
pip install canvas-cmd
This project is currently in pre-release status. Most features are working, but you might encounter some rough edges or features marked as "Not Implemented" (NI).
Please, please, PLEASE report any bugs or issues you encounter. Your feedback is invaluable in making this tool better!
# Clone this repository
git clone https://github.com/PhantomOffKanagawa/canvas-cli.git
cd canvas-cli
# Install in development mode
pip install -e .
After installation, the canvas
command will be available in your terminal!
Before using the tool, configure it with your Canvas API token:
canvas config set --global token YOUR_CANVAS_API_TOKEN
canvas config set --global host your-institution.instructure.com
canvas init
This interactive command helps you set up a project configuration for faster assignment submissions.
# Full command (works anywhere)
canvas push -cid COURSE_ID -aid ASSIGNMENT_ID -f path/to/submission.py
# In an initialized project directory:
canvas push # Uses saved course ID, assignment ID, and file
canvas push -f different.py # Override the default file
# Get info on the course and assignment
canvas status --course_details
canvas config --global list
canvas config --local list
Course and Assignment IDs can be found in the URLs of your Canvas pages:
Course ID: The number in the URL after "courses/"
(e.g., https://canvas.instructure.com/courses/123456
→ Course ID is 123456
)
Assignment ID: The number in the URL after "assignments/"
(e.g., https://canvas.instructure.com/courses/123456/assignments/789012
→ Assignment ID is 789012
)
# Create a new project directory
mkdir python_assignment
cd python_assignment
# Create your solution file
echo "print('Hello, Canvas!')" > solution.py
# Submit your solution when ready
canvas push -cid 123456 -aid 789012 -f solution.py
This project is open source and available under the GPL v3 License.
cleo
for better testing and cleaner codeFuture improvements and features planned for Canvas CLI:
canvas init
canvas pull
to download current submissionscanvas clone
to get assignment descriptionsgit status
-like command to get due dates, grading status, and commentsContributions are welcome! Feel free to submit pull requests or open issues to improve the tool.
Tired of clicking into a file module to download it? Try canvas-file-downloader for a simple extension to download files from Canvas.
Made with ❤️ by a student who was tired of clicking through Canvas
FAQs
A command-line tool for interacting with Canvas LMS
We found that canvas-cmd demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.