# Command Line Interface

The command line interface to DeepSource. The DeepSource CLI requires you to authenticate with your account before using it. At the moment, the CLI is used to report artifacts to the analyzer.

# Installation

curl https://deepsource.io/cli | sh

This script will detect the operating system and architecture and puts deepsource binary in ./bin/deepsource.

Supported operating systems: linux, darwin, freebsd, openbsd, netbsd.

Supported architectures: i386, x86_64.

# Configuration

  • Set DEEPSOURCE_DSN envrionment variable. It will be available under 'Settings' tab of the repository page.

WARNING

The CLI should be run from repository root which has .deepsource.toml.

# Usage

./bin/deepsource <command> [<arguments>]

TIP

See ./bin/deepsource <command> --help to read about a specific subcommand or concept right from the CLI.

# Commands

# report

Reports an artifact to the analyzer. Some analyzers requires artifacts to be pushed.

# Arguments
  • --analyzer Shortcode of the analyzer. Refer analyzer list for respective shortcode.
  • --key Name of the artifact. Case insensitive.
  • --value Value of the artifact.
  • --value-file Path to the artifact value file.

TIP

Refer respective analyzer's documentation for supported keys and values.

# Examples

To report python test coverage artifact to test-coverage analyzer, run,

./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml

TIP

Note: Name of the key is case insensitive. The following commands produce identical results.

./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml
./bin/deepsource report --analyzer test-coverage --key Python --value-file ./coverage.xml
Last Updated: 12/5/2019, 4:19:36 PM