https://github.com/kleinpanic/cs3704-canvas-project
CS3704 Canvas Project - team-maintained Canvas TUI and shared-core architecture repo
https://github.com/kleinpanic/cs3704-canvas-project
Last synced: 7 days ago
JSON representation
CS3704 Canvas Project - team-maintained Canvas TUI and shared-core architecture repo
- Host: GitHub
- URL: https://github.com/kleinpanic/cs3704-canvas-project
- Owner: kleinpanic
- License: gpl-3.0
- Created: 2026-04-03T21:42:59.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-31T07:33:07.000Z (17 days ago)
- Last Synced: 2026-05-31T09:22:17.257Z (17 days ago)
- Language: Python
- Homepage: https://kleinpanic.github.io/CS3704-Canvas-Project/
- Size: 4.46 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
- Roadmap: ROADMAP.md
- Maintainers: MAINTAINERS.md
Awesome Lists containing this project
README
# CS3704 Canvas Project
A maintainable, team-ready **Canvas LMS productivity client** with a Textual TUI frontend, Chrome extension, Python SDK, and a fine-tuned calendar agent โ with a documented shared-core architecture.
---
> **Canvas Tracker** โ the fastest path from Canvas API token to a local calendar agent,
> polished TUI, and contribution-ready dataset pipeline.

