Skip to content

npm

The CodeCharta Shell (CCSH) is published on npm, so you can install it globally and run analyses straight from your terminal.

  • Node >= 20
  • Java >= 11

Install the codecharta-analysis package globally and verify the installation:

Terminal window
# Install the CodeCharta Shell globally
npm install -g codecharta-analysis
# Verify the installation (some terminals need to be restarted first)
ccsh -h

Every parser and importer produces its own metrics — see CodeCharta Shell for an overview of the available tools. In this example we use the Unified Parser, as it works on nearly every codebase:

Terminal window
# -o output file name
# <path> the project or file you want to analyze
ccsh unifiedparser -o=tutorial <path/to/your/project>

This generates a tutorial.cc.json.gz, ready to be opened in the Web Studio.

If you are not sure which tool to use, run the shell in interactive mode — it suggests applicable parsers for a given path and guides you through the configuration:

Terminal window
# guided, interactive analysis
ccsh -i

You can also call any tool directly — for example an importer:

Terminal window
ccsh csvimport example.csv -o=example

See CodeCharta Shell for interactive mode, parser suggestions, combining multiple metrics, and more.

Open the Web Studio and load your tutorial.cc.json.gz with the folder-open button (Load cc.json files) in the top-left — see Upload for details. You can now explore your codebase to your heart’s content.