npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tronclass-cli

v0.4.0

Published

A modern, cross-platform TypeScript CLI for the TronClass learning management system.

Downloads

463

Readme

TronClass CLI (TypeScript)

A modern, fast, and cross-platform command-line interface for the TronClass learning management system.

Features

  • Unified Authentication: One login flow for any TronClass deployment, powered by the Tronclass-API SDK (traditional CAS and Keycloak both supported). FJU users get a --fju shortcut that presets the base URL. Automation can use --fju --non-interactive to defer the CAPTCHA step to a separate auth captcha call — the password is supplied only at resume time and never stored on disk. auth check reports current session validity by probing an authenticated TronClass API endpoint.
  • Session Persistence: Saves your login state securely at ~/.tronclass-cli/cookies.json, so you stay logged in across sessions.
  • Course Management: List your ongoing or historical courses with customizable fields and filtering.
  • To-Do List: Quick access to your pending tasks, assignments, and upcoming deadlines.
  • Course Activities: Browse course modules, view detailed activity metadata, and download course materials.
  • Homework Workflow: List assignments, read the prompt and download teacher attachments, submit multiple files (including draft mode), and inspect the contents of your submitted files or saved drafts — all without leaving the terminal.
  • Announcements: Browse school-wide and course-specific announcements with HTML rendered directly in the terminal — bold, hyperlinks, images, and lists all supported.
  • Developer Friendly: Built with TypeScript for type safety and easy maintainability.

Installation

Via NPM (Recommended)

Install the CLI globally on your system:

npm install -g tronclass-cli

From Source

  1. Clone the repository.
  2. Install dependencies:
    npm install
  3. Build the project:
    npm run build
  4. Link the command to your system (optional):
    npm link

Usage

Once installed, use the tronclass command from anywhere:

# Login (prompts for base URL, password, and CAPTCHA if required)
tronclass auth login <your_username>

# FJU shortcut: preset the base URL, so you're only prompted for password + CAPTCHA
tronclass auth login --fju <your_username>

# Check current authentication status
tronclass auth check

# Clear saved session
tronclass auth logout

# List ongoing courses
tronclass courses list

# View upcoming tasks and deadlines
tronclass todo

# List materials for a specific course
tronclass activities list <course_id>

# Download course material
tronclass activities download <ref_id> <output_path>

# List homework for a course
tronclass hw list <course_id>

# View a homework's prompt, attachments, and your own submission/draft
tronclass hw view <activity_id>

# Submit files (add --draft to save without finalizing)
tronclass hw submit <activity_id> ./homework.pdf [--draft]

# List school-wide announcements
tronclass ann list

# List announcements for a specific course
tronclass ann list <course_id>

# View full announcement content (HTML rendered in terminal)
tronclass ann view <ann_id> [course_id]

For more detailed usage, please refer to the Documentation.

Future Goals

  • Support for more universities beyond FJU.
  • Grades and exam score viewing.
  • Attendance / roll call submission.
  • Interactive course browsing mode.
  • Integration with local file systems for automatic course material syncing.

Acknowledgments

This project is built on top of the powerful Tronclass-API SDK, which provides robust API interactions, type safety, rate limiting, and authentication handling.

  • Powered by Tronclass-API: Copyright (c) 2026 Seven317 (MIT License)

(Note: Earlier versions of this CLI were inspired by the original Python implementation of the tronclass-cli created by Howyoung. We retain deep appreciation for their pioneering work on API endpoints and data structure logic.)

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.