Complete reference for all exportify commands.
For a hands-on introduction, see Getting Started.
exportify COMMANDManage Python package exports: sync, check, and maintain consistency.
Commands:
init: Initialize project configuration.sync: Align project code with export rules.check: Validate exports and__all__consistency.undo: Restore files from the lastsyncrun.doctor: Run system health checks.cache: Manage analysis results and cache.
exportify init [OPTIONS] [OUTPUT]Initialize exportify with a default configuration file.
Creates .exportify/config.yaml in the current directory with sensible default
rules that work for most Python packages. Edit the file afterwards to
customize which symbols are exported and how they propagate.
Arguments:
OUTPUT: Output path for the config YAML [default: .exportify/config.yaml]
Parameters:
--dry-run, --no-dry-run: Show generated config without writing files [default: False]--force, --no-force: Overwrite existing config file [default: False]--verbose, --no-verbose: Show full configuration summary [default: False]
exportify sync [OPTIONS] [PATHS...]Align your project's code with your export rules.
The sync command ensures that your project's __init__.py files and __all__ declarations exactly match your configured export rules.
Actions:
- Creates missing
__init__.pyfiles in package directories - Updates
_dynamic_importsand__all__in__init__.pyfiles - Updates
__all__in regular modules to match export rules - Preserves manually written code above the managed exports sentinel
Use --dry-run to preview all changes before writing any files.
Arguments:
PATHS: Files or directories to limit synchronization to (default: whole project)
Parameters:
--source: Source root directory--output: Output directory (default: same as source)--module-all, --no-module-all: Only sync__all__in regular modules--package-all, --no-package-all: Only sync__all__and exports in__init__.pyfiles--dry-run, --no-dry-run: Show what would change without writing [default: False]--verbose, --no-verbose: Show detailed output [default: False]
exportify check [OPTIONS] [PATHS...]Validate exports and __all__ declarations for consistency.
Checks:
lateimport()/LateImportcalls resolve to real modules (--lateimports)_dynamic_importsentries in__init__.pyfiles resolve correctly and match__all__(--dynamic-imports)__all__in regular modules matches configured export rules (--module-all)__all__and exports in__init__.pyfiles are consistent with each other (--package-all)
Pass one or more flags explicitly to run only those checks.
Use --no-X flags to skip specific checks while running the rest.
Omit all flags to run every check.
Note: The lateimports check is automatically skipped if lateimport is not
listed as a project dependency (it's an opt-in library).
Arguments:
PATHS: Paths to check (default: whole project)
Parameters:
--source: Source root directory--lateimports, --no-lateimports: Checklateimport()/LateImportcalls--dynamic-imports, --no-dynamic-imports: Check_dynamic_importsentries in__init__.pyfiles--module-all, --no-module-all: Check__all__in regular modules--package-all, --no-package-all: Check__all__and exports in__init__.pyfiles--strict, --no-strict: Exit non-zero on warnings [default: False]--json, --no-json: Output results as JSON [default: False]--verbose, --no-verbose: Show detailed output [default: False]
exportify undo [OPTIONS] [PATHS...]Restore files from the last sync run.
Reads the snapshot taken before the most recent sync run and restores the original content. Idempotent — safe to run multiple times.
If paths are given, only matching files are restored.
Arguments:
PATHS: Files or directories to restore (default: all)
Parameters:
--verbose, --no-verbose: Show each restored file [default: False]
exportify doctor [OPTIONS]Run system health checks.
Checks:
- Cache health and validity
- Rule configuration
- System readiness
Parameters:
--short, --no-short: Show a quick snapshot instead of full health check [default: False]
Manage analysis results and cache.
exportify cache clearDelete all cached analysis results.
Removes all cached analysis results. The cache will be rebuilt on the next check or sync run.
exportify cache statsShow detailed cache statistics.