CodeCharta consists of the two parts analysis and visualization which can be installed and used separately. The analysis programm we can install is the Codecharta shell (ccsh). The visualization program is the desktop version of the the web visualization.
We use npm to distribute both programs because it is very convenient and has a wide install base. Only the visualization uses node. The analysis is a command-line interface that requires a Java Virtual Machine (JVM). Please make sure that you have Node and npm installed as well as Java.
If you are on Windows we recommend installing Git and use the bundled Git Bash to make the scripts easily transferable.
Note: This guide explains how to use codecharta, if you want to develop on it checkout the New to Code sections and corresponding READMEs.
Global Install with npm (recommended)
npm i -g codecharta-analysis
# Explore ccsh
# then explore a specific importer
ccsh sourcecodeparser -h
npm i -g codecharta-visualization
# and start
Local Install with npm
This installation option might be a good idea if you don’t want to install CodeCharta globally and just try it out in a temporary folder (
mkdir tmp; cd tmp).
# Download CodeCharta Shell into the current directory
npm i codecharta-analysis
# Do either A or B
## A) Create an executable link to ccsh in your local directory
ln -s ./node_modules/codecharta-analysis/public/bin/ccsh ccsh
## A) Explore ccsh
## B) Navigate to the codecharta-analysis folder
## B) Navigate to the binaries
## B) Explore ccsh with
## B) or use the ccsh.bat
# Download CodeCharta Visualization into the current directory
npm i codecharta-visualization
# Do either A or B
## A) Create an executable link to the visualization in your local directory
ln -s ./node_modules/codecharta-visualization/cli.js ccstudio
## A) Start visualization
## B) Navigate to the codecharta-visualization folder
## B) Start visualization with
Docker Hub Install
The visualization is published to Docker Hub.
# run visualization with
docker run -p 80:8080 codecharta/codecharta-visualization
Download the latest release of CodeCharta (codecharta-analysis and codecharta-visualization) and unpack them to a folder of your choice. The visualization bundles an operation system (OS)-specific runtime. Since the analysis runs on the JVM it only has a single
.tar, no matter what OS you use.
# Navigate to the codecharta-analysis folder
# Explore ccsh with
# or use the ccsh.bat
# Navigate to the codecharta-visualization folder
# Start visualization with the provided executable
If you get an error on MacOS because of a missing license, try this apple support article
You may be required to give the application executable rights
If you are using an M1 or similar (arm64) architectures you might need to do additional steps, because the OS might flag the executable as damaged, if it is downloaded and from an unverified developer:
- Remove the ‘downloaded’ attributes from the OS:
xattr -cr codecharta-visualization.app/