Skip to content

CLI Guide

Joe Xu edited this page May 29, 2026 · 1 revision

CLI Guide

The CLI is an interactive terminal assistant, not a one-shot batch generator.

Use the CLI when you want:

  • a terminal-based workflow
  • persistent workspace reuse without the desktop GUI
  • chat-based interaction over course files
  • generated study documents from natural-language requests

Basic Launch Pattern

The CLI requires a course name when input files are provided.

Example:

python -m uacragent outline.pdf lecture1.pdf lecture2.pdf \
  --course-name "Introduction to Algorithms"

How the CLI Works

  1. It loads the configured provider and embedding settings.
  2. It creates or reuses a managed CLI workspace.
  3. It indexes the supplied files, or reuses the existing index when possible.
  4. It enters an interactive chat loop in the terminal.
  5. You ask questions or request generated study documents.

CLI Workspace Behavior

CLI working files are stored under:

  • <app_data_dir>/cli_run/<workspace_id>/

Inside that workspace, the app keeps its own files under:

  • <workspace>/.uacragent/

That bundle contains things such as:

  • copied uploads
  • Chroma vector database
  • generated outputs

Workspace Reuse

--workspace-id controls the workspace folder name under cli_run/.

Reusing the same --workspace-id helps the CLI reuse:

  • the existing Chroma index
  • unchanged embedded documents
  • existing output history in the same workspace

Supported Inputs

The CLI supports:

  • PDF
  • DOCX
  • CSV
  • TXT
  • Markdown
  • JSON
  • HTML
  • XML
  • common code/text files supported by the current loader path

Document Typing

You can provide one explicit document type for all positional files with --doc-type.

Example:

python -m uacragent syllabus.pdf \
  --course-name "Data Structures" \
  --doc-type syllabus

Important behavior:

  • when you provide --doc-type, all positional files are treated as that same type
  • when you omit --doc-type, all positional files are treated as other

Example Commands

Minimal Example

python -m uacragent lecture.pdf \
  --course-name "Linear Algebra"

Typed Input Example

python -m uacragent syllabus.pdf \
  --course-name "Data Structures" \
  --doc-type syllabus \
  --exam-type final \
  --exam-format mixed \
  --workspace-id csc263-final

Example With More Metadata

python -m uacragent notes.pdf \
  --course-name "Operating Systems" \
  --doc-type lecture_note \
  --university-name "University of Toronto" \
  --major "Computer Science" \
  --course-code "CSC369" \
  --professor-name "Dr. Smith" \
  --semester "Fall 2024" \
  --exam-duration "2 hours" \
  --effort-level high \
  --workspace-id csc369-session

Chat Usage

Once indexing is complete, you can ask questions such as:

  • Explain the main topics covered in these notes.
  • What should I focus on for the final?
  • Generate a review summary for this course.
  • Generate a practice booklet for this course.
  • Generate a mock exam for this course.
  • Generate an exam prediction for this course.

Effort Level

The CLI currently exposes:

  • --effort-level low
  • --effort-level medium
  • --effort-level high

This changes retrieval and context depth for chat turns and generated document requests.

Current CLI Limitation

The CLI does not currently expose the desktop Reasoning mode toggle.

Generated documents from the CLI use the default quick reasoning pipeline.

Environment and Keys

The CLI reads provider settings from:

  1. <app_data_dir>/.env
  2. current working directory .env
  3. shell environment variables

The matching provider API key must be available for the selected provider unless you are using a local embedding path where no embedding API key is needed.

Exiting the CLI

You can leave the CLI with:

  • exit
  • quit
  • Ctrl-C
  • Ctrl-D

Related Pages

Clone this wiki locally