StudioNEW

trak next

Inspects trak.json, determines the next sequential incomplete module, and displays its folder path, overview, files, and navigation commands.

$ trak next [flags]

Command Overview

Sorts all curriculum modules in deterministic order to find the next incomplete exercise. Reads the module README snippet, lists workspace files, and provides direct copyable shell commands. Use --open to automatically launch the module in VS Code.

Execution Lifecycle

1
Workspace Verification — Confirms trak.json exists in active working directory
2
Deterministic Sorting — Sorts module keys alphabetically and numerically
3
State Scan — Finds the first module where completion status is false
4
Metadata Extraction — Reads module README overview snippet and file entries
5
Terminal Card Output — Renders module name, track progress bar, and cd command
6
Optional Editor Launch — Spawns code editor if --open flag is supplied

Available Flags

-o, --openType: boolean • Default: false

Open the next module workspace folder directly in VS Code or default editor.

-h, --helpType: boolean • Default: false

Show next command help and examples.

Usage Examples

Find Next Exercise
$trak next

Resolves the next incomplete module and displays directory and starter tips.

Launch Directly in VS Code
$trak next --open

Finds the next pending module and opens its directory in VS Code immediately.

Important Technical Guidelines

Editor Launch Compatibility

The --open flag launches your editor using the system 'code' command. Ensure VS Code command line tools are installed in your PATH.

Frequently Asked Questions (FAQ)

Q:What happens when all modules are finished?
Trak congratulates you with a 100% completion card and lets you know the curriculum track is complete.