A command-line client for USC's Brightspace, Web Registration, Handshake, 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
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 | shWith Go 1.24 or later, on any platform:
go install github.com/nsigel/usc-cli/cmd/usc@latestusc auth loginIt asks for your NetID, password, and a Duo bypass code, and saves them on your machine (0600). Every later command signs itself in. For scripts and CI, set USC_USERNAME, USC_PASSWORD, and USC_DUO_BYPASS instead. Details: Signing in.
usc skill prints a SKILL.md that teaches an agent every command. 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.mdusc 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 classes 20271 CSCI-270| Command | |
|---|---|
usc auth login / status / logout |
Sign in, check the session, or delete it |
usc bypass create |
Create and save a replacement Duo bypass code (secret JSON output) |
usc brightspace whoami |
Your Brightspace user |
usc brightspace courses [--all] |
Enrolled classes; --all adds departments, semesters, and groups |
usc brightspace content COURSE_ID [--flat] |
A course's content tree |
usc brightspace grades COURSE_ID [--graded-only] |
Grades for a course |
usc brightspace announcements [COURSE_ID] [--since TIME] |
Announcements for one course or all of them |
usc brightspace assignments COURSE_ID |
Assignment folders |
usc brightspace submissions COURSE_ID FOLDER_ID [--download] [--output DIR] |
Your submissions, or download the files |
usc brightspace download COURSE_ID TOPIC_ID [--output DIR] |
Download a content file |
usc webreg terms |
Registration terms and their codes |
usc webreg programs --term TERM |
Schools and program codes |
usc webreg courses --term TERM (--program CODE | --course CODE) |
Courses with sections, seats, and clearance |
usc webreg bin --term TERM |
Your course bin |
usc webreg calendar --term TERM |
Weekly meetings, with conflicts marked |
usc webreg add|schedule|unschedule|remove SECTION_ID --term TERM |
Plan course-bin changes |
usc webreg grade-option SECTION_ID CODE --term TERM |
Change a grade option |
usc webreg checkout --term TERM |
Preview what would be registered and dropped |
usc webreg submit --term TERM --confirm |
Register and drop what checkout shows |
usc handshake categories |
Event categories |
usc handshake events [FILTERS] |
Search events |
usc handshake event EVENT_ID |
One event |
usc handshake career-fairs [FILTERS] |
Search career fairs |
usc handshake career-fair CAREER_FAIR_ID |
One career fair, with sessions |
usc handshake career-fair-register SESSION_ID |
Register for a career-fair session |
usc handshake career-fair-cancel SESSION_ID |
Cancel a career-fair session registration |
usc libcal categories |
Leavey room and pod categories |
usc libcal spaces [rooms|pods|all|lvl1|lvl2|lvl3] |
Leavey spaces |
usc libcal space SPACE_ID |
One space |
usc libcal schedule [FILTERS] |
Open and taken times for each space |
usc libcal book --space ID --start TIME --end TIME --accept-terms |
Book exactly that space and time |
usc libcal release |
Clear an interrupted booking |
usc mobileorder locations|payments |
Dining locations and existing payment methods |
usc mobileorder menu|item|checkout [FLAGS] |
Items, modifiers, and checkout requirements |
usc mobileorder cart [FLAGS] |
Build cart JSON from item and modifier choices |
usc mobileorder quote --cart FILE |
Price a cart without purchasing |
usc mobileorder orders [--pending] |
Past or pending orders |
usc mobileorder order place|continue|cancel|check-in [ARGS] |
Explicit purchase and order actions |
usc classes TERM_CODE COURSE_CODE |
Public course and sections, no sign-in |
usc browser sync [--cdp TARGET] |
Copy the session into Chrome |
usc skill |
Print the agent skill |
usc version |
Print the version |
Filters, IDs, and the registration and booking flows are in the docs.
Commands print JSON to stdout: indented in a terminal, one line when piped. --pretty and --compact override that. Errors are JSON on stderr with exit status 1, and name the command that fixes them when there is one:
{"error":"brightspace: USC sign-in is required","action":"usc auth login"}Every command is a call into a package you can use directly:
client, err := brightspace.Open(ctx, auth.Options{CredentialsFile: file})
courses, err := client.Courses(ctx)See Go library and examples/.
The site at usc.sh is in web/: npm install && npm run dev to work on it.
Browse locations and menus, then build a cart using flags:
usc mobileorder locations
usc mobileorder payments
usc mobileorder menu --location LOCATION_ID --fulfillment pickup --payment-method PAYMENT_ID
usc mobileorder item ITEM_ID --location LOCATION_ID --fulfillment pickup --payment-method PAYMENT_ID
usc mobileorder checkout --location LOCATION_ID --fulfillment pickup --payment-method PAYMENT_ID
usc mobileorder cart --location LOCATION_ID --fulfillment pickup \
--payment-method PAYMENT_ID --tender TENDER_ID --asap \
--item ITEM_ID --select ITEM_ID:VALUE_ID > cart.json
usc mobileorder quote --cart cart.jsonRepeat --item for quantities and --select for modifier choices. Use
--tender for campus payment, and choose --asap or an explicit date/time.
menu shows items and prices; item shows modifiers; checkout shows slots,
tenders and questions. Prices are cents. Fulfillment is pickup, delivery,
or address; pickup is the verified flow.
order place --cart cart.json --expected-total CENTS submits a purchase.
order continue ORDER_ID advances staged payment; only stage success
confirms checkout. orders [--pending] reads orders, and order cancel and
order check-in act on an existing order. These mutations are implemented
but have not been verified with a real purchase; no money was spent during
implementation. Browsing, cart building, quotes and order reads passed live
checks. The client rejects changed totals and checkout selections before
submission and never automatically retries a purchase.
See the website guide,
local command guide, and
API integration notes.
Library callers use mobileorder.Open(ctx, auth.Options); public USC campus
information is available through mobileorder.New().USC(ctx) or
usc mobileorder campus. Transact tokens stay in memory.
Issues and pull requests are welcome.
MIT. Not affiliated with USC.