usc

package module
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

usc

A command-line client for USC's Brightspace, Web Registration, Handshake, the Student Directory, Leavey Library rooms, USC mobile ordering, and the public Schedule of Classes. Every command prints JSON, so Claude Code, Codex, Grok, or any agent with a terminal can run it for you.

Docs: usc.sh/docs

Install or update

Ask your agent:

Set up the USC CLI for me: https://usc.sh/install.md

Or by hand, on macOS and Linux:

curl -fsSL https://usc.sh/install | sh

With Go 1.24 or later, on any platform:

go install github.com/nsigel/usc-cli/cmd/usc@latest

To update usc and its skill, ask your agent again. By hand, rerun the install command and regenerate the skill (see Give your agent the skill).

Sign in

usc auth login --web

Open the printed url and sign in with your NetID, password, and Duo. Later commands authenticate automatically. On remote machines, use usc auth login --remote; for scripts and CI, set USC_USERNAME, USC_PASSWORD, and USC_DUO_TOTP_SECRET or USC_DUO_BYPASS. Details: Sign in.

Give your agent the skill

usc skill prints a SKILL.md with the commands and the rules an agent follows, such as asking before it registers, books, or orders. Ask your agent to "add the usc skill: save the output of usc skill as a skill named usc-cli", or for Claude Code:

mkdir -p ~/.claude/skills/usc-cli
usc skill > ~/.claude/skills/usc-cli/SKILL.md

Examples

usc brightspace courses
usc brightspace announcements --since 2026-11-09T00:00:00-08:00
usc webreg courses --term 20271 --course BUAD-306
usc handshake career-fairs --date next-30
usc libcal schedule --date tomorrow --category rooms --min-capacity 4
usc directory students --last-name smith --school Viterbi
usc classes 20271 CSCI-270

Docs

Each page gives the commands, filters, and flows for one area:

usc --help and usc skill also list the commands.

Website

The site at usc.sh is in web/: npm install && npm run dev to work on it.

Contributing

Issues and pull requests are welcome.

License

MIT. Not affiliated with USC.

Documentation

Overview

Package usc holds what the usc command and a Go program share: the agent skill and the paths of the files that `usc auth login` saves.

Index

Constants

This section is empty.

Variables

View Source
var SkillMD string

SkillMD is the agent skill that `usc skill` prints.

Functions

func ConfigDir

func ConfigDir() (string, error)

func CredentialsPath

func CredentialsPath() (string, error)

func SessionPath

func SessionPath() (string, error)

Types

This section is empty.

Directories

Path Synopsis
cmd
usc command
usc-site command
Command usc-site serves usc.sh: the built website, the sign-in page, and the relay that page uses to reach a usc process on another machine.
Command usc-site serves usc.sh: the built website, the sign-in page, and the relay that page uses to reach a usc process on another machine.
examples
availability command
brightspace command
webreg command
internal
cli
dom
relay
Package relay forwards sealed messages between the sign-in page on usc.sh and a usc process that the page cannot reach directly.
Package relay forwards sealed messages between the sign-in page on usc.sh and a usc process that the page cannot reach directly.
weblogin
Package weblogin serves a one-time sign-in page, on the loopback interface or through usc.sh.
Package weblogin serves a one-time sign-in page, on the loopback interface or through usc.sh.
weblogin/page
Package page holds the sign-in page, which the CLI serves on loopback and usc.sh serves for a sign-in on another machine.
Package page holds the sign-in page, which the CLI serves on loopback and usc.sh serves for a sign-in on another machine.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL