Version 0.7.1
NuAnalytics is a Rust command-line tool and MCP server for analyzing degree curricula. It measures how a curriculum is structured — the complexity, blocking, delay and centrality of each course — and how that structure plays out across every plan a student could take. It builds on the work of Greg Heileman and CurricularAnalytics.org.
See CHANGELOG.md for what changed between versions, including breaking changes.
- Curriculum analysis (
planner): read a Curricular Analytics CSV, compute per-course metrics, schedule the courses into terms, and write CSV metrics and a report. - Degree programs (
degree): author a degree in YAML or the unified JSON format (detected automatically), then validate, audit, convert, trim or analyze it.degree analyzeenumerates the degree's plans — every one, or a seeded sample when there are more than--max-plans— and reports statistics across them, along with the shortest and longest plans and a few random ones.-j Nanalyzes many degrees in isolated worker processes, so one pathological degree cannot stop a batch.degree trimcollapses a degree to one walkable path per course, for visualization and tools that do not reason about alternatives.degree convertturns scraped program JSON into the unified format, anddegree schemaprints its JSON Schema.
- Metrics, per course and summed over a curriculum:
- Delay: the number of courses on the longest prerequisite path through the course.
- Blocking: the number of courses that cannot be taken until this one is passed.
- Complexity: delay plus blocking.
- Centrality: the total length of the source-to-sink paths through the course.
- Chain length: the number of courses in the longest prerequisite chain ending at the course.
- Reports: HTML (interactive, with box plots and a term-by-term schedule), PDF (through headless Chrome or Chromium) and Markdown.
- Database (optional): a Supabase backend, cloud or self-hosted, holding IPEDS
institutions and completion demographics and a store of degree programs with their
analysis runs.
db importloads analyzed degrees;degree analyze --from-dband the MCP tools read them back.db ciprecords the CIP codes schools confirm, which imports and the per-program demographics then use in place of the guessed ones. Reads and writes require signing in (nuanalytics db login). See Database Setup. - MCP server (optional): tools that let a model author, validate, analyze and render
degrees, read stored programs and their analysis, and query completion demographics or
run read-only SQL. Tools that write to the database are served only with
nuanalytics mcp --allow-writes. See docs/mcp.md.
From crates.io:
cargo install nu-analyticsFrom Git, for the latest:
cargo install --git https://github.com/NeuCurricularAnalytics/NuAnalytics --bin nuanalyticsFrom a checkout:
cargo build --release # the binary is target/release/nuanalyticsAnalyze a curriculum CSV, writing CSV metrics and an HTML report:
nuanalytics planner path/to/curriculum.csv
nuanalytics planner path/to/curriculum.csv --no-csv --report-format pdf # PDF report only
nuanalytics planner path/to/curriculum.csv --no-report # CSV metrics onlyWork with a degree program:
nuanalytics degree validate samples/degrees/csu-cs-bscs-general.yaml
nuanalytics degree audit samples/degrees/csu-cs-bscs-general.yaml
nuanalytics degree analyze samples/degrees/csu-cs-bscs-general.yaml
nuanalytics degree trim samples/degrees/csu-cs-bscs-general.yamlStart a research project — degrees/, plans/, an .mcp.json, and five Claude Code
skills under .claude/skills/:
nuanalytics init my-research-project
cd my-research-project && claudeSign in to the database (needed for every database command and tool):
nuanalytics db login
nuanalytics db statusRead and change configuration:
nuanalytics config get level
nuanalytics config set level debug
nuanalytics config set degree_analysis.max_plans 5000Settings are resolved in this order, first match winning:
- command-line arguments, for a single run;
nuanalytics.tomlin the current directory, for a project;~/.config/nuanalytics/config.toml, for the user;- built-in defaults.
config set always writes the user file, so a project file that sets the same key still
overrides it. A project file looks like this:
[paths]
metrics_dir = "./metrics"
reports_dir = "./reports"
[degree_analysis]
max_plans = 10000See docs/config.md for every setting.
- Degree command: the degree format, and validating, auditing, trimming and analyzing degrees.
- Planner command: analyzing a curriculum CSV.
- Config command: settings and where they are read from.
- MCP server: the tools a model can call.
- Database setup: standing up a Supabase backend, cloud or self-hosted, and the stored-program tables.
- IPEDS data: which survey files to download and how to import them.
- Development.md: building, testing and running from a checkout.
src/
├── cli/ command-line interface (clap arguments, command handlers)
├── core/
│ ├── degree/ degree parsing, validation, plan generation and the one
│ │ analysis pipeline (analysis.rs)
│ ├── models/ courses, degrees, plans, prerequisite graphs
│ ├── metrics.rs delay, blocking, complexity, centrality, chain length
│ ├── planner/ Curricular Analytics CSV input
│ ├── report/ HTML, PDF and Markdown reports; term scheduling
│ ├── database/ Supabase client, auth, IPEDS import, degree import
│ ├── query/ database queries shared by the CLI and the MCP server
│ ├── statistics/ streaming summary statistics
│ └── config.rs configuration
├── mcp/ MCP server and its tools
└── lib.rs
tests/ integration tests and fixtures
docs/ documentation
See LICENSE.