Skip to content

ccusage / data-loader / extractProjectFromPath

Function: extractProjectFromPath() ​

ts
function extractProjectFromPath(jsonlPath): string;

Extract project name from Claude JSONL file path

Parameters ​

ParameterTypeDescription
jsonlPathstringAbsolute path to JSONL file

Returns ​

string

Project name extracted from path, or "unknown" if malformed

Released under the MIT License.