internal/

directory
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: MIT

README

Package boundaries

cmd/xf is the process entry point: it handles signals and exits with the status cli.Run returns. internal/cli builds the Cobra command tree, binds flags, dispatches commands, and renders errors and exit codes. It delegates execution to commands/<command> using contexts, arguments, and concrete options.

Command packages do not import one another. Each subcommand has its own action file in its parent's package. Helpers used by multiple actions belong in separate responsibility-named files. Code used by different command families belongs outside commands.

Shared responsibilities

Package Responsibility
auth OAuth and credential-source selection, storage, and token lifecycle.
build Add-on release and JavaScript build execution.
cache Downloaded archives, metadata, integrity checks, and cache storage.
clierror Error classification, usage markers, hints, cancellation, and child exit status.
cli Command tree, flag binding, dispatch, and process-level error reporting.
config CLI configuration and its defaults.
customerapi Authenticated access to the XenForo customer API.
devoutput Conversion of prepared development output to release XML.
downloads Licensed product selection, acquisition, and cached archive extraction.
environment Environment files, Compose operations, and host/container execution.
extract Safe extraction of XenForo archives.
passthrough Optional installation arguments and shared tool invocation semantics.
setup Environment setup reused by initialization and worktree creation.
stream Stream progress reporting.
ui Terminal rendering, status output, and subprocess progress presentation.
version CLI build metadata, including the existing linker-injected values.
xf Installation discovery, installed XenForo versions, and installation metadata.

Export APIs for actual production consumers outside the package, not to expose implementation details to tests. Serialization and interface methods retain the visibility their protocols require.

Directories

Path Synopsis
Package auth handles authentication and OAuth flows.
Package auth handles authentication and OAuth flows.
Package build creates XenForo add-on releases and builds JavaScript assets.
Package build creates XenForo add-on releases and builds JavaScript assets.
Package cache manages downloaded files and their metadata.
Package cache manages downloaded files and their metadata.
Package cli defines the xf command tree and its process entry point.
Package cli defines the xf command tree and its process entry point.
commands
db
doctor
Package doctor provides health checks for CLI dependencies and configuration.
Package doctor provides health checks for CLI dependencies and configuration.
php
ps
selfupdate
Package selfupdate provides CLI self-update functionality using GitHub releases.
Package selfupdate provides CLI self-update functionality using GitHub releases.
up
update
Package update refreshes a project's Docker environment files and images from the versions embedded in the CLI.
Package update refreshes a project's Docker environment files and images from the versions embedded in the CLI.
worktree
Package worktree manages Git worktrees and Jujutsu workspaces for XenForo development environments.
Package worktree manages Git worktrees and Jujutsu workspaces for XenForo development environments.
Package completion provides shell completion candidates for commands that take license keys, download IDs, cache entries or Docker contexts.
Package completion provides shell completion candidates for commands that take license keys, download IDs, cache entries or Docker contexts.
Package config manages CLI configuration and settings.
Package config manages CLI configuration and settings.
Package customerapi provides an authenticated HTTP client for the XenForo Customer API.
Package customerapi provides an authenticated HTTP client for the XenForo Customer API.
Package devoutput converts prepared XenForo development output into release XML.
Package devoutput converts prepared XenForo development output into release XML.
Package downloads handles product and add-on download selection and retrieval.
Package downloads handles product and add-on download selection and retrieval.
Package environment provides Docker environment setup and execution.
Package environment provides Docker environment setup and execution.
Package extract provides utilities for extracting zip files.
Package extract provides utilities for extracting zip files.
Package stream provides utilities for tracking download and streaming progress.
Package stream provides utilities for tracking download and streaming progress.
Package ui provides formatting and styling utilities for console output.
Package ui provides formatting and styling utilities for console output.
Package version provides CLI version information.
Package version provides CLI version information.
Package xf provides utilities for XenForo installation detection and management.
Package xf provides utilities for XenForo installation detection and management.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL