sourcecred clear --all
-- removes the whole $SOURCECRED_DIRECTORYsourcecred clear --cache
-- removes just the cache directorysourcecred clear
-- prompts the user to be more specific
Then those errors that are thrown can report exactly how to fix them, i.e. when we have the wrong version of repoIdRegistry, we can ensure that "try running sourcecred clear --all
" is printed to console.
Use: https://github.com/sourcecred/sourcecred/blob/master/src/cli/common.js#L19
- add a command to the CLI directory
- update
Sourcecred.js
, the entry point - update
help.js
// sourcecred.js
case "clear":
return clear(args.slice(1), std);
// help.js
Commands:
load load repository data into SourceCred
analyze analyze cred for a loaded repository
help show this help message
clear clear SourceCred repository data
make a command to get cache
const cacheDirectory = scopedDirectory("cache");