CLI

Configuration

Last updated on

Configure the Paradoc CLI

The CLI reads settings from two places: a global config for user-wide preferences, and the project manifest for project-specific overrides. This page explains the configuration system, including environment variables, cache, and proxy support.

Global configuration

The global config lives at ~/.paradoc/config.json. It applies to all projects unless overridden.

{
  "$schema": "https://schema.paradoc.dev/config.json",
  "defaults": {
    "output": "json",
    "artifactsDir": "artifacts"
  },
  "registries": {
    "@company": "https://registry.company.com"
  },
  "cache": {
    "ttl": 3600,
    "directory": "~/.paradoc/cache"
  },
  "security": {
    "allowedContentTypes": ["application/vnd.acme.form+json"]
  },
  "telemetry": {
    "enabled": false
  }
}

Fields

FieldTypeDefaultDescription
defaults.outputstring"json"Default output format (json, yaml, typed, ts)
defaults.artifactsDirstring"artifacts"Default directory for downloaded artifacts
registriesobject—Registry configuration by namespace. An artifact reference always names its namespace, as in @acme/w9. @paradoc is reserved and built in; an entry for it is an error
cache.ttlnumber3600Cache time-to-live in seconds
cache.directorystring"~/.paradoc/cache"Cache storage directory. ~ uses your home directory; relative paths use the directory containing the config file.
security.allowedContentTypesarray—Content types added to the built-in download defaults. This cannot narrow the defaults
telemetry.enabledbooleantrueSet to false to turn off telemetry
anonymousIdstring—Anonymous telemetry ID. The CLI creates it once and keeps it across resets

The CLI validates this file each time it reads or writes it. A missing file means no settings. If the file is not valid JSON, or has a key or value the schema does not accept, the command stops with an error that names the file and each bad key. The CLI does not change the file; fix it by hand.

Project overrides

The paradoc.json manifest can override global settings on a per-project basis. These fields take precedence over the global config:

  • artifacts.output — output format
  • artifacts.dir — artifacts directory
  • registries — registry mappings
  • cache.ttl and cache.directory — cache settings
  • security — download settings

See the project manifest reference for full details.

Precedence

When resolving a setting, the CLI checks in this order:

  1. CLI flags (highest priority)
  2. Project config (paradoc.json)
  3. Global config (~/.paradoc/config.json)
  4. Built-in defaults (lowest priority)

For registries, a project-level namespace mapping always wins over the same namespace in the global config.

Global flags

These flags can be passed to any command:

FlagDescription
--no-telemetryDisable telemetry for this invocation
-h, --helpDisplay help for the command
-v, --versionDisplay the CLI version
paradoc --no-telemetry add @paradoc/w9

The configure wizard

The paradoc configure command walks you through each setting interactively and saves results to the global config:

paradoc configure

The wizard covers output format, artifacts directory, cache TTL, and telemetry. Press Enter at any prompt to keep the current value.

Environment variables

The CLI reads these environment variables:

VariablePurpose
PARADOC_NO_UPDATE_CHECK=1Turn off the update check
PARADOC_TELEMETRY_DISABLED=1Turn off telemetry
PARADOC_TELEMETRY_DEBUG=1Log telemetry events to the console
DO_NOT_TRACK=1Turn off telemetry (cross-tool standard)
PARADOC_TELEMETRY_URLSend telemetry to another origin, such as https://telemetry-dev.paradoc.dev
CITurn off the update check when set
HTTPS_PROXY, HTTP_PROXYSend requests through a proxy

Registry URLs and headers also support ${VAR_NAME} expansion:

{
  "registries": {
    "@private": {
      "url": "https://${PRIVATE_REGISTRY_HOST}",
      "headers": {
        "Authorization": "Bearer ${REGISTRY_TOKEN}"
      }
    }
  }
}

The URL itself must remain a valid URL before expansion, so put placeholders inside a URL rather than using a placeholder as the entire value. Header values may be free-form placeholders. The CLI errors if a referenced environment variable is not set. Expansion works in both the global config and project manifest.

Cache

Registry data is cached locally at ~/.paradoc/cache/ to speed up repeated operations. The default TTL is 1 hour (3600 seconds).

Override the TTL globally in the config:

{
  "cache": {
    "ttl": 7200
  }
}

Or per registry:

{
  "registries": {
    "@acme": {
      "url": "https://registry.acme.com",
      "cache": {
        "ttl": 300
      }
    }
  }
}

Manage the cache with paradoc cache:

paradoc cache stats         # Show cache statistics
paradoc cache clear         # Clear all cached data
paradoc cache invalidate @acme  # Invalidate a specific registry

Proxy support

The CLI respects standard proxy environment variables for outbound HTTP requests:

  • HTTPS_PROXY / https_proxy
  • HTTP_PROXY / http_proxy
export HTTPS_PROXY=http://proxy.example.com:8080
paradoc search lease

Update check

Once a day, the CLI checks npm for a newer paradoc-cli and prints a one-line notice after the command output, with the command to update it. The check is skipped when CI is set or output is not a terminal.

To turn it off:

export PARADOC_NO_UPDATE_CHECK=1

Telemetry

The CLI sends anonymous events to one endpoint, https://telemetry.paradoc.dev/v1/events/anonymous. The events are project.initialized, artifact.installed, registry.added, and directory.installed. Events include the operating system, CPU architecture, Node.js version, and whether the CLI is running in CI. Public-registry installs also include the registry origin, artifact name, artifact version, and artifact kind. For a public-registry install the CLI sends directory.installed with those same fields, so directories can count installs. No personal information or artifact content is collected.

Telemetry can be disabled in three ways:

CLI flag (per invocation):

paradoc --no-telemetry add @paradoc/w9

Global config (persistent):

{
  "telemetry": {
    "enabled": false
  }
}

Environment variables:

VariablePurpose
PARADOC_TELEMETRY_DISABLED=1Disable telemetry
DO_NOT_TRACK=1Disable telemetry (cross-tool standard)
PARADOC_TELEMETRY_DEBUG=1Log telemetry events to console
PARADOC_TELEMETRY_URLSend events to another origin, such as https://telemetry-dev.paradoc.dev for development

When multiple settings conflict, the CLI checks in this order: CLI flag, environment variables, global config. Any opt-out at any level disables telemetry entirely.

A registry can disable its own install telemetry with enableTelemetry: false, or only the directory.installed event with enableDirectory: false. The publisher sets both in registry.config.json, and registry compile writes them to registry.json.

On this page