Getting Started
This documentation covers the installation of the DCM Teams version. If you're not familiar with the tool capabilities, see the Core Concepts documentation.
Installation
The installation process is similar to the Dart SDK.
First, download the executable for your platform:
- Windows
- Linux
- macOS
You can install the DCM executable using Chocolatey.
To install the executable:
C:/> choco install dcm
To upgrade the executable:
C:/> choco upgrade dcm
If you can't use the executables, add it to your PATH:
- In the Windows search box, type env.
- Click Edit the system environment variables.
- Click Environment Variables….
- In the user variable section, select Path and click Edit….
- Click New, and enter the path to the executable.
- In each window that you just opened, click Apply or OK to dismiss it and apply the path change.
You can also download the .zip
archive with executable from our GitHub.
$ sudo apt-get update
$ wget -qO- https://dcm.dev/pgp-key.public | sudo gpg --dearmor -o /usr/share/keyrings/dcm.gpg
$ echo 'deb [signed-by=/usr/share/keyrings/dcm.gpg arch=amd64] https://dcm.dev/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list
Then install the executable:
$ sudo apt-get update
$ sudo apt-get install dcm
Alternatively, download the executable as a Debian package in the .deb package format.
You can also download the .zip
archive with executable from our GitHub.
Don't forget to add the executable to PATH.
Install Homebrew, and then run the following commands:
$ brew tap CQLabs/dcm
$ brew install dcm
Important: Make sure the Homebrew bin directory is in your PATH. Setting up the path correctly makes it easier to use the executable. For help configuring your path, consult the Homebrew FAQ.
To upgrade when a new release DCM release is available:
$ brew tap CQLabs/dcm
$ brew upgrade dcm
You can also download the .zip
archive with executable from our GitHub.
And then install the VS Code extension or IntelliJ / Android Studio plugin (depending on what IDE you use).
System requirements:
- 64-bit Windows OS, Linux OS or macOS system
- Installed Dart / Flutter SDK
Activating the license
In order to use DCM for Teams, after the installation of the executable and the IDE extension it's required to activate the tool. This is a one time operation.
To activate the license use dcm activate --license-key=YOUR_KEY
CLI command or IDEs extension command DCM: Activate license key
.
Licenses activation is calculated per device, so attempts to activate a license multiple times on the same device won't subtract the activations count.
Running executable on CI/CD
In order to run commands on CI, instead of using dcm activate
it is expected that each command will be called with --ci-key
and --email
arguments. For example, dcm analyze --ci-key=YOUR_CI_KEY --email=LICENSE_EMAIL
.
Migrating from Individuals version
If you're migrating from the Individuals version, follow these steps:
- Remove DCM as your package dependency.
- Remove DCM from the
plugins
section of theanalysis_options.yaml
. All other configuration can be left unchanged. - Instead of calling
dart pub run dart_code_metrics:metrics analyze lib
simply calldcm analyze lib
. - Update CI/CD to also call
dcm
executable.
If you any feedback about the migration process or the tool, please fill this form or send us a message.
Next Steps
- Learn about the configuration options for customizing DCM's behavior.
- Get familiar with the Command Line Interface for running DCM from the console.
- Explore VS Code extension and IntelliJ plugin.