Counting Contributing Developers

The git count-contributors command in JFrog CLI allows users to easily determine the number of Git developers contributing to a source code repository. This is based on unique email addresses from commit history, providing an accurate count of individual contributors according to the GIT provider API used by the JFrog CLI command.

There are several options to obtain the developer count:

  • A single code repository: Analyze a single Git repository by providing the repository name.
  • Across a project/group: Analyze multiple repositories organized under a project/group by providing the owner command option.
  • Across multiple Git servers: Analyze repositories across multiple Git servers by providing a YAML file with the required parameters outlined below.

Command: git count-contributors, git cc

Before You Begin

It is essential that you have:

  • JFrog CLI 2.60.0
  • One of the following supported git providers: GitHub, GitLab, Bitbucket
📘

The git count-contributors command does not use JFrog Artifactory data. Counts are based only on Git commit history, so some repositories and developers included may not interact with JFrog products

Parallel Scanning

Repositories are scanned concurrently to improve performance. By default, up to 10 repositories are scanned in parallel. Each repository is scanned independently, and results are automatically merged after all tasks complete. You can control the level of parallelism with the --threads flag.

Result Caching

Scan results are cached locally to avoid redundant API calls on repeated runs. Cache entries are stored as JSON files under ~/.jfrog/contributors-cache/<hash>/, where <hash> is a SHA256 digest of the scan parameters (SCM type, API URL, owner, and month range). Cached results are reused if they are within the validity window (default: 3 days). You can control this behavior with the --cache-validity flag.

📘

Set --cache-validity=0 to bypass the cache entirely and force a fresh scan from the Git provider.

Command Parameters

OptionRequiredDefaultDescriptionExample
--scm-typeYesSCM type. One of: github, gitlab, bitbucket.--scm-type=github
--scm-api-urlYesBase URL of the SCM API endpoint.--scm-api-url=https://api.github.com
--tokenYesAuthentication token for the SCM API.--token=<token>
--ownerYesOwner/organization (project/group) of the repositories.--owner=my-org
--repo-nameNoSemicolon-separated list of repository names.--repo-name=repo1;repo2
--monthsNo1Number of months of commit history to analyze.--months=6
--detailed-summaryNofalseInclude a detailed list of contributors in the output.--detailed-summary=true
--input-fileNoPath to YAML file describing multiple Git servers to scan.--input-file="/path/to/input.yaml"
--threadsNo10Number of parallel threads used to scan repositories concurrently.--threads=20
--cache-validityNo3Number of days a cached scan result remains valid. Set to 0 to skip the cache and force a fresh scan.--cache-validity=7
--verboseNoVerbose output.--verbose

Examples

Single Repository

jf git count-contributors \
  --scm-type=github \
  --scm-api-url=https://api.github.com \
  --token=<token> \
  --repo-name=repo1

Owner/Project (Group) Level

jf git count-contributors \
  --scm-type=gitlab \
  --scm-api-url=https://gitlab.example.com \
  --token=<token> \
  --owner=my-group

Parallel Scan with Custom Thread Count

jf git count-contributors \
  --scm-type=github \
  --scm-api-url=https://api.github.com \
  --token=<token> \
  --owner=my-org \
  --threads=20

Fresh Scan (Bypass Cache)

jf git count-contributors \
  --scm-type=github \
  --scm-api-url=https://api.github.com \
  --token=<token> \
  --owner=my-org \
  --cache-validity=0

Multiple Git Servers (YAML File)

git cc --input-file="/Users/path/to/input.yaml"

Sample YAML File

git-servers-list:
  - scm-type: bitbucket
    scm-api-url: "https://api.bitbucket.example.com"
    token: "token"
    owner: "owner"
    repositories:
      - "repo1"
      - "repo2"
  - scm-type: gitlab
    scm-api-url: "https://gitlab.example.com/api/v4"
    token: "token"
    owner: "owner"

Output

Typical fields include:

  • total_unique_contributors — distinct contributors
  • total_commits — commits analyzed
  • scanned_repos — repositories scanned
  • report_date — ISO 8601 timestamp
  • number_of_months — analysis window
  • unique_contributors_list — when --detailed-summary=true