| Deploy | Link |
|--------|------|
| PyPI (SDK) | [](https://pypi.org/project/canvas-sdk/) |
| Codespaces | [](https://codespaces.new/kleinpanic/CS3704-Canvas-Project) |
| HF Space | [](https://huggingface.co/spaces/kleinpanic93/canvas-calendar-agent-demo) |
| Docker | [](https://github.com/kleinpanic/CS3704-Canvas-Project/pkgs/container/canvas-tui) |
See [Quick Start](docs/QUICKSTART.md) ยท [Examples](examples/) ยท [Public Roadmap](ROADMAP.md)
---
[](https://github.com/kleinpanic/CS3704-Canvas-Project/actions/workflows/ci.yml)
[](https://github.com/kleinpanic/CS3704-Canvas-Project/actions/workflows/security.yml)
[](https://github.com/kleinpanic/CS3704-Canvas-Project/actions/workflows/pages.yml)
[](https://github.com/kleinpanic/CS3704-Canvas-Project/actions/workflows/release.yml)
[](https://pypi.org/project/canvas-sdk/)
[](https://pypi.org/project/canvas-sdk/)
[](https://github.com/kleinpanic/CS3704-Canvas-Project/pkgs/container/canvas-tui)
[](https://github.com/kleinpanic/CS3704-Canvas-Project/releases)
[](https://github.com/kleinpanic/CS3704-Canvas-Project/commits/main)
[](https://github.com/kleinpanic/CS3704-Canvas-Project/commits/main)
[](https://github.com/kleinpanic/CS3704-Canvas-Project/graphs/contributors)
[](LICENSE)
[](https://github.com/astral-sh/ruff)
[](https://github.com/kleinpanic/CS3704-Canvas-Project/actions/workflows/quick-checks.yml)
[](https://pre-commit.com/)
[](http://commitizen.github.io/cz-cli/)
[](https://securityscorecards.dev/viewer/?uri=github.com/kleinpanic/CS3704-Canvas-Project)
[](https://huggingface.co/spaces/kleinpanic93/canvas-calendar-agent-demo)
[](https://huggingface.co/spaces/kleinpanic93/canvas-pii-scrub)
[](https://huggingface.co/kleinpanic93/canvas-calendar-agent-v7-dpo)
[](https://huggingface.co/datasets/kleinpanic93/canvas-calendar-preferences-v7)
[](https://huggingface.co/collections/kleinpanic93/canvas-calendar-agent-v30-69fa6462f697e0342b21dfe0)
[](https://codespaces.new/kleinpanic/CS3704-Canvas-Project)
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/kleinpanic/CS3704-Canvas-Project)
---
## Distribution
| Surface | Channel | Status |
|---------|---------|--------|
| **canvas-sdk** (Python) | [PyPI](https://pypi.org/project/canvas-sdk/) | live โ v1.2.3 on PyPI |
| **canvas-tui** (Python) | [PyPI](https://pypi.org/project/canvas-tui/) | not yet published โ pyproject.toml v2.0.0; tracked in [#177](https://github.com/kleinpanic/CS3704-Canvas-Project/issues/177) |
| **canvas-tui** (Docker) | `ghcr.io/kleinpanic/canvas-tui` | live โ built nightly + on tag (#140) |
| **Chrome extension** | [Chrome Web Store](https://chromewebstore.google.com/) | listing in progress โ install via `Load unpacked` for now |
| **HF Space demo** | [Live](https://huggingface.co/spaces/kleinpanic93/canvas-calendar-agent-demo) | live โ auto-deploys on push to `main` |
| **HF Model** | [v7-DPO](https://huggingface.co/kleinpanic93/canvas-calendar-agent-v7-dpo) | live |
> **canvas-sdk v1.2.3 live on PyPI (API token).** OIDC trusted publisher not yet registered at pypi.org. Chrome Web Store listing in progress โ install via `Load unpacked` for now.
---
## Quick Start
### Chrome Extension
1. Clone or download this repo.
2. In Chrome, open `chrome://extensions/` and enable **Developer mode**.
3. Click **Load unpacked** and select the `extension/` directory.
4. Pin the extension, open a Canvas page, and click the icon.
### Python SDK
```bash
pip install canvas-sdk[autodownload] # fetches the v7-dpo Gemma4 model from HF on first run
pip install canvas-sdk[gemini] # optional Gemini fallback
pip install canvas-sdk[all] # both
```
> **Note:** PyPI publishes v1.2.3. The v2.0.0 local source (with the updated agent architecture)
> can be installed with `pip install -e src/sdk/`.
```python
import os
from canvas_sdk import CanvasAgent
os.environ["CANVAS_TOKEN"] = "..." # your Canvas API token
os.environ["CANVAS_BASE_URL"] = "https://canvas.vt.edu"
agent = CanvasAgent.auto() # auto-resolves: env -> local -> HF -> Gemini
print(agent.run("What is due this week?"))
```
`CanvasAgent.auto()` resolution order:
1. `CANVAS_LLM_ENDPOINT` env (skip auto-download, use your own server)
2. Local cache at `~/.cache/canvas-agent/v7-dpo/` (spawns vLLM on `:8765`)
3. Download `kleinpanic93/canvas-calendar-agent-v7-dpo` from HF, then (2)
4. Fall back to Gemini (`gemini-2.5-flash` by default)
### TUI (Terminal UI)
```bash
export CANVAS_TOKEN="your_canvas_token_here"
export CANVAS_BASE_URL="https://canvas.yourschool.edu" # required โ no default; tool exits with error if unset
pipx install . # recommended
# or: pip install .
canvas-tui
```
---
## Live Demo
Try the fine-tuned Canvas Calendar Agent in your browser โ no install required, no tokens needed:
- **Agent demo** (mock Canvas data, hosted DPO model): https://kleinpanic.github.io/CS3704-Canvas-Project/agent-demo/
- **HF Space** (full model, mock tools): https://huggingface.co/spaces/kleinpanic93/canvas-calendar-agent-demo
- **HF Collection** (v3.0 method matrix): https://huggingface.co/collections/kleinpanic93/canvas-calendar-agent-v30-69fa6462f697e0342b21dfe0
### Demo architecture (no tokens in client JS)
```
Browser -> Cloudflare Worker -> HF Space (ZeroGPU)
^ ^
| |
| HF_TOKEN held as | Gemma4 v7-dpo behind
| Cloudflare secret | gradio 5 ChatInterface +
| (never reaches the | 18 mock tool dispatchers
| browser) |
```
The HF token is stored as a Cloudflare Worker secret. Public clients only
see the proxy URL (`cs3704-demo-proxy.kleinpanic.workers.dev`); they never
receive any credential. See [`proxy/README.md`](proxy/README.md) for the
deploy procedure and [`proxy/iframe-fallback.html`](proxy/iframe-fallback.html)
for a zero-infra alternative that embeds the Space directly.
> **Token policy:** the SDK reads `CANVAS_TOKEN` and `GOOGLE_API_KEY` from
> your local environment. Tokens never enter the published browser demo,
> the GH Pages site, or any committed file. The Cloudflare Worker proxy is
> the only place an HF token is held, and it sits server-side as a Cloudflare
> secret. If you fork this project and host your own demo, follow the same
> pattern โ see [`proxy/README.md`](proxy/README.md).
---
## Documentation
- **[Docs site](https://kleinpanic.github.io/CS3704-Canvas-Project/)** โ live project docs
- **[Agent demo](https://kleinpanic.github.io/CS3704-Canvas-Project/agent-demo/)** โ chat with the Canvas Calendar Agent in your browser
- **[Roadmap](https://kleinpanic.github.io/CS3704-Canvas-Project/roadmap.html)** โ planned milestones and feature backlog
- **[HF Space](https://huggingface.co/spaces/kleinpanic93/canvas-calendar-agent-demo)** โ full v7-dpo model behind a Gradio chat UI
- **[How it Works](https://kleinpanic.github.io/CS3704-Canvas-Project/agent-demo/method.html)** โ DPO methodology, 9-method ablation matrix, G1โG13 guardrails, bench harness
- **[PyPI: canvas-sdk](https://pypi.org/project/canvas-sdk/)** โ `pip install canvas-sdk`
- **[Architecture docs](https://kleinpanic.github.io/CS3704-Canvas-Project/docs/architecture/)** โ system design decisions
- **[Browser extension docs](https://kleinpanic.github.io/CS3704-Canvas-Project/docs/extension/)** โ shared client/runtime architecture
- **[Contributing](CONTRIBUTING.md)** โ contribution guidelines and developer setup
- **[Maintainers](MAINTAINERS.md)** โ maintainer responsibilities
- **[Security policy](SECURITY.md)** โ security procedures
---
## Development
For team workflow, branch naming, repo structure, and dev setup, see [`CONTRIBUTING.md`](CONTRIBUTING.md).
---
## Contributors
[](https://github.com/kleinpanic/CS3704-Canvas-Project/graphs/contributors)
Made with [contrib.rocks](https://contrib.rocks).
---
## License
GPL-3.0-or-later. See [LICENSE](LICENSE).