Skip to content

Configuration File Reference

Detailed reference for the .ghextractorrc configuration file options.

File Format

The configuration file can be in JSON format with the following structure:

json
{
  "format": ["markdown", "json"],
  "output": "./exports",
  "backup": true,
  "rateLimit": 5000,
  "cache": true,
  "since": "2023-01-01",
  "until": "2023-12-31",
  "concurrency": 5,
  "diffMode": true,
  "forceFullExport": false
}

Configuration Options

format

  • Type: string[]
  • Default: ["markdown"]
  • Description: Output formats to generate. Valid values are markdown and json.

output

  • Type: string
  • Default: "./github-export"
  • Description: Directory path where exported files will be saved.

backup

  • Type: boolean
  • Default: false
  • Description: Enable full backup mode which exports all available data types.

rateLimit

  • Type: number
  • Default: 1000
  • Description: Delay in milliseconds between API requests to respect rate limits.

cache

  • Type: boolean
  • Default: true
  • Description: Enable caching of API responses to reduce requests and improve performance.

since

  • Type: string
  • Default: null
  • Description: Export only items created or updated after this date (ISO 8601 format).

until

  • Type: string
  • Default: null
  • Description: Export only items created or updated before this date (ISO 8601 format).

concurrency

  • Type: number
  • Default: 5
  • Description: Maximum number of concurrent API requests.

diffMode

  • Type: boolean
  • Default: false
  • Description: Enable incremental export mode that only exports new/updated items since last run.

forceFullExport

  • Type: boolean
  • Default: false
  • Description: Force full export even if previous state exists (overrides diff mode).

templates

  • Type: object
  • Default: {}
  • Description: Custom template paths for different data types.
  • Example:
    json
    {
      "templates": {
        "pullRequests": "./templates/pr.hbs",
        "issues": "./templates/issues.hbs"
      }
    }

Environment Variable Mapping

Each configuration option can also be set using environment variables:

Config OptionEnvironment Variable
formatGHEXTRACTOR_FORMAT
outputGHEXTRACTOR_OUTPUT
backupGHEXTRACTOR_BACKUP
rateLimitGHEXTRACTOR_RATE_LIMIT
cacheGHEXTRACTOR_CACHE
sinceGHEXTRACTOR_SINCE
untilGHEXTRACTOR_UNTIL
concurrencyGHEXTRACTOR_CONCURRENCY
diffModeGHEXTRACTOR_DIFF_MODE
forceFullExportGHEXTRACTOR_FORCE_FULL_EXPORT

Environment variables take precedence over configuration file values.

Released under the MIT License.