🎁 Get the FREE AI Skills Starter GuideSubscribe →
BytesAgainBytesAgain
🦀 ClawHub

Tronclass Cli

by @yujun-bo2

Interact with the TronClass learning management system (currently optimized for FJU) via the `tronclass` CLI — check courses, assignments, deadlines, grades,...

Versionv1.2.2
Downloads516
Stars1
TERMINAL
clawhub install tronclass-cli

📖 About This Skill


name: tronclass-cli description: Interact with the TronClass learning management system (currently optimized for FJU) via the tronclass CLI — check courses, assignments, deadlines, grades, announcements, and course materials; download lecture slides or PDFs; submit homework. Use whenever the user asks anything about TronClass, even if they don't say "TronClass" explicitly. Triggers include checking what homework is due, downloading lecture slides or PDFs, submitting assignments, listing enrolled courses, reading school or course announcements, or viewing activity details. If the user mentions school, assignments, due dates, course files, or anything that sounds like an LMS task, lean toward using this skill. license: MIT metadata: authors: YuJun-BO2 cli-version: 0.4.0 repository: https://github.com/YuJun-BO2/tronclass-cli-skill homepage: https://github.com/YuJun-BO2/tronclass-cli-ts openclaw: emoji: "🎓" homepage: https://github.com/YuJun-BO2/tronclass-cli-skill requires: bins: - tronclass install: - id: npm kind: node package: tronclass-cli bins: - tronclass label: Install TronClass CLI (npm)

TronClass CLI Skill

You have access to tronclass-cli, a command-line tool for managing the user's TronClass account.

Setup

Install globally (once):

npm install -g tronclass-cli

General Guidelines

  • Authentication: Most commands require a saved session. If a command fails, tell the user to run tronclass auth login . The session is reused automatically; tronclass auth check probes a live TronClass endpoint to confirm whether it's still valid.
  • FJU users: Use tronclass auth login --fju for the CAS flow with CAPTCHA support.
  • Non-interactive login (agents/scripts): Pass --password

    (and --base-url for generic deployments) to skip prompts. For FJU, where a human must solve the CAPTCHA, use the two-step deferred flow: tronclass auth login --fju --non-interactive prints a captcha ID and opens the captcha image; then tronclass auth captcha --password

    completes the login. The password is never written to disk — it is supplied only at resume time.

  • Finding IDs: The typical lookup chain is courses listactivities list activities view . The todo command shows activity IDs directly in the first column.
  • Aliases: activitiesa, coursesc, homeworkhw/h, todotd/t, announcementsann. Subcommands also have short aliases (listl/ls, viewv, downloadd/dl, submits).
  • Command Quick Reference

    | Command | What it does | |---|---| | tronclass auth login [--fju] [--password

    ] [--base-url ] | Log in (interactive by default; --password / --base-url make it non-interactive) | | tronclass auth login --fju --non-interactive | Start a deferred-CAPTCHA FJU login; prints a captcha ID, no password on disk | | tronclass auth captcha --password

    | Complete a deferred FJU login with the solved CAPTCHA | | tronclass auth check | Probe a live endpoint to report session validity (Valid / Expired / Unknown) | | tronclass auth logout | Clear saved session | | tronclass todo | Pending tasks — first column is the activity ID | | tronclass courses list [--all] [--raw] | List courses | | tronclass activities list | List activities in a course | | tronclass activities view | Rich view: metadata + description + attachments | | tronclass activities download [output] | Download file (defaults to ~/Downloads/) | | tronclass homework list | List homework for a course | | tronclass homework view | Rich view: metadata + prompt + teacher attachments + your own submission/draft | | tronclass homework submit | Submit homework files | | tronclass ann list [course_id] | List announcements (school-wide if no course_id) | | tronclass ann view [course_id] | Rich view: metadata + HTML-rendered body + attachments | | tronclass ann download [output] | Download an announcement attachment |

    Most list/view commands support --fields f1,f2,... to customize displayed columns.

    Key Behaviors

    tronclass todo — shows id, course_name, title, end_time by default. The id column is the activity ID you can pass directly to activities view.

    tronclass activities view — displays a formatted table (not raw JSON). The Attachments section lists each file with its ref_id and a ready-to-run download command. No need to manually dig through JSON.

    tronclass activities download output_file is optional. If omitted, the file is saved to ~/Downloads/ using the server-provided filename.

    tronclass homework view — rich layout: metadata (status / deadline color-coded), HTML-rendered prompt, teacher attachments (each with ref_id for activities download), and a "My Submission" section showing whether you've submitted, saved a draft, or done nothing — plus the files you uploaded. Use this before submitting to read the prompt and confirm a draft.

    tronclass ann list — with no argument, lists the school-wide announcement feed (first page, ~30 items). Pass a course_id to list announcements for a specific course.

    tronclass ann view — renders the announcement's HTML body in the terminal (bold, links, lists, images). If you know which course the announcement belongs to, pass course_id as the second argument to skip a multi-page search of the global feed.

    Common Workflows

    Check what's due:

    tronclass todo
    

    Download a course file:

    tronclass courses list                        # get course_id
    tronclass activities list          # get activity_id
    tronclass activities view        # see Attachments table → note ref_id
    tronclass activities download         # saves to ~/Downloads/ automatically
    

    Submit homework:

    tronclass homework list            # find activity_id
    tronclass homework view          # read the prompt + grab teacher attachments
    tronclass homework submit  ./my_essay.pdf --draft   # save a draft first
    tronclass homework view          # verify the draft
    tronclass homework submit  ./my_essay.pdf           # final submit
    

    Read announcements:

    tronclass ann list                            # school-wide feed
    tronclass ann list                 # course-specific feed
    tronclass ann view  [course_id]       # full content, HTML rendered
    

    Reference Files

    For detailed option lists, field names, and edge cases, load the relevant reference:

  • references/auth.md — login flows, session management
  • references/todo.md — todo fields, filtering
  • references/courses.md — course fields, --raw flag
  • references/activities.md — activities list/view/download in depth
  • references/homework.md — homework list, view, submit options, draft mode
  • references/announcements.md — announcements list, view (HTML rendering), download
  • ⚙️ Configuration

    Install globally (once):

    npm install -g tronclass-cli