Reference Guide

Dextora Documentation

Dextora is an open-source Python CLI toolkit designed to detect and diagnose project setup, environment configuration, dependency mismatches, and common version control pitfalls.

Installation & Prerequisites

Prerequisites: Python 3.11 or newer is required to execute the CLI (declared as requires-python = ">=3.11" in pyproject.toml).

Install via pip:
pip install dextora
Local editable development setup:
# 1. Clone repository
git clone https://github.com/TanishJain13/Dextora.git
# 2. Create and activate virtual environment
python -m venv .venv && source .venv/bin/activate
# 3. Install in editable mode with development dependencies
pip install -e ".[dev]"

The `doctor` Command

The primary diagnostic command. Analyzes project manifests, virtual environments, dependencies, .env templates, and git status.

dextora doctor [path]

Scans target directory. If path is omitted, defaults to the current working directory.

$ dextora doctor
$ dextora doctor /path/to/my-project

CI & Automation Flags

--json

Emits unadorned, machine-readable JSON representation of all scan results. Includes error counts, findings list, evidence snippets, and remediation commands.

dextora doctor --json
--strict

By default, Dextora exits with code 1 only on ERROR. With --strict, any warning will also exit with code 1.

dextora doctor --strict

The `init` Command

Creates a minimal project-level .dextora.toml configuration. Refuses to overwrite an existing configuration without the --force flag.

dextora init [path] [--force]
$ dextora init
$ dextora init --force # Overwrite existing .dextora.toml

Configuration Spec (.dextora.toml)

When present in the project root, Dextora loads rule configurations, severity thresholds, and diagnostic overrides:

# Dextora Project Configuration
# Project diagnostics configuration

[project]
# Optional project name override
name = "my-application"

[diagnostics]
# Severity threshold for strict CI mode: "ERROR" or "WARNING"
fail_on = "ERROR"

# Diagnostic check overrides or exclusions
ignore = ["DEP008"]

Execution Safety Model

Read-Only Operations

Doctor scans never mutate, write to, or delete files in target repositories.

Secret Redaction

Secret values from .env files are never parsed into memory, logged, or exposed in output.