# CommandSection

title: SYNOPSIS
content:
<b>ibmcloud call</b> <i>TARGET_URL</i> [<b>-m</b> <i>METHOD</i>] [<b>-H</b> <i>HEADER</i>] [<b>-d</b> <i>DATA</i>] [<b>--output</b> <i>FORMAT</i>] [<b>--check-status</i>] [<b>--include-headers</i>]


title: PARAMETERS
content:
<b><i>TARGET_URL</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The full URL of the API endpoint to which the request will be sent. This can be any valid IBM Cloud API endpoint.<br><br><b><b>-m</b> <i>METHOD</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the HTTP method to use for the request (e.g., GET, POST, PUT, DELETE). If omitted, GET is the default.<br><br><b><b>-H</b> <i>HEADER</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adds a custom HTTP header to the request. This option can be specified multiple times for different headers. Format: "Name:Value".<br><br><b><b>-d</b> <i>DATA</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Provides the request body or data to be sent with the request. For JSON, ensure the data is properly escaped or enclosed in single quotes, e.g., <i>'{ "key": "value" }'</i>.<br><br><b><b>--output</b> <i>FORMAT</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Defines the desired output format for the API response. Common formats include <i>JSON</i> or <i>TEXT</i>.<br><br><b><b>--check-status</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;If specified, the command will check for non-2xx HTTP status codes in the API response and exit with an error if found.<br><br><b><b>--include-headers</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Includes the HTTP response headers in the command's output, useful for debugging or detailed analysis.<br><br>


title: DESCRIPTION
content:
The command <b>ibmcloud-api</b> itself is <i>not</i> a direct or standalone command within the standard IBM Cloud Command Line Interface (CLI). However, the <b>ibmcloud</b> CLI provides comprehensive capabilities for interacting with IBM Cloud APIs. The most direct and versatile method to make raw HTTP requests to any IBM Cloud API endpoint via the CLI is using the <b>ibmcloud call</b> command.<br><br>This command allows users to specify the target URL, HTTP method (e.g., GET, POST), custom headers, and the request body. It's an indispensable tool for developers and administrators needing fine-grained control over API interactions, enabling rapid prototyping, testing, and automation of tasks that may not be fully covered by specific <b>ibmcloud</b> service commands. The <b>ibmcloud call</b> command automatically handles authentication by leveraging the current <b>ibmcloud</b> login session's credentials, simplifying the process of interacting with secured IBM Cloud services.


title: CAVEATS
content:
The specific command <b>ibmcloud-api</b> does not exist as a direct subcommand or standalone executable in the IBM Cloud CLI. This analysis is based on the <b>ibmcloud call</b> command, which provides the primary means of direct API interaction. Users must be successfully logged into the IBM Cloud CLI via <b>ibmcloud login</b> for authentication credentials to be automatically applied to API calls. The <i>TARGET_URL</i> must be a valid and accessible IBM Cloud API endpoint.


title: IBM CLOUD CLI <B>CLOUD-API</B> PLUGIN
content:
While <b>ibmcloud-api</b> is not a direct command, an official plugin named <b>cloud-api</b> exists for the IBM Cloud CLI. This plugin can be installed using <i><b>ibmcloud plugin install cloud-api</b></i>. Once installed, it provides a set of specialized commands (prefixed with <i>ibmcloud cloud-api</i>) designed for querying and interacting with the IBM Cloud API Catalog and specific API endpoints. It often offers a more structured way to discover and invoke APIs compared to the raw HTTP requests made by <b>ibmcloud call</b>, by abstracting some of the underlying API details.


title: HISTORY
content:
The IBM Cloud CLI has undergone continuous development, evolving from earlier CLI tools to its current comprehensive form. The <b>ibmcloud call</b> command was introduced to offer developers and administrators a powerful, generic mechanism for direct interaction with the vast and expanding ecosystem of IBM Cloud APIs. It addresses the need for flexibility, allowing users to quickly prototype, debug, and automate tasks involving new or niche API endpoints without needing to write dedicated programming scripts or manually manage API tokens.


title: TLDR
content:
<b>View the current API endpoint</b>`ibmcloud api`<br><b>Set the API endpoint to cloud.ibm.com</b>`ibmcloud api cloud.ibm.com`<br><b>Set a private API endpoint</b>`ibmcloud api private.cloud.ibm.com`<br><b>Use a VPC connection for a private endpoint</b>`ibmcloud api private.cloud.ibm.com --vpc`<br><b>Bypass SSL validation of HTTP requests</b>`ibmcloud api https://cloud.ibm.com --skip-ssl-validation`<br><b>Remove the API endpoint setting</b>`ibmcloud api --unset`


title: SYNOPSIS
content:
<br><b>ibmcloud ks</b> <I>&lt;main_command&gt;</I> [<I>&lt;subcommand&gt;</I>] [<I>&lt;options&gt;</I>]<br><br>Common <I>&lt;main_command&gt;</I> examples include: <b>cluster</b>, <b>worker</b>, <b>ingress</b>, <b>vlan</b>. Each <I>&lt;main_command&gt;</I> often has its own set of <I>&lt;subcommand&gt;</I> and <I>&lt;options&gt;</I>.


title: PARAMETERS
content:
<b>cluster</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Manages Kubernetes clusters, including creation, listing, getting details, resizing, and deletion.<br><br><b>worker</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Manages worker nodes within a Kubernetes cluster, covering listing, reloading, updating, and deleting worker nodes.<br><br><b>ingress</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Manages Ingress resources for exposing applications, including Ingress secrets and ALB (Application Load Balancer) configurations.<br><br><b>vpc-cluster</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Manages Kubernetes clusters provisioned in an IBM Cloud VPC (Virtual Private Cloud).<br><br><b>vlan</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Manages VLAN (Virtual Local Area Network) resources associated with classic infrastructure clusters.<br><br><b>zone</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists available zones where Kubernetes clusters can be provisioned.<br><br><b>flavor</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists available worker node flavors (CPU, RAM, storage configurations) for cluster creation.<br><br><b>api</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Manages the API endpoint for the Kubernetes Service plugin.<br><br><b>--help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays help information for the <b>ibmcloud-ks</b> command or its subcommands.<br><br>


title: DESCRIPTION
content:
The <b>ibmcloud-ks</b> command is a plugin for the IBM Cloud Command Line Interface (CLI) that enables users to manage their Kubernetes Service resources directly from the terminal. It provides a comprehensive set of functionalities for interacting with IBM Cloud Kubernetes clusters, including provisioning and deleting clusters, managing worker nodes, configuring network components like ingress and VLANs, and handling other cluster-related settings. This plugin is essential for developers, administrators, and DevOps professionals who need to automate or script their Kubernetes cluster operations on IBM Cloud, offering a powerful alternative to the graphical user interface. It integrates seamlessly with the broader IBM Cloud CLI ecosystem, allowing for consistent authentication and project management across various IBM Cloud services.


title: CAVEATS
content:
To use <b>ibmcloud-ks</b>, the <I>IBM Cloud CLI</I> must be installed and configured. Users must authenticate to their IBM Cloud account using <b>ibmcloud login</b> and have the necessary IAM permissions to manage Kubernetes Service resources. Operations are often sensitive to the currently targeted region and resource group, and many commands require specifying a cluster ID or name. Network connectivity to IBM Cloud endpoints is also essential.


title: INSTALLATION AND SETUP
content:
The <b>ibmcloud-ks</b> plugin is installed via the main <I>IBM Cloud CLI</I> using the command: <br><b>ibmcloud plugin install kubernetes-service</b>.<br>Before use, ensure you are logged into IBM Cloud: <br><b>ibmcloud login</b>


title: TARGETING CLUSTERS
content:
Many commands require you to target a specific cluster. After logging in, you can set the Kubernetes context using: <br><b>ibmcloud ks cluster config --cluster &lt;cluster_name_or_ID&gt;</b>.<br>This command also sets up your local <b>kubectl</b> configuration to interact directly with the cluster.


title: HISTORY
content:
The <b>ibmcloud-ks</b> command emerged as the primary command-line interface for managing the IBM Cloud Kubernetes Service (formerly IBM Cloud Container Service), which was introduced to provide managed Kubernetes clusters. As Kubernetes gained widespread adoption, IBM Cloud developed this dedicated plugin to empower users with programmatic control over their container orchestration platform. It has continuously evolved with new features mirroring the advancements in Kubernetes and IBM Cloud infrastructure, including support for VPC-based clusters and enhanced security features, becoming an indispensable tool for automation and integration within CI/CD pipelines.


title: TLDR
content:
<b>View the details of a cluster</b>`ibmcloud ks cluster get [[-c|--cluster]] [cluster_id]`<br><b>View the rotation status of Cluster Authority certificates for a cluster</b>`ibmcloud ks cluster ca status [[-c|--cluster]] [cluster_id]`<br><b>View worker pools of a cluster</b>`ibmcloud ks worker-pool ls [[-c|--cluster]] [cluster_id]`<br><b>Delete a worker node and replace it with a new one in the same worker pool</b>`ibmcloud ks worker replace [[-c|--cluster]] [cluster_id] [[-w|--worker]] [worker_id]`<br><b>List all actions available under this command</b>`ibmcloud ks help`


title: PARAMETERS
content:
<b><b>--json</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Outputs the list of regions in JSON format, which is useful for scripting and programmatic consumption. This overrides the default table-based output.<br><br><b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays help information for the <b>ibmcloud regions</b> command, including available options and usage examples.<br><br><b><b>--output</b> <i><format></i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the output format. Common values include <i>JSON</i> or <i>TEXT</i> (for the default table format). For example, <b>--output JSON</b> is equivalent to <b>--json</b>.<br><br>


title: DESCRIPTION
content:
The <b>ibmcloud-regions</b> command is a sub-command within the IBM Cloud CLI (Command Line Interface) suite. It serves as a crucial tool for developers and administrators to query and view information about the various geographical regions where IBM Cloud services and resources can be deployed.<br><br>IBM Cloud regions are distinct geographical locations that host multiple data centers, providing high availability, disaster recovery, and low-latency access to services. Understanding which regions are available and their specific endpoints is essential for planning deployments, configuring network access, and ensuring compliance with data residency requirements.<br><br>This command typically outputs details such as the region name, its API endpoint, and potentially its status or associated data centers. It's often the first step in understanding the global footprint of IBM Cloud and deciding where to provision new resources.


title: CAVEATS
content:
This command requires the IBM Cloud CLI to be installed and properly configured. While it lists available regions, it does not provide information on the specific services available within each region, nor does it indicate current service health status. Some regions might have limitations on the types of resources or services they support, which would need to be checked via service-specific documentation or other IBM Cloud CLI commands.


title: OUTPUT EXAMPLES
content:
When run without the <b>--json</b> option, the command typically produces a human-readable table with columns like <i>Name</i> and <i>Endpoint</i>. For example:<br><i><pre>Name          Endpoint<br>us-south      https://api.us-south.cloud.ibm.com<br>eu-de         https://api.eu-de.cloud.ibm.com<br>au-syd        https://api.au-syd.cloud.ibm.com</pre></i><br>Using <b>--json</b> provides a structured array of objects, each representing a region with detailed attributes, which is ideal for automation scripts.


title: CONTEXTUAL USAGE
content:
The <b>ibmcloud regions</b> command is often used in conjunction with <b>ibmcloud target -r <region_name></b> to switch the CLI's operational context to a specific region before executing other commands like creating resources or listing services. This ensures that subsequent operations are directed to the desired geographical location.


title: HISTORY
content:
The <b>regions</b> command has been a fundamental part of the IBM Cloud CLI since its early days, evolving with the expansion of IBM's global cloud infrastructure. As new regions and availability zones are introduced, the command's data source is updated to reflect the latest geographical coverage, making it a continuously relevant tool for cloud users. Its core functionality has remained consistent: providing a centralized way to discover IBM Cloud's global presence.


title: SYNOPSIS
content:
<b>ibmcloud target</b> [<i>OPTIONS</i>]<br><b>ibmcloud target</b> [-s | --show]<br><b>ibmcloud target</b> [-r <i>REGION_NAME</i> | --region <i>REGION_NAME</i>]<br><b>ibmcloud target</b> [-g <i>RESOURCE_GROUP_NAME</i> | --resource-group <i>RESOURCE_GROUP_NAME</i>]<br><b>ibmcloud target</b> [-e <i>API_ENDPOINT</i> | --endpoint <i>API_ENDPOINT</i>]


title: PARAMETERS
content:
<b><b>-s</b>, <b>--show</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Displays the current IBM Cloud API endpoint, region, and resource group settings.</i><br><br><b><b>-r</b> <i>REGION_NAME</i>, <b>--region</b> <i>REGION_NAME</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Sets the target IBM Cloud region where commands will be executed. Example: `us-south`, `eu-de`.</i><br><br><b><b>-g</b> <i>RESOURCE_GROUP_NAME</i>, <b>--resource-group</b> <i>RESOURCE_GROUP_NAME</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Sets the target resource group. All subsequent commands will operate within this specified resource group.</i><br><br><b><b>-e</b> <i>API_ENDPOINT</i>, <b>--endpoint</b> <i>API_ENDPOINT</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Sets the IBM Cloud API endpoint URL. This is rarely changed unless using a private endpoint or a different cloud environment.</i><br><br><b><b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Displays help information for the `<b>ibmcloud target</b>` command.</i><br><br>


title: DESCRIPTION
content:
The <b>ibmcloud target</b> command is a crucial part of the <i>IBM Cloud Command Line Interface (CLI)</i>. It allows users to manage their target settings for interacting with the IBM Cloud platform. Specifically, it enables you to view your current target settings, including the <i>IBM Cloud API endpoint</i>, the currently selected <i>region</i>, and the active <i>resource group</i>. More importantly, it provides the functionality to set these target parameters. Targeting the correct region and resource group ensures that subsequent <b>ibmcloud</b> commands operate on the intended resources within a specific geographical location and organizational container. For instance, you might use it to switch between different development and production environments, or to manage resources in different regions like `us-south` or `eu-de`. This command is essential for consistent and accurate resource management when working with multiple projects or across various cloud locations. It helps avoid accidental operations on the wrong resources by explicitly defining the operational scope for the CLI session.


title: CAVEATS
content:
<i>Changing the target settings (region, resource group, API endpoint) will affect all subsequent IBM Cloud CLI commands in the current shell session. Always verify your target settings with `<b>ibmcloud target -s</b>` before performing critical operations.</i><br><i>Ensure you are logged in to IBM Cloud (`<b>ibmcloud login</b>`) before attempting to set or view targets.</i><br><i>Resource groups and regions must exist and be accessible to your account, otherwise, the command will fail.</i>


title: <B>USAGE EXAMPLES</B>
content:
<i>To show current target settings:<br> `<b>ibmcloud target -s</b>`<br><br>To set the target region to `us-south`:<br> `<b>ibmcloud target -r us-south</b>`<br><br>To set the target resource group to `Default`:<br> `<b>ibmcloud target -g Default</b>`</i>


title: <B>DEFAULT BEHAVIOR</B>
content:
<i>When `<b>ibmcloud target</b>` is run without any options, it defaults to showing the current target settings, similar to using `<b>ibmcloud target -s</b>`.</i>


title: HISTORY
content:
<i>The `<b>ibmcloud target</b>` command is a fundamental component of the IBM Cloud CLI, tracing its lineage back to the `Bluemix CLI`. As IBM Cloud evolved, introducing concepts like resource groups and a unified API endpoint, the `<b>target</b>` command adapted to provide a consistent way for users to define their operational context. Its core functionality of setting API, region, and resource group has remained central to managing resources efficiently across different environments and locations within the IBM Cloud ecosystem.</i>


title: TLDR
content:
<b>View the current target account and region</b>`ibmcloud target`<br><b>Set the target account</b>`ibmcloud target -c [account_id]`<br><b>Switch to a specific region</b>`ibmcloud target -r [region_name]`<br><b>Set the target resource group</b>`ibmcloud target -g [resource_group_name]`<br><b>Clear the targeted region</b>`ibmcloud target --unset-region`<br><b>Clear the targeted resource group</b>`ibmcloud target --unset-resource-group`


title: SYNOPSIS
content:
<b>kubectl annotate</b> (<i>-f FILENAME</i> | <i>TYPE NAME</i> | <i>TYPE/NAME</i>) <i>KEY_1=VALUE_1</i> ... <i>KEY_N=VALUE_N</i> [<i>--overwrite</i>] [<i>--all</i>] [<i>--selector=SELECTOR</i>] [<i>--resource-version=version</i>] [<i>--dry-run[=SERVER|CLIENT|NONE]</i>] [<i>...common-kubectl-options</i>]


title: PARAMETERS
content:
<b><i>TYPE NAME</i> | <i>TYPE/NAME</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the resource type (e.g., <i>pod</i>, <i>deployment</i>) and its name. This is the most common way to target a single resource.<br><br><b><i>-f FILENAME</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies a file containing the resource definition. This allows annotating resources defined in a local YAML or JSON file.<br><br><b><i>KEY=VALUE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;One or more key-value pairs representing the annotations to be added or updated. Keys and values must adhere to Kubernetes annotation rules.<br><br><b><i>KEY-</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Removes the annotation with the specified key. To remove multiple annotations, list each key followed by a hyphen.<br><br><b><i>--all</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;If true, annotate all resources of the specified <i>TYPE</i> in the current namespace. For example, <b>kubectl annotate deployments --all my-annotation=value</b>.<br><br><b><i>--dry-run[=SERVER|CLIENT|NONE]</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;If true, only print the object that would be sent, without sending it. Useful for validating changes before applying them.<br><br><b><i>--field-selector=SELECTOR</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Selects resources by their field values. Useful for filtering specific resources based on properties other than labels (e.g., <i>--field-selector status.phase=Running</i>).<br><br><b><i>--overwrite</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;If true, allow annotations to be updated or overwritten if they already exist on the resource. Without this, attempting to modify an existing annotation will result in an error.<br><br><b><i>--resource-version=version</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies a resource version for optimistic concurrency control. If set, the operation will only succeed if the resource's current version matches the provided version.<br><br><b><i>--selector=SELECTOR</i>, <i>-l SELECTOR</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Selects resources by labels. This allows applying annotations to multiple resources that share specific labels. Example: <b>kubectl annotate pods -l app=myapp my-annotation=value</b>.<br><br><b><i>--timeout=duration</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The length of time to wait before giving up on a single server request (e.g., <i>5s</i>, <i>2m</i>, <i>1h</i>).<br><br>


title: DESCRIPTION
content:
The `kubectl annotate` command allows users to manage annotations on Kubernetes API objects. Annotations are key-value pairs used to attach arbitrary non-identifying metadata to objects. While labels are used for identifying and selecting groups of objects, annotations are designed for storing larger, non-queryable information, such as build information, release details, configuration management, or debugging data.<br><br>This command provides a straightforward way to add new annotations, modify existing ones (using the <i>--overwrite</i> flag), or remove them from resources like pods, services, deployments, and more. Annotations are crucial for tools and libraries that need to store additional context about an object without affecting its operational behavior or selection criteria. They facilitate automated workflows and provide human-readable context for administrators and developers.


title: CAVEATS
content:
<ul><li><b>Labels vs. Annotations</b>:<br>Annotations are designed for non-identifying metadata, while labels are for identifying attributes that can be queried and selected. Do not use annotations for grouping or selecting resources; use labels for that purpose.</li><li><b>Size Limits</b>:<br>Kubernetes annotations have size limits, typically around 256KB per object. Storing excessively large amounts of data can impact performance and API server stability.</li><li><b>Permissions</b>:<br>Users need appropriate permissions (e.g., <i>update</i> on the target resource type) to modify annotations.</li><li><b>Value Syntax</b>:<br>Annotation values are strings. Complex data structures must be serialized (e.g., as a JSON string) before being used as an annotation value.</li></ul>


title: ANNOTATION REMOVAL
content:
To remove an annotation, append a hyphen to the annotation key without a value. For example, <b>kubectl annotate pod my-pod my-old-annotation-</b>. This is an efficient way to clean up unwanted metadata.


title: COMMON USE CASES
content:
Annotations are widely used by tools for release management (e.g., Helm stores release metadata), build systems (e.g., Git commit IDs, build numbers), and debugging (e.g., last applied configuration, debug flags, or configuration management details).


title: BEST PRACTICES
content:
<ul><li>Use descriptive keys, often prefixed with a domain (e.g., <i>mycompany.com/build-id</i>) to avoid conflicts.</li><li>Avoid storing sensitive information directly in annotations; prefer references to secrets.</li><li>Keep annotation values relatively small to prevent performance issues and ensure manageability.</li></ul>


title: HISTORY
content:
The concept of annotations was introduced early in Kubernetes' development to provide a flexible mechanism for attaching arbitrary, non-identifying metadata to API objects, distinct from labels used for selection. The `kubectl annotate` command has been a core part of the `kubectl` CLI since its inception, offering a direct and programmatic way to manage this metadata. It evolved as Kubernetes matured, incorporating features like <i>--overwrite</i>, <i>--all</i>, and <i>--dry-run</i> to enhance usability and safety in managing resource annotations across various versions.


title: TLDR
content:
<b>Annotate a pod</b>`kubectl annotate [[po|pods]] [pod_name] [key]=[value]`<br><b>Update a pod annotation by overwriting the existing value</b>`kubectl annotate [[po|pods]] [pod_name] [key]=[value] --overwrite`<br><b>Annotate all pods in a namespace with a specific label selector</b>`kubectl annotate [[po|pods]] [key]=[value] [[-l|--selector]] [label_key]=[label_value]`<br><b>List all annotations a pod has</b>`kubectl annotate [[po|pods]] [pod_name] --list`<br><b>Remove the annotation from a pod</b>`kubectl annotate [[po|pods]] [pod_name] [key]-`


title: PARAMETERS
content:
<b><I>POD</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The <B>required</B> name of the pod to attach to.<br><br><b><B>-c</B>, <B>--container=</B><I>NAME</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Name of the container to attach to. If omitted and the pod has only one container, that container will be used.<br><br><b><B>--stdin</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Pass standard input (stdin) to the container. Necessary for interactive sessions.<br><br><b><B>--tty</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Allocate a TTY for the container. Often used with <B>--stdin</B> for interactive shells.<br><br><b><B>--namespace=</B><I>NAME</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;If present, the namespace scope for this CLI request.<br><br><b><B>--pod-running-timeout=</B><I>DURATION</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The time to wait (e.g., 5s, 2m) until at least one pod is running. Use 0 for no timeout.<br><br><b><B>--quiet</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not print header information (pod/container names) before attaching.<br><br>


title: DESCRIPTION
content:
The <I>kubectl attach</I> command allows users to connect to a specific running container within a Kubernetes pod, effectively redirecting its standard output (stdout), standard error (stderr), and optionally standard input (stdin) to the local terminal. This capability is crucial for real-time observation of containerized application logs, particularly for the primary process (PID 1). Unlike <I>kubectl logs</I>, which retrieves past logs, <I>attach</I> provides a live stream of the process's I/O and can enable interactive communication if the container's process is designed to accept input (e.g., a simple shell or an interactive application). It's invaluable for debugging, monitoring, and direct interaction with the main application process. The command will block until the attached process exits or the user explicitly detaches using the appropriate escape sequence.


title: CAVEATS
content:
<ul><li><I>kubectl attach</I> connects to the <B>primary process</B> (PID 1) of the container. If that process doesn't handle standard I/O or signals gracefully, interaction may be limited.</li><li>It does not create a new process; it connects to an <B>already running</B> one. If the connected process exits, <I>kubectl attach</I> will also terminate.</li><li>For interactive shells, the container image must include a shell and the primary process must be configured to accept stdin.</li><li>Attaching to containers can expose sensitive information or allow unintended interaction, depending on container contents and permissions.</li></ul>


title: <B>DIFFERENCE WITH `KUBECTL EXEC`</B>
content:
While both commands allow interaction with containers, <I>kubectl attach</I> connects to the <B>already running primary process</B> (PID 1) of a container, redirecting its standard I/O streams. It's ideal for monitoring the main application logs in real-time or interacting with an application designed to handle standard I/O directly. In contrast, <I>kubectl exec</I> runs a <B>new command</B> within an existing container. This is typically used to spawn a shell (e.g., <I>bash</I> or <I>sh</I>) for debugging, inspecting files, or running utilities, without affecting the container's primary application process. For most interactive debugging tasks where a shell is needed, <I>kubectl exec</I> is often preferred.


title: <B>DETACHING FROM A CONTAINER</B>
content:
To detach from a container attached via <I>kubectl attach</I> without terminating the process within the container, use the escape sequence <B>Ctrl+P</B> followed by <B>Ctrl+Q</B>. Simply closing the terminal or pressing <B>Ctrl+C</B> will send a signal (like SIGINT or SIGHUP) to the attached process, which might cause the process to terminate, depending on its signal handling configuration.


title: HISTORY
content:
<I>kubectl attach</I> has been a fundamental command in Kubernetes since its early days, providing a direct, real-time window into the standard I/O of containerized applications. It emerged as a core debugging and monitoring tool, distinct from <I>kubectl logs</I> by offering live streaming and interactive capabilities. While <I>kubectl exec</I> later provided more flexibility by allowing the execution of new commands within containers (like spawning a shell), <I>attach</I> maintained its specific role for connecting to the primary process (PID 1), which is crucial for applications that manage their own I/O or where direct interaction with the main process is needed. Its design has remained consistent, focusing on robust I/O redirection for live container interaction.


title: TLDR
content:
<b>Get output from a pod</b>`kubectl attach [pod_name]`<br><b>Get output from a container in the specified pod</b>`kubectl attach [pod_name] [[-c|--container]] [container_name]`<br><b>Get output from the first pod of a replica set</b>`kubectl attach [[rs|replicaset]]/[replicaset_name]`<br><b>Create an interactive session with a pod</b>`kubectl attach [pod_name] [[-it|--stdin --tty]]`<br><b>Create an interactive session with a specific container from a pod</b>`kubectl attach [pod_name] [[-c|--container]] [container_name] [[-it|--stdin --tty]]`


title: TLDR
content:
<b>Create an interactive debugging session in a pod and immediately attach to it</b>`kubectl debug [pod_name] [[-it|--stdin --tty]] --image busybox`<br><b>Create a debug container with a custom image and name</b>`kubectl debug --image [image] [[-c|--container]] [container_name] [pod_name]`<br><b>Create an interactive debugging session on a node and immediately attach to it (the container will run in the host namespaces and the host's filesystem will be mounted at /host)</b>`kubectl debug node/[node_name] [[-it|--stdin --tty]] --image busybox`<br><b>Create a copy of a pod and add a debug container to it</b>`kubectl debug [pod_name] [[-it|--stdin --tty]] --image [image] --copy-to [pod_copy_name]`<br><b>Create a copy of a pod and change the command of a specific container</b>`kubectl debug [pod_name] [[-it|--stdin --tty]] --copy-to [pod_copy_name] --container [container_name] -- [command]`<br><b>Create a copy of a pod and change the image of a specific container</b>`kubectl debug [pod_name] --copy-to [pod_copy_name] --set-image [container_name]=[image]`<br><b>Create a copy of a pod and change all container images</b>`kubectl debug [pod_name] --copy-to [pod_copy_name] --set-image '*=[image]'`<br><b>Create an ephemeral debug container and target a specific container (useful for debugging distroless containers)</b>`kubectl debug [pod_name] [[-it|--stdin --tty]] --image [image] --target [target_container_name]`


title: SYNOPSIS
content:
<pre>kubectl port-forward (POD | TYPE/NAME) [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] [options]</pre><br> <I>Examples:</I><br> <pre>kubectl port-forward my-pod 8080:80</pre><br> <pre>kubectl port-forward service/my-service 8080</pre><br> <pre>kubectl port-forward deployment/my-deployment 5000:5000 -n my-namespace</pre>


title: PARAMETERS
content:
<b>POD | TYPE/NAME</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the target resource. This can be the name of a pod (e.g., <I>my-pod</I>) or a resource type followed by its name (e.g., <I>service/my-service</I>, <I>deployment/my-deployment</I>). When a resource type other than a pod is used, <I>kubectl</I> will automatically select an available pod associated with that resource.<br><br><b>[LOCAL_PORT:]REMOTE_PORT</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Defines the port mapping. <I>LOCAL_PORT</I> is the port on your local machine. If omitted, an available random local port will be chosen. <I>REMOTE_PORT</I> is the port inside the target pod to which traffic will be forwarded. Multiple port mappings can be specified.<br><br><b><b>-n, --namespace <namespace></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the Kubernetes namespace where the target pod or resource resides.<br><br><b><b>--address <ip_address(es)></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the local IP address(es) to bind to. By default, it binds to <I>127.0.0.1</I>. Use <I>0.0.0.0</I> to bind to all network interfaces. Can be specified multiple times for multiple addresses.<br><br><b><b>--pod-running-timeout <duration></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The maximum time <I>kubectl</I> will wait for the target pod to be in a running state before attempting to establish the port-forward connection. (e.g., <I>5s</I>, <I>2m</I>).<br><br><b><b>--kubeconfig <path></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Path to the kubeconfig file to use for authentication and cluster details.<br><br><b><b>--context <context_name></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The name of the kubeconfig context to use for this command.<br><br>


title: DESCRIPTION
content:
The `kubectl port-forward` command creates a secure, temporary tunnel between a local port on your machine and a port on a specific pod within a Kubernetes cluster. This utility is invaluable for developers and operators who need to access services running inside a pod for debugging, testing, or local development, without exposing these services externally through Kubernetes Services or Ingresses. It establishes a direct connection, bypassing the cluster's network policies, service mesh, and load balancers, making it ideal for isolated access to individual pod instances. The command listens on a specified local port and forwards all traffic to the corresponding port on the target pod, enabling direct interaction with applications, databases, or other services confined within the cluster network from your workstation.


title: CAVEATS
content:
<b>Ephemeral Connection:</b> The port-forward connection is temporary and active only for the duration the <I>kubectl port-forward</I> command is running. It must be manually restarted if the command exits.<br><b>Single Pod Targeting:</b> Even when targeting a resource like a deployment or service, <I>kubectl port-forward</I> will pick <I>one</I> available pod backing that resource. If that specific pod restarts or is rescheduled, the connection will break.<br><b>No Load Balancing:</b> This command bypasses Kubernetes Services and their load balancing capabilities. It provides a direct, one-to-one tunnel to a specific pod instance.<br><b>Security and RBAC:</b> Users require appropriate Kubernetes Role-Based Access Control (RBAC) permissions to <I>get</I> pods and <I>create</I> port-forward requests (<I>pods/portforward</I>).<br><b>Network Policies:</b> While it bypasses Kubernetes Services, internal pod network policies that restrict traffic <I>within</I> the cluster still apply to the forwarded connection.<br><b>Local Port Conflicts:</b> If you specify a <I>LOCAL_PORT</I> that is already in use on your machine, the command will fail unless you omit the <I>LOCAL_PORT</I> for automatic assignment.


title: BACKGROUNDING THE COMMAND
content:
To run <I>kubectl port-forward</I> in the background and continue using your terminal, append <I>&</I> to the command (e.g., <I>kubectl port-forward my-pod 8080:80 &</I>). To ensure it continues running even if your terminal session is closed, use <I>nohup</I> (e.g., <I>nohup kubectl port-forward my-pod 8080:80 > /dev/null 2>&1 &</I>).


title: KILLING THE PROCESS
content:
To stop a backgrounded port-forward process, you need to find its process ID (PID) using <I>ps aux | grep 'kubectl port-forward'</I> and then terminate it with <I>kill <PID></I>. Alternatively, if run in the foreground, simply press <I>Ctrl+C</I>.


title: HISTORY
content:
The <I>kubectl port-forward</I> command is a foundational utility within the Kubernetes command-line interface, <I>kubectl</I>. It was introduced early in Kubernetes' development lifecycle as a crucial tool for debugging and interacting with applications inside the cluster without needing to expose them publicly. While <I>kubectl</I> itself originated from Google's Borg project and was open-sourced as part of Kubernetes in 2014, the <I>port-forward</I> functionality has remained a consistent and stable feature. Its design reflects the need for secure, on-demand, and direct access to individual pod instances, which is essential for developers working on microservices architectures. The core functionality has seen few major changes, emphasizing its stable and vital role in the Kubernetes ecosystem.


title: TLDR
content:
<b>Forward local ports 5000 and 6000 to the pod ports 5000 and 6000</b>`kubectl port-forward [[po|pods]]/[pod_name] 5000 6000`<br><b>Forward a random local port to the pod port 5000</b>`kubectl port-forward [[po|pods]]/[pod_name] :5000`<br><b>Forward local ports 5000 and 6000 to the deployment ports 5000 and 6000</b>`kubectl port-forward [[deploy|deployment]]/[deployment_name] 5000 6000`<br><b>Forward local port 8443 to the service port named https</b>`kubectl port-forward [[svc|service]]/[service_name] 8443:https`<br><b>Forward port 8888 on all addresses to the pod port 5000</b>`kubectl port-forward [[po|pods]]/[pod_name] 8888:5000 --address 0.0.0.0`<br><b>Forward port 8888 on localhost and selected IP to the pod port 5000</b>`kubectl port-forward [[po|pods]]/[pod_name] 8888:5000 --address localhost,[10.19.21.23]`


title: SYNOPSIS
content:
<b>kubectl top</b> { <b>nodes</b> | <b>pods</b> } [<i>NAME</i> | <b>-l</b> <i>label_selector</i>] [<i>options</i>]<br><br><b>kubectl top nodes</b> [<i>NAME</i>] [<i>options</i>]<br><b>kubectl top pods</b> [<i>NAME</i> | <b>-l</b> <i>label_selector</i>] [<b>-n</b> <i>namespace</i> | <b>--all-namespaces</b>] [<i>options</i>]


title: PARAMETERS
content:
<b>--all-namespaces / -A</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>If present, list the requested object(s) across all namespaces.</i><br><br><b>--containers</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>If present, show all containers in a pod (only applicable for <I>top pods</I>).</i><br><br><b>--no-headers</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>If present, do not print the column headers.</i><br><br><b>--selector / -l</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Selector (label query) to filter nodes or pods. For example: <I>-l "app=myapp"</I>.</i><br><br><b>--sort-by</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Sort column for custom sorting. Can be "cpu" or "memory". For example: <I>--sort-by=memory</I>.</i><br><br><b>--namespace / -n</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>If present, the namespace scope for the request. Only applicable for <I>top pods</I> when not using <I>--all-namespaces</I>.</i><br><br><b>NAME</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specific name of the node or pod to view usage for.</i><br><br>


title: DESCRIPTION
content:
The <b>kubectl top</b> command provides a quick and convenient way to observe real-time resource consumption (CPU and memory) of Kubernetes nodes and pods. It acts as an interface to the <br> <br> <I>Kubernetes Metrics Server</I>, which collects resource metrics from Kubelets and exposes them via the Metrics API. This command is invaluable for monitoring cluster health, identifying resource bottlenecks, and debugging performance issues within your cluster. <br> <br> When used with <I>nodes</I>, it displays the total CPU and memory usage of each cluster node. When used with <I>pods</I>, it shows the resource usage for individual pods, and with the <I>--containers</I> option, it can even break down usage per container within a pod. <br> <br> It's important to note that <b>kubectl top</b> does not show resource requests or limits defined for pods or containers; it only reports actual usage. Its simplicity and immediate feedback make it a go-to tool for initial performance investigations.


title: CAVEATS
content:
The primary limitation of <b>kubectl top</b> is its dependency on the <I>Kubernetes Metrics Server</I>. If the Metrics Server is not deployed or is not functioning correctly in your cluster, <b>kubectl top</b> will fail with an error stating that metrics are not available. <br> <br> The data provided by <b>kubectl top</b> represents current or near-current usage, which might be slightly aggregated or delayed, typically within a minute. It does not provide historical data or trend analysis. Furthermore, it only shows actual usage and does not display configured resource requests, limits, or quotas for pods and containers, which are crucial for understanding resource allocation and potential throttling.


title: METRICS SERVER REQUIREMENT
content:
<i><b>kubectl top</b> will not work if the Kubernetes Metrics Server is not running in your cluster. You can usually deploy it using official manifests or a Helm chart. Verify its presence with <I>kubectl get --raw "/apis/metrics.k8s.io/v1beta1"</I>.</i>


title: UNDERSTANDING OUTPUT UNITS
content:
<i>CPU usage is typically reported in <I>millicores (m)</I>, where 1000m equals one CPU core. Memory usage is reported in <I>mebibytes (Mi)</I> or <I>gibibytes (Gi)</I>. These units are crucial for interpreting the reported values correctly.</i>


title: HISTORY
content:
The <b>kubectl top</b> command was introduced as a convenient way to integrate resource monitoring directly into the Kubernetes command-line interface. Its functionality is entirely reliant on the <I>Kubernetes Metrics Server</I>, which emerged as a standard, lightweight solution for collecting core resource metrics (CPU and memory usage) in Kubernetes clusters. <br> <br> Prior to the widespread adoption of the Metrics Server, users often relied on more complex monitoring solutions or custom scripts to gather similar data. <b>kubectl top</b> filled a crucial gap by providing an on-demand, simple view of resource consumption, making initial diagnostics and daily operational tasks significantly easier for cluster administrators and developers. Its design reflects the Kubernetes philosophy of providing simple, focused tools for common tasks.


title: TLDR
content:
<b>Get the resource consumption of all nodes</b>`kubectl top [[no|nodes]]`<br><b>Get resource consumption of a specific node</b>`kubectl top [[no|nodes]] [node_name]`<br><b>Get resource consumption of all pods</b>`kubectl top [[po|pods]]`<br><b>Get resource consumption of a specific pod</b>`kubectl top [[po|pods]] [pod_name]`<br><b>Get resource consumption of all pods in a namespace</b>`kubectl top [[po|pods]] [[-n|--namespace]] [namespace_name]`<br><b>Get resource consumption of all containers in a pod</b>`kubectl top [[po|pods]] --containers`<br><b>Get resource consumption of all pods with the specified label</b>`kubectl top [[po|pods]] [[-l|--selector]] [key=value]`


title: SYNOPSIS
content:
<b>mvn</b> <i>dependency:</i><b>&lt;goal&gt;</b> [<i>-D&lt;property&gt;=&lt;value&gt;</i>] [<i>-P&lt;profile&gt;</i>] [<i>&lt;Maven_Options&gt;</i>]


title: PARAMETERS
content:
<b><b>dependency:tree</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays the full dependency tree for the project, showing direct and transitive dependencies. Useful for identifying conflicts or unwanted inclusions.<br><i>Example: <b>mvn dependency:tree -Dverbose</b></i><br><br><b><b>dependency:resolve</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Resolves all project dependencies and displays a list of the resolved artifacts. It's often used implicitly by other goals but can be run explicitly to check resolution issues.<br><br><b><b>dependency:analyze</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Analyzes the project's dependencies for potential issues, reporting 'used declared', 'used undeclared', and 'unused declared' dependencies. Helps in optimizing <i>pom.xml</i>.<br><i>Example: <b>mvn dependency:analyze</b></i><br><br><b><b>dependency:copy-dependencies</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Copies project dependencies to a specified output directory. Useful for creating a 'lib' folder for deployment or execution.<br><i>Example: <b>mvn dependency:copy-dependencies -DoutputDirectory=target/libs</b></i><br><br><b><b>dependency:purge-local-repository</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Purges (deletes) artifacts from the local Maven repository based on the project's dependencies, forcing Maven to re-download them.<br><i>Example: <b>mvn dependency:purge-local-repository -DactTransitively=false</b></i><br><br><b><b>dependency:get</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Downloads a single artifact from the remote repositories to the local repository. Handy for manually fetching a specific library.<br><i>Example: <b>mvn dependency:get -Dartifact=groupId:artifactId:version</b></i><br><br><b><i>-D&lt;property&gt;=&lt;value&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets a system property, often used to pass configuration parameters to specific goals (e.g., <i>-DoutputFile=tree.txt</i> for <b>dependency:tree</b>).<br><br><b><i>-P&lt;profile&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Activates a specific Maven profile defined in the <i>pom.xml</i> or settings, which can alter dependency declarations or plugin configurations.<br><br><b><i>&lt;Maven_Options&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;General Maven command-line options like <i>-U</i> (force update of snapshots/releases), <i>-B</i> (batch mode), <i>-f &lt;file&gt;</i> (specify POM file), etc.<br><br>


title: DESCRIPTION
content:
The "<b>mvn-dependency</b>" command is not a standalone Linux executable but rather a shorthand reference to invoking the <i>Maven Dependency Plugin</i> via the <b>mvn</b> command-line tool. This powerful plugin is an essential part of the Apache Maven ecosystem, designed to manage, analyze, and manipulate project dependencies. Its primary functions include:<br><br>•  <b>Understanding Dependency Trees</b>: Visualizing and analyzing the full hierarchy of direct and transitive dependencies.<br>•  <b>Resolving Conflicts</b>: Identifying and helping to resolve version conflicts among dependencies.<br>•  <b>Downloading Artifacts</b>: Copying project dependencies to a specified location.<br>•  <b>Analyzing Usage</b>: Reporting unused, used declared, and used undeclared dependencies.<br>•  <b>Purging Local Repository</b>: Cleaning specific artifacts from your local Maven repository.<br><br>It is crucial for maintaining healthy and efficient Java projects by providing deep insights into their external library requirements and ensuring consistent builds.


title: CAVEATS
content:
The "<b>mvn-dependency</b>" command requires Apache Maven to be installed and properly configured on your system. It also requires a valid <i>pom.xml</i> file in the current or parent directory to operate on a project's dependencies.<br><br>Direct command-line usage of plugin goals like <b>dependency:tree</b> should be distinguished from Maven's standard build lifecycle goals (e.g., <b>mvn clean install</b>), where dependency resolution often occurs implicitly. Misunderstanding dependency scopes or transitive dependencies can lead to runtime errors or bloated artifacts.


title: DEPENDENCY SCOPES
content:
Maven dependencies are assigned a <i>scope</i> that dictates their lifecycle and classpath inclusion:<br>•  <b>compile</b>: Default scope, required for compiling, building, and running.<br>•  <b>provided</b>: Required for compile, but provided by the runtime environment (e.g., a servlet container). Not packaged in the WAR/EAR.<br>•  <b>runtime</b>: Not required for compile, but for execution.<br>•  <b>test</b>: Required only for compiling and running tests.<br>•  <b>system</b>: Similar to <i>provided</i> but refers to a JAR on the local filesystem, usually discouraged.<br>•  <b>import</b>: Used in a <i>dependencyManagement</i> section to import dependencies from another POM (a Bill of Materials - BOM).


title: TRANSITIVE DEPENDENCIES
content:
Maven automatically includes dependencies of your dependencies. For example, if your project depends on library A, and library A depends on library B, Maven will automatically include B in your project's classpath. This simplifies dependency declaration but can lead to unexpected conflicts or 'dependency bloat' if not managed carefully.


title: EXCLUSIONS
content:
To prevent unwanted transitive dependencies, you can explicitly <i>exclude</i> them in your <i>pom.xml</i>. This is crucial for resolving version conflicts or removing libraries you don't need.<br><i>Example: <br>&lt;dependency&gt;<br>  &lt;groupId&gt;com.example&lt;/groupId&gt;<br>  &lt;artifactId&gt;my-lib&lt;/artifactId&gt;<br>  &lt;version&gt;1.0&lt;/version&gt;<br>  &lt;exclusions&gt;<br>    &lt;exclusion&gt;<br>      &lt;groupId&gt;com.another&lt;/groupId&gt;<br>      &lt;artifactId&gt;unwanted-transitive&lt;/artifactId&gt;<br>    &lt;/exclusion&gt;<br>  &lt;/exclusions&gt;<br>&lt;/dependency&gt;</i>


title: HISTORY
content:
The Apache Maven project, initiated in 2002, revolutionized Java build processes by introducing a Project Object Model (POM) and a plugin-based architecture. The Maven Dependency Plugin, a core component, emerged early in Maven's development to address the complex challenges of managing project libraries. Prior to Maven, developers often manually managed JAR files, leading to 'JAR hell' (version conflicts and missing dependencies). The dependency plugin, along with Maven's central repository concept, provided a standardized, declarative approach to dependency management, significantly improving project consistency and build reproducibility across the Java ecosystem.


title: TLDR
content:
<b>Display the full dependency tree, including direct and transitive dependencies</b>`mvn dependency:tree`<br><b>Analyze the dependencies and highlight unused or undeclared ones</b>`mvn dependency:analyze`<br><b>Copy all project dependencies (by default, to target/dependency/)</b>`mvn dependency:copy-dependencies`<br><b>Resolve and download all project dependencies to the local Maven repository</b>`mvn dependency:resolve`<br><b>Force Maven to update all dependencies from remote repositories</b>`mvn dependency:resolve [[-U|--update-snapshots]]`


title: SYNOPSIS
content:
<b>mvn package</b> [<i>-D&lt;property&gt;=&lt;value&gt;</i>] [<i>-P&lt;profile-id&gt;</i>] [<i>-f &lt;pom-file&gt;</i>] [<i>-B</i>] [<i>-s &lt;file&gt;</i>]


title: PARAMETERS
content:
<b><i>-D&lt;property&gt;=&lt;value&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets a system property, often used to configure plugin behavior or pass runtime parameters (e.g., <i>-DskipTests</i>).<br><br><b><i>-P&lt;profile-id&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Activates one or more specified build profiles defined in the <i>pom.xml</i> or <i>settings.xml</i>.<br><br><b><i>-f &lt;pom-file&gt;</i>, <i>--file &lt;pom-file&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies an alternative <i>pom.xml</i> file to use instead of the default <i>pom.xml</i> in the current directory.<br><br><b><i>-B</i>, <i>--batch-mode</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Runs Maven in non-interactive mode, useful for automated scripts and CI/CD environments.<br><br><b><i>-s &lt;file&gt;</i>, <i>--settings &lt;file&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies an alternative <i>settings.xml</i> file to use for user-specific configurations.<br><br><b><i>-DskipTests</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Skips the compilation and execution of unit tests during the build lifecycle.<br><br><b><i>-U</i>, <i>--update-snapshots</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Forces an update of snapshot dependencies and plugins from remote repositories.<br><br><b><i>-X</i>, <i>--debug</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Produces highly detailed debug output, helpful for troubleshooting build issues.<br><br>


title: DESCRIPTION
content:
The <b>mvn package</b> command executes the Maven <i>package</i> lifecycle phase, a fundamental step in building Java projects. This phase is responsible for taking the compiled source code and project resources, and then assembling them into a distributable format. Typically, this results in a JAR, WAR, or EAR file, depending on the project's <i>&lt;packaging&gt;</i> type specified in its <i>pom.xml</i> file. <br><br>Before reaching the <i>package</i> phase, Maven automatically executes all preceding default lifecycle phases. These include steps like <i>validate</i>, <i>compile</i> (which compiles source code), and <i>test</i> (which runs unit tests). This ensures that all dependencies are resolved, code is successfully compiled, and tests pass before the final artifact is created. The precise actions performed during the <i>package</i> phase are often managed by Maven plugins, such as the <i>maven-jar-plugin</i> or <i>maven-war-plugin</i>, which bind their goals to this phase. This command is essential for producing deployable artifacts ready for distribution or installation.


title: CAVEATS
content:
The command requires a <i>pom.xml</i> file in the current directory (or specified via <i>-f</i>). A Java Development Kit (JDK) must be installed and configured correctly. Network access may be necessary to download project dependencies. Skipping tests (via <i>-DskipTests</i>) can lead to packaging untested code, which might introduce bugs into the final artifact. The specific output format and content are entirely dependent on the project's configuration in <i>pom.xml</i>.


title: MAVEN BUILD LIFECYCLES
content:
Maven defines three primary build lifecycles: <i>default</i>, <i>clean</i>, and <i>site</i>. The <i>package</i> phase belongs to the <i>default</i> lifecycle, which manages the main build process. Understanding the sequence of phases within this lifecycle is key to effective Maven usage.


title: PACKAGING TYPES
content:
The <i>&lt;packaging&gt;</i> element in the <i>pom.xml</i> dictates the artifact type produced by the <i>package</i> phase. Common types include <i>jar</i> (Java Archive), <i>war</i> (Web Application Archive), <i>ear</i> (Enterprise Archive), and <i>pom</i> (for parent projects). Each type typically involves specific plugins and processes.


title: MAVEN PLUGINS
content:
Maven's core functionality is extended through plugins. Tasks like compiling, testing, and packaging are executed by specific plugins. For instance, the <i>maven-jar-plugin</i> is responsible for creating JAR files, while the <i>maven-war-plugin</i> handles WAR files. These plugins bind their goals to various lifecycle phases.


title: HISTORY
content:
Maven was initiated by Jason van Zyl for the Apache Software Foundation, with its first stable release in 2004. From its inception, the concept of a standardized build lifecycle, including the <i>package</i> phase, was central to Maven's design philosophy. This innovation aimed to provide a consistent and repeatable build process, particularly for Java projects. The <i>package</i> phase automated the complex and often error-prone task of assembling project artifacts, significantly streamlining development and deployment workflows.


title: TLDR
content:
<b>Package a project</b>`mvn package`<br><b>Package a project while skipping test execution</b>`mvn package [[-D|--define]] skipTests`<br><b>Package a project and force Maven to update all dependencies</b>`mvn package [[-U|--update-snapshots]]`


title: TLDR
content:
<b>Enable tab-completion for the current shell session</b>`npm completion`<br><b>Add completion to your shell profile (Bash)</b>`npm completion >> ~/.bashrc`<br><b>Add completion to your shell profile (Zsh)</b>`npm completion >> ~/.zshrc`<br><b>Write completions script to a specific file</b>`npm completion > [path/to/file]`


title: SYNOPSIS
content:
<b>npm help</b> <i>&lt;term&gt;</i><br><b>npm</b> <i>&lt;command&gt;</i> <b>--help</b><br><b>npm help-search</b> <i>&lt;text&gt;</i>


title: PARAMETERS
content:
<b><i>&lt;term&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The specific npm command (e.g., <b>install</b>, <b>publish</b>) or conceptual topic (e.g., <b>package.json</b>, <b>folders</b>) for which to display help. If omitted, it lists all available npm commands.<br><br><b><i>&lt;command&gt;</i> <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;An alternative, equivalent way to request help for a specific npm command, appended directly to the command itself.<br><br><b><i>&lt;text&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Used with <b>npm help-search</b> to perform a fuzzy search across all npm documentation for pages containing the specified text.<br><br><b><b>--viewer=&lt;viewer&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies an alternative program to use as a man page viewer instead of the default (typically <b>man</b> or <b>less</b>).<br><br><b><b>--no-markdown</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays the raw markdown source of the help page, bypassing rendering by the viewer.<br><br>


title: DESCRIPTION
content:
The <b>npm help</b> command serves as the primary gateway to <i>npm's extensive built-in documentation system</i>. It provides detailed information on all npm commands, configurations, and various conceptual topics.<br><br>When invoked, <b>npm help</b> either displays a specific manual page (similar to <b>man</b> pages) for a given command or topic, or it can be used to search across all available documentation. It is designed to be the first point of reference for users seeking to understand how to use different npm features, their syntax, options, and examples.<br><br>This command is crucial for developers working with Node.js and npm, offering quick access to context-sensitive information directly within the terminal, without needing an internet connection (once npm is installed). It leverages markdown files distributed with npm itself, often rendered through a system pager like <b>less</b> or <b>man</b>.


title: CAVEATS
content:
The effectiveness of <b>npm help</b> relies on the installation of a compatible man page viewer (like <b>less</b>) on the system. Without one, the output might be less readable. Search results from <b>npm help-search</b> can sometimes be broad or require refinement to find the most relevant documentation.


title: HOW IT WORKS
content:
When you run <b>npm help</b>, npm locates the relevant markdown file (e.g., <code>npm-install.md</code> for <b>npm help install</b>) within its installation directory. This markdown content is then typically piped to a system pager program, usually <b>man</b> or <b>less</b>, which renders it into a readable, formatted text within your terminal. This process ensures consistent formatting and navigation familiar to Linux man page users.


title: LISTING ALL COMMANDS
content:
Invoking <b>npm help</b> without any arguments (or just <b>npm --help</b>) displays a comprehensive list of all top-level npm commands, categorized by their primary function. This provides a quick overview of what npm is capable of and serves as a starting point for exploring its features.


title: HISTORY
content:
<b>npm help</b> has been an integral part of the npm client since its inception, evolving alongside the npm ecosystem. Its development mirrors the growth of Node.js, providing readily accessible documentation for an expanding set of commands and features. From early versions, it aimed to consolidate all necessary usage information directly within the tool, making it self-documenting and reducing reliance on external web resources for basic command usage. Its core functionality of rendering markdown files as man pages has remained consistent, ensuring a familiar and efficient user experience.


title: PARAMETERS
content:
<b><i>-g</i>, <i>--global</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Operates in global mode. When specified, <b>npm prefix</b> will output the global installation prefix instead of the local project prefix.<br><br><b><i>path</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;An optional argument specifying a directory. If provided, <b>npm prefix</b> will output the prefix for that specific path. If omitted, it defaults to the current working directory.<br><br>


title: DESCRIPTION
content:
The <b>npm prefix</b> command is used to output the local or global installation prefix for npm packages. The prefix is the directory where npm installs dependencies. When run without any arguments, it prints the root directory of the current project, which is where local <code>node_modules</code> are installed. If the <code>-g</code> or <code>--global</code> flag is provided, it prints the global installation prefix, which is the directory where globally installed packages and their executables reside. Understanding the prefix is crucial for debugging installation issues, managing paths for executables, and knowing where npm expects to find or place packages. It essentially tells you the base directory for npm operations, either project-specific or system-wide.


title: CAVEATS
content:
The local prefix is typically the root of your project directory (where your <code>package.json</code> file resides). The global prefix can vary significantly depending on how Node.js and npm were installed (e.g., via <code>nvm</code>, Homebrew, or a direct installer). Modifying the prefix directly via <code>npm config set prefix &lt;path&gt;</code> can change npm's behavior for package resolution and installation, so exercise caution. Ensure your <code>PATH</code> environment variable is correctly configured to include the global <code>bin</code> directory (often <code>$PREFIX/bin</code>) to access globally installed executables.


title: CONFIGURATION
content:
The prefix can be configured via <code>npm config set prefix &lt;path&gt;</code>. This sets a persistent default prefix for subsequent npm operations. You can check the current configuration with <code>npm config get prefix</code>.


title: USE CASES
content:
Useful for scripting to determine installation locations, verifying expected directory structures, or troubleshooting issues where packages aren't found in the expected place. For example, to find where a global executable might be installed, you'd combine <code>npm prefix -g</code> with <code>npm bin -g</code>.


title: TLDR
content:
<b>Print the local prefix</b>`npm prefix`<br><b>Print the global prefix</b>`npm prefix [[-g|--global]]`


title: TLDR
content:
<b>Output a list of all dependencies in your project</b>`npm sbom`<br><b>Exclude both dev and optional dependencies</b>`npm sbom --omit dev --omit optional`<br><b>Generate an SBOM based only on the package-lock.json</b>`npm sbom --package-lock-only`


title: PARAMETERS
content:
<b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display help information about the command.<br><br><b><b>-v</b>, <b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show version information of the underlying editor or script.<br><br><b><b>-n</b>, <b>--new-window</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Force opening a new editor window, even if another window is already open.<br><br><b><b>-r</b>, <b>--reuse-window</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Force opening in the last active editor window, if available.<br><br><b><b>-d</b>, <b>--diff</b> <i>&lt;file1&gt;</i> <i>&lt;file2&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Open two files in the editor's diff view to compare their contents.<br><br><b><b>-g</b>, <b>--goto</b> <i>&lt;file&gt;</i>:<i>&lt;line&gt;</i>[:<i>&lt;column&gt;</i>]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Open a file at a specific line and optionally a column number.<br><br><b><b>--wait</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Wait for the opened files or editor process to be closed before returning control to the terminal.<br><br><b><b>--add</b> <i>&lt;path&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Add files or folders to the current or last active editor window workspace.<br><br>


title: DESCRIPTION
content:
<i>opencode</i> is a conceptual command designed to quickly open files, directories, or entire projects within a designated code editor from the command line. While not a standard Linux utility, it encapsulates the common action of launching an editor to work on source code.<br><br>It allows users to specify paths to files or directories, and often supports options for new windows, diff views, or specific line numbers, streamlining the development workflow by integrating the terminal with the editor. This utility is typically a custom alias or script, or refers to the command-line interface of a popular editor like Visual Studio Code's <i>code</i> command. Its primary purpose is to enhance productivity by providing a rapid way to access and modify code directly from the terminal prompt, eliminating the need to manually navigate through a graphical interface to open project files.


title: CAVEATS
content:
<i>Disclaimer: The command <b>opencode</b> is not a standard Linux utility found in most distributions. This analysis is based on the common functionality associated with 'open code' commands, such as the <b>code</b> command-line interface for Visual Studio Code, or similar custom scripts/aliases. Users should verify if such a command exists on their system or if it refers to a specific application's CLI tool.</i>


title: INSTALLATION
content:
Because <i>opencode</i> is not a standard command, it typically needs to be installed as part of a specific code editor (e.g., installing Visual Studio Code provides the <i>code</i> command) or custom-scripted by the user. Users may create an alias or a shell function named <i>opencode</i> that calls their preferred editor or a script that intelligently decides which editor to launch based on environment variables or file associations.


title: CONFIGURATION
content:
Users can configure which editor <i>opencode</i> (if it were a custom script) should launch. This often involves setting environment variables like <b>EDITOR</b> or <b>VISUAL</b> in their shell's configuration file (e.g., <i>.bashrc</i>, <i>.zshrc</i>), or directly modifying the custom script itself. For application-specific CLIs (like <i>code</i> for VS Code), configuration is usually done within the editor's settings.


title: HISTORY
content:
As <i>opencode</i> is not a standard command, it does not have a formal history. However, the concept of launching a code editor from the command line is as old as terminal-based editors like Vi and Emacs. Modern graphical editors, especially those designed for development, often provide a command-line utility (e.g., <i>code</i> for Visual Studio Code, <i>subl</i> for Sublime Text, <i>atom</i> for Atom) to integrate seamlessly with the terminal, allowing developers to quickly open projects or files in their preferred GUI editor directly from a directory in the terminal. The exact implementation and name (<i>opencode</i>) would depend on specific user configurations or bespoke software.


title: TLDR
content:
<b>Start the interactive TUI</b>`opencode`<br><b>Run opencode in non-interactive mode by passing a prompt directly</b>`opencode run "[message]"`<br><b>Use a specific model and agent</b>`opencode run [[-m|--model]] [provider]/[model] --agent [agent_name] "[message]"`<br><b>List all available models from configured providers</b>`opencode models`<br><b>Manage credentials and login for providers</b>`opencode auth login`<br><b>Start a headless opencode server for API access</b>`opencode serve [[-h|--hostname]] [hostname] [[-p|--port]] [port]`<br><b>Manage AI assistant agents for OpenCode</b>`opencode agent [command]`<br><b>Create a new agent with custom configuration</b>`opencode agent create`


title: TLDR
content:
<b>Display a list of available commands</b>`pecl`<br><b>Install a package</b>`pecl install [package]`<br><b>List installed packages</b>`pecl list`<br><b>Upgrade all packages</b>`pecl upgrade`<br><b>Upgrade a specific package</b>`pecl upgrade [package]`<br><b>Uninstall a specific package</b>`pecl uninstall [package]`<br><b>Display information about a specific package</b>`pecl info [package]`<br><b>Update the available package sources</b>`pecl update-channels`


title: SYNOPSIS
content:
<pre>pg_checksums {-D DATADIR | --pgdata=DATADIR} {-e | --enable} [-f | --force] [-v | --verbose]<br>pg_checksums {-D DATADIR | --pgdata=DATADIR} {-d | --disable} [-f | --force] [-v | --verbose]<br>pg_checksums {-D DATADIR | --pgdata=DATADIR} {-c | --check} [-v | --verbose]<br>pg_checksums {-V | --version}<br>pg_checksums {-? | --help}</pre>


title: PARAMETERS
content:
<b>--pgdata=DATADIR, -D DATADIR</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Required.</i> Specifies the path to the PostgreSQL data directory. This must be provided for all operations.<br><br><b>--enable, -e</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables data checksums for the cluster. This operation requires the cluster to be <i>shut down</i> before execution.<br><br><b>--disable, -d</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disables data checksums for the cluster. This operation also requires the cluster to be <i>shut down</i>.<br><br><b>--check, -c</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Verifies the integrity of existing data checksums throughout the cluster. This operation can be performed while the cluster is running, but may cause I/O load.<br><br><b>--force, -f</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Forces the `enable` or `disable` operation without prompting for user confirmation. Use with caution.<br><br><b>--verbose, -v</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Provides more detailed output during the command execution, showing progress or specific actions.<br><br><b>--version, -V</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays the `pg_checksums` version information and exits.<br><br><b>--help, -?</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Shows help about `pg_checksums` command line arguments and exits.<br><br>


title: DESCRIPTION
content:
`pg_checksums` is a utility for managing and verifying data checksums within a PostgreSQL database cluster. Data checksums provide an additional layer of data integrity, helping to detect corruption caused by underlying storage system issues. This command allows users to <b>enable</b>, <b>disable</b>, or <b>check</b> the validity of checksums for an entire PostgreSQL data directory.<br><br>When enabling or disabling checksums, the utility rewrites all data files in the cluster, which can be a time-consuming operation depending on the size of the cluster. It is crucial that the PostgreSQL server is <i>not running</i> when enabling or disabling checksums. Verifying checksums, however, can be performed while the server is online, though it may incur significant I/O load. Checksums are stored directly within the data pages, and once enabled, they are automatically maintained by the PostgreSQL server for all future data writes.


title: CAVEATS
content:
<ul><li><b>Cluster Downtime Required:</b> Enabling or disabling checksums (`-e` or `-d`) requires the PostgreSQL server to be <i>completely shut down</i> before running `pg_checksums`. Running these operations on a live cluster will result in errors and potential data corruption.</li><li><b>Significant I/O and Time:</b> Both enabling and disabling checksums involve rewriting <i>all</i> data files in the cluster. This is an I/O-intensive and potentially time-consuming operation, especially for large databases. Ensure adequate disk space and time are available.</li><li><b>Disk Space:</b> The process of enabling/disabling checksums may temporarily require additional disk space as files are rewritten.</li><li><b>Not a Full Backup Replacement:</b> While checksums help detect corruption, they do not prevent it or recover from it. They are not a substitute for a robust backup strategy.</li><li><b>Performance Impact:</b> While typically minimal, enabling checksums can introduce a slight overhead due to the additional calculation and storage, though modern systems often mitigate this effectively.</li></ul>


title: EXIT STATUS
content:
`pg_checksums` exits with status 0 if successful, and a non-zero status if an error occurs, providing an indication of the operation's outcome.


title: PRIVILEGES
content:
The user running `pg_checksums` must have appropriate read and write permissions on the data directory (and its contents) when enabling or disabling checksums, typically the same user that runs the PostgreSQL server process.


title: CONFIGURATION FILE
content:
The status of checksums for a cluster is recorded in the `postgresql.conf` file (and internally in the control file), where `data_checksums` parameter indicates if they are enabled.


title: HISTORY
content:
Data checksums were first introduced in PostgreSQL 9.3 as an option during the `initdb` process, allowing users to enable them for new clusters from the start. However, changing the checksum status of an existing cluster (i.e., enabling or disabling them after `initdb`) was not straightforward and typically required a dump/restore operation or using `pg_upgrade` to a new cluster. The `pg_checksums` utility was introduced in <b>PostgreSQL 12</b> to provide a dedicated, simplified, and in-place method for managing data checksums on existing clusters, significantly improving the flexibility for administrators to enforce data integrity policies.


title: SEE ALSO
content:
<i>initdb(1)</i>: Used to create a new PostgreSQL data cluster, where checksums can be optionally enabled during initialization., <i>pg_basebackup(1)</i>: Used to take base backups of a PostgreSQL cluster; backups will naturally include checksum information if enabled on the source., <i>pg_upgrade(1)</i>: Used to upgrade a PostgreSQL cluster to a newer major version; often involves creating a new cluster which provides an opportunity to change checksum status.


title: TLDR
content:
<b>Check data checksums in a database cluster</b>`pg_checksums [[-D|--pgdata]] [path/to/data]`<br><b>Enable data checksums in a database cluster</b>`pg_checksums [[-e|--enable]] [[-D|--pgdata]] [path/to/data]`<br><b>Disable data checksums in a database cluster</b>`pg_checksums [[-d|--disable]] [[-D|--pgdata]] [path/to/data]`<br><b>Check data checksums with verbose output</b>`pg_checksums [[-v|--verbose]] [[-D|--pgdata]] [path/to/data]`<br><b>Check data checksums showing progress</b>`pg_checksums [[-P|--progress]] [[-D|--pgdata]] [path/to/data]`<br><b>Display help</b>`pg_checksums [[-?|--help]]`


title: TLDR
content:
<b>Check clusters before upgrading</b>`pg_upgrade [[-c|--check]] [[-b|--old-bindir]] [path/to/old_bin] [[-B|--new-bindir]] [path/to/new_bin] [[-d|--old-datadir]] [path/to/old_data] [[-D|--new-datadir]] [path/to/new_data]`<br><b>Perform the actual upgrade</b>`pg_upgrade [[-b|--old-bindir]] [path/to/old_bin] [[-B|--new-bindir]] [path/to/new_bin] [[-d|--old-datadir]] [path/to/old_data] [[-D|--new-datadir]] [path/to/new_data]`<br><b>Use multiple parallel jobs during the upgrade</b>`pg_upgrade [[-j|--jobs]] [njobs] [[-b|--old-bindir]] [path/to/old_bin] [[-B|--new-bindir]] [path/to/new_bin] [[-d|--old-datadir]] [path/to/old_data] [[-D|--new-datadir]] [path/to/new_data]`<br><b>Specify the old and new PostgreSQL ports</b>`pg_upgrade [[-p|--old-port]] [port] [[-P|--new-port]] [port] [[-b|--old-bindir]] [path/to/old_bin] [[-B|--new-bindir]] [path/to/new_bin] [[-d|--old-datadir]] [path/to/old_data] [[-D|--new-datadir]] [path/to/new_data]`<br><b>Use hard links instead of copying files to the new cluster</b>`pg_upgrade [[-k|--link]] [[-b|--old-bindir]] [path/to/old_bin] [[-B|--new-bindir]] [path/to/new_bin] [[-d|--old-datadir]] [path/to/old_data] [[-D|--new-datadir]] [path/to/new_data]`<br><b>Display help</b>`pg_upgrade [[-?|--help]]`


title: PARAMETERS
content:
<b><b>-D</b> <i>DATADIR</i>, <b>--datadir</b>=<i>DATADIR</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the path to the PostgreSQL data directory of the target cluster. This directory's WAL files will be analyzed and compared against the source.<br><br><b><b>-S</b> <i>CONNSTR</i>, <b>--source-server</b>=<i>CONNSTR</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Provides the connection string for the running source PostgreSQL server. This allows <i>pg_walsummary</i> to connect and retrieve WAL information from the reference server. The format is a standard PostgreSQL connection string (e.g., "host=localhost port=5432 user=postgres").<br><br><b><b>-V</b>, <b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Output version information, then exit.<br><br><b><b>-?</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show help about <i>pg_walsummary</i> command line arguments, then exit.<br><br>


title: DESCRIPTION
content:
<i>pg_walsummary</i> is a specialized utility within the PostgreSQL ecosystem, primarily designed as an internal helper for the <i>pg_rewind</i> command. Its core function is to analyze and summarize the differences in Write-Ahead Log (WAL) files between a target PostgreSQL data directory (e.g., a former primary or a standby) and a running source PostgreSQL server (the new primary).<br><br>When executed, <i>pg_walsummary</i> connects to the source server and inspects the WAL segments present in the specified target data directory. It then computes a summary indicating which WAL files are missing from the target, which are present but no longer needed by the source, and which need to be truncated or replayed. This summary is crucial for <i>pg_rewind</i> to efficiently synchronize the target cluster with the source, making it possible to convert a divergent cluster back into a standby or a new primary with minimal data transfer.<br><br>While it can be executed standalone, its output is primarily intended for programmatic consumption by <i>pg_rewind</i> rather than direct human interpretation, as it provides a structured list of WAL actions.


title: CAVEATS
content:
<i>pg_walsummary</i> is a PostgreSQL-specific utility, not a general Linux command, and is typically found in the PostgreSQL installation's <code>bin</code> directory. It's primarily an internal helper tool for <i>pg_rewind</i> and its output is designed for machine consumption, not direct user interpretation. It requires a running PostgreSQL source server to connect to and proper file system permissions to access the target data directory. It only summarizes WAL differences; it does not modify any files or directories itself.


title: USAGE CONTEXT
content:
Although it can be run manually, <i>pg_walsummary</i> is almost exclusively invoked internally by the <i>pg_rewind</i> command. Users typically interact directly with <i>pg_rewind</i>, which then orchestrates the use of <i>pg_walsummary</i> to gather necessary WAL comparison data before proceeding with file synchronization.


title: OUTPUT FORMAT
content:
The output of <i>pg_walsummary</i> consists of a structured list, usually in a format readable by <i>pg_rewind</i>, indicating specific WAL segments to be copied, truncated, or removed. This detailed summary allows <i>pg_rewalsummary</i> to perform a precise and minimal synchronization.


title: HISTORY
content:
<i>pg_walsummary</i> was introduced as an integral component alongside the <i>pg_rewind</i> utility. Both were initially developed and added to PostgreSQL in version 9.4, which was released in December 2014. Its development aimed to provide a more efficient and less resource-intensive method for quickly resynchronizing PostgreSQL clusters after a failover, compared to traditional full base backups.


title: TLDR
content:
<b>Convert a WAL summary file to text</b>`pg_walsummary [path/to/file]`<br><b>Print one line per individual modified block (rather than ranges)</b>`pg_walsummary [[-i|--individual]] [path/to/file]`<br><b>Suppress normal output (only errors)</b>`pg_walsummary [[-q|--quiet]] [path/to/file]`


title: SYNOPSIS
content:
The "pie" feature is enabled via compiler and linker options, primarily within the <b>gcc</b> command.<br><br><code><b>gcc</b> [<i>options</i>] <b>-fPIE</b> <b>-pie</b> [<i>input_files</i>] <b>-o</b> [<i>output_executable</i>]</code><br><br>This syntax shows how to compile and link a program to produce a Position-Independent Executable.


title: PARAMETERS
content:
<b><b>-fPIE</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Compile</I> the current compilation unit to be position-independent. This flag instructs the compiler to generate position-independent code, which is necessary for the final executable to be a PIE.<br><br><b><b>-pie</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<I>Link</I> the output as a Position-Independent Executable. This flag, passed to the linker (via GCC), ensures that the final executable is linked in a way that allows it to be loaded at a random base address at runtime.<br><br><b><b>-no-pie</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disable the generation of a Position-Independent Executable. This flag explicitly prevents the creation of a PIE, even if the default behavior of the compiler/linker might otherwise be to produce one.<br><br>


title: DESCRIPTION
content:
The term "pie" in the context of Linux typically refers to <I>Position-Independent Executables</I>. A PIE is an executable program built in such a way that it can be loaded at any arbitrary virtual memory address without modification.<br><br>This capability is crucial for implementing <I>Address Space Layout Randomization</I> (ASLR) for executables. ASLR is a security feature that randomly arranges the memory addresses of key data areas (like the base of the executable, libraries, heap, and stack) in a process's address space. By randomizing these locations, ASLR makes it significantly harder for attackers to predict the address of specific code or data, thereby mitigating memory-based attacks such as buffer overflows or return-oriented programming (ROP) exploits.<br><br>PIE executables are essentially dynamically linked shared objects that are loaded as main programs. They achieve position independence by ensuring all internal memory references (to code, data, global variables, etc.) are relative rather than absolute. This allows the operating system's loader to map the entire executable to a randomized base address at runtime, enhancing system security.


title: CAVEATS
content:
<b><I>Performance:</I></b> PIE executables might incur a very slight performance overhead due to the additional indirections required for relative addressing compared to non-PIE executables. However, for most modern applications and hardware, this overhead is negligible.<br><b><I>Compatibility:</I></b> While widely supported today, older systems or specific embedded toolchains might not fully support PIE. Modern Linux distributions typically enable PIE by default for all user-space executables due to its significant security benefits.<br><b><I>Default Behavior:</I></b> Many contemporary GCC versions and Linux distributions enable PIE by default when compiling executables. Therefore, explicitly adding `-fPIE -pie` might sometimes be redundant but serves as good practice for clarity and portability.


title: <B>VERIFYING PIE STATUS</B>
content:
You can verify if an executable is a PIE using various command-line tools:<br><ul><li><b>file:</b> Run `<b>file your_executable</b>`. A PIE will typically be identified as a "shared object" (e.g., `ELF 64-bit LSB shared object`) or indicate `ET_DYN`. Non-PIE executables are usually identified as `ELF ... executable` or `ET_EXEC`.<br><li><b>readelf:</b> Use `<b>readelf -h your_executable | grep Type</b>`. For a PIE, the output will show `Type: DYN (Shared object file)`. For a non-PIE executable, it will show `Type: EXEC (Executable file)`.<br><li><b>checksec:</b> This is a dedicated security auditing tool (often available via `apt install checksec` or `yum install checksec`) that can quickly report PIE status along with other exploit mitigation features. Run `<b>checksec --file=your_executable</b>` and look for the "PIE" field.


title: HISTORY
content:
The concept of position-independent code has been fundamental for shared libraries for a long time. The application of position independence to main executables (PIE) gained significant traction in the early 2010s.<br><br>Its widespread adoption was driven by the increasing need to enhance security against memory corruption vulnerabilities. PIE became a critical component for effectively utilizing Address Space Layout Randomization (ASLR) for executables, significantly hindering exploitation techniques on Linux systems. Most modern Linux distributions now compile system binaries and user applications as PIE by default to improve overall system security.


title: TLDR
content:
<b>Install or update an extension</b>`pie install [vendor]/[extension]`<br><b>List installed extensions and their versions</b>`pie show`<br><b>Display information about a specific package</b>`pie info [vendor]/[extension]`<br><b>List the configured repositories</b>`pie repository:list`<br><b>Add a repository</b>`pie repository:add [type] [url]`<br><b>Remove a repository</b>`pie repository:remove [url]`


title: PARAMETERS
content:
<b><i>COMMAND</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the configuration action to perform. Common commands include <b>list</b>, <b>get</b>, <b>set</b>, <b>unset</b>, and <b>edit</b>.<br><br><b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show a help message for the <b>pip config</b> command or its subcommands.<br><br><b>--editor <editor></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the text editor to use when the <b>edit</b> command is invoked. For example, <i>--editor nano</i>.<br><br><b>--global</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Targets the system-wide (global) configuration file, typically found in <i>/etc/pip.conf</i> or similar locations.<br><br><b>--user</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Targets the user-specific configuration file, commonly located in <i>~/.config/pip/pip.conf</i> or <i>%APPDATA%\pip\pip.ini</i>.<br><br><b>--site</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Targets the configuration file specific to the current Python virtual environment, if one is active.<br><br><b>list</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays all configuration items currently active, showing their values and source files.<br><br><b>get <key></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Retrieves and prints the value for a specific configuration <i>key</i>, such as <i>global.index-url</i>.<br><br><b>set <key> <value></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets a configuration <i>key</i> to a specified <i>value</i>. By default, this modifies the user configuration file.<br><br><b>unset <key></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Removes a configuration <i>key</i> from the target configuration file. By default, this targets the user configuration file.<br><br><b>edit</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Opens the designated configuration file in a text editor for manual modification. The file opened depends on the scope options (<i>--global</i>, <i>--user</i>, <i>--site</i>).<br><br>


title: DESCRIPTION
content:
The <b>pip config</b> command provides an interface for managing pip's configuration files. It allows users to inspect, modify, and delete configuration settings that control pip's behavior, such as index URLs, proxy settings, or installation options. These settings can be stored in multiple locations: globally (system-wide), per user, or specific to a Python virtual environment.<br><br><b>pip config</b> helps users avoid repetitive command-line options by persistently storing their preferences. It supports listing all current settings, retrieving specific values, setting new values, unsetting existing ones, and opening configuration files directly in an editor. This command is an essential tool for customizing pip's operations to suit different development environments or network configurations, providing a standardized way to manage installation behaviors.


title: CAVEATS
content:
The command is invoked as <b>pip config</b>, not <b>pip-config</b>. While the prompt referred to 'pip-config', it is a subcommand of the <b>pip</b> utility.<br><br>When using <b>set</b> or <b>unset</b> without explicitly specifying <i>--global</i>, <i>--user</i>, or <i>--site</i>, the change typically defaults to the user-specific configuration file.<br><br>Manual editing of configuration files using the <b>edit</b> command should be done with caution, as syntax errors can lead to unexpected <b>pip</b> behavior or failures.


title: CONFIGURATION FILE LOCATIONS
content:
The specific locations where <b>pip</b> looks for configuration files vary by operating system and scope:<br><i>Global (system-wide):</i> Often <i>/etc/pip.conf</i> or <i>/usr/local/etc/pip.conf</i> on Unix/macOS, or a <i>pip.ini</i> within the system-wide Python installation directory on Windows.<br><i>User-specific:</i> Typically <i>~/.config/pip/pip.conf</i> or <i>~/.pip/pip.conf</i> on Unix/macOS, and <i>%APPDATA%\pip\pip.ini</i> on Windows.<br><i>Virtual environment:</i> Found at <i>$VIRTUAL_ENV/pip.conf</i> or <i>$VIRTUAL_ENV/etc/pip.conf</i> if a virtual environment is active.


title: PRECEDENCE OF CONFIGURATION SETTINGS
content:
<b>pip</b> applies configuration settings from various sources in a specific hierarchical order, with later sources overriding earlier ones:<br>1. Global (system-wide) configuration file.<br>2. Per-user configuration file.<br>3. Virtual environment specific configuration file.<br>4. Environment variables (e.g., <i>PIP_INDEX_URL</i>).<br>5. Command-line options (e.g., <i>--index-url</i>).<br>This order ensures that the most specific setting takes precedence, allowing for fine-grained control.


title: HISTORY
content:
The <b>pip config</b> subcommand was introduced to provide a more consistent and programmatic way to manage pip's settings across different environments. Prior to its inclusion, users often had to manually locate and edit INI-style configuration files (e.g., <i>pip.ini</i> or <i>pip.conf</i>). This command streamlined the process, reducing potential errors and offering a unified interface for configuration management, reflecting pip's evolution towards more robust and user-friendly tools.


title: TLDR
content:
<b>List all configuration values</b>`pip config list`<br><b>Show configuration files and their values</b>`pip config debug`<br><b>Set the value for a command option</b>`pip config set [command.option] [value] [--global|--user|--site]`<br><b>Get the value for a command option</b>`pip config get [command.option] [--global|--user|--site]`<br><b>Unset the value for a command option</b>`pip config unset [command.option] [--global|--user|--site]`<br><b>Edit the configuration file with the default editor</b>`pip config edit [--global|--user|--site]`<br><b>Edit the configuration file with a specific editor</b>`pip config edit [--global|--user|--site] --editor [path/to/editor_binary]`


title: PARAMETERS
content:
<b><b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Increases the verbosity of output, showing more detailed information relevant for deep debugging.<br><br><b><b>--no-color</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppresses colored output, which can be useful for scripting or when redirecting output to plain text files.<br><br><b><b>--log </b><i>&lt;path&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies a file path where `<b>pip</b>` logging information, including debug details, will be written.<br><br><b><b>--isolated</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Runs `<b>pip</b>` in an isolated mode, ignoring environment variables and user configuration files. Useful for debugging interaction with a clean environment.<br><br><b><b>--disable-pip-version-check</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disables the periodic check for a new version of `<b>pip</b>` on PyPI, which can prevent network calls during debugging.<br><br>


title: DESCRIPTION
content:
The `<b>pip debug</b>` command is a vital subcommand of `<b>pip</b>`, the standard package installer for Python. It provides a comprehensive diagnostic overview of the Python environment in which `<b>pip</b>` is currently operating. This includes crucial details like the Python version, operating system information, `<b>pip</b>` version, location of configuration files (`<b>pip.conf</b>` or `<b>pip.ini</b>`), and relevant environment variables. Its primary purpose is to assist developers and users in troubleshooting issues related to package installation, dependency resolution, or general `<b>pip</b>` configuration problems. By consolidating disparate pieces of information into a single, structured output, `<b>pip debug</b>` significantly streamlines the process of identifying common misconfigurations, version incompatibilities, or incorrect environment setups without requiring manual inspection of numerous system paths and files.


title: CAVEATS
content:
The output of `<b>pip debug</b>` is specific to the Python environment (e.g., virtual environment) in which it is executed. Running it in different environments will show different details.<br>It's a diagnostic tool and does not modify any system or `<b>pip</b>` configuration. The output can be quite detailed, so consider piping it to a pager like `<b>less</b>` or redirecting it to a file for easier analysis.


title: OUTPUT SECTIONS
content:
The output of `<b>pip debug</b>` is typically structured into several sections, providing details such as Python and `<b>pip</b>` versions, operating system, filesystem encoding, virtual environment status, relevant environment variables, configuration files (`<b>pip.ini</b>` or `<b>pip.conf</b>`), and package index information. This structured output helps in quickly pinpointing the source of configuration or environment-related problems.


title: DEBUGGING WITH --VERBOSE
content:
While `<b>pip debug</b>` provides a good overview by default, using the global `<b>--verbose</b>` option (e.g., `<b>pip --verbose debug</b>`) can further enhance the output with even more detailed information. This might include the full paths searched for configuration files, or more extensive environment variable dumps, which can be crucial for deep-dive diagnostics when default output isn't sufficient.


title: HISTORY
content:
The `<b>debug</b>` subcommand was introduced in `<b>pip</b>` version 20.3 (released in late 2020). Prior to its introduction, users had to manually gather various pieces of environment and configuration information, often leading to incomplete or inconsistent debugging data. The `<b>debug</b>` command consolidates this information into a single, structured output, significantly streamlining the troubleshooting process for `<b>pip</b>` and Python environment-related issues.


title: SEE ALSO
content:
pip(1): The main pip command for package management., python(1): The Python interpreter itself., pip config(1): For managing local and global pip configurations., pip show(1): Display information about installed packages., pip list(1): List installed packages in the current environment.


title: TLDR
content:
<b>Show general debug information</b>`pip debug`<br><b>Show debug information for a specific platform</b>`pip debug --platform [platform]`<br><b>Show debug information for a specific Python version</b>`pip debug --python-version [version]`<br><b>Show debug information for a specific Python implementation</b>`pip debug --implementation [implementation]`<br><b>Show debug information for a specific ABI</b>`pip debug --abi [abi]`


title: PARAMETERS
content:
<b>--help, -h</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show help message and exit.<br><br><b>--algorithm <algorithm>, -a <algorithm></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The hash algorithm to use, e.g., <I>sha256</I>, <I>sha384</I>, <I>sha512</I>. The default is <I>sha256</I>.<br><br>


title: DESCRIPTION
content:
<b>pip hash</b> is a utility command provided by <b>pip</b> that generates hashes for local files, primarily intended for use with <I>hash-checking mode</I> in <I>requirements.txt</I> files. When you specify a package in <I>requirements.txt</I> with <I>--hash</I> (e.g., <I>pkg==1.0 --hash=sha256:abc...</I>), <I>pip</I> will verify that the downloaded package's hash matches the one provided. This significantly enhances supply chain security and ensures the integrity and immutability of your Python dependencies.<br><br>The command supports multiple hashing algorithms, including <I>SHA256</I>, <I>SHA384</I>, and <I>SHA512</I>. By generating these hashes for your local copies of distribution files (e.g., <I>.whl</I> or <I>.tar.gz</I> files), you can precisely control which versions and exact files of a dependency are installed, preventing accidental or malicious tampering. It's an essential tool for creating robust and secure build environments, particularly in regulated industries or for projects requiring high levels of security assurance.


title: CAVEATS
content:
<b>pip hash</b> only computes hashes for <B>local files</B>. It does not download packages or resolve dependencies. Its output is designed to be manually copied into a <I>requirements.txt</I> file. The primary goal is to provide a reproducible hash for a known artifact, not to automatically generate hashes for all dependencies in a project. Users must ensure the files being hashed are the exact ones they intend to pin.


title: USAGE WITH REQUIREMENTS.TXT
content:
The output of <b>pip hash</b> is intended to be appended to entries in a <I>requirements.txt</I> file. For example, after running <I>pip hash my_package-1.0-py3-none-any.whl</I>, you might get output like <I>sha256:abcdef...</I>. You would then add this to your <I>requirements.txt</I>: <I>my_package==1.0 --hash=sha256:abcdef...</I> This ensures that <I>pip</I> will only install a <I>my_package</I> that matches this exact hash.


title: SECURITY IMPLICATIONS
content:
Using <I>pip hash</I> for dependency pinning dramatically increases the security of your build process. It creates a cryptographic fingerprint of your dependencies, making it impossible for <I>pip</I> to install a different version or a tampered file, even if the package index (like <I>PyPI</I>) were compromised or a mirror served incorrect data. This is a critical practice for robust and secure Python development.


title: HISTORY
content:
The <b>pip hash</b> command was introduced as part of <b>pip</b>'s efforts to enhance security and reproducibility, particularly with the advent of <I>hash-checking mode</I> for <I>requirements.txt</I> files. This feature gained prominence around <I>pip</I> versions 8.0 and later, as the Python community recognized the need for stronger guarantees against tampering and supply chain attacks. Prior to this, users might have manually generated hashes using tools like <b>sha256sum</b>, but <b>pip hash</b> provides a streamlined and <b>pip</b>-native way to produce hashes in the format expected by <I>pip install --require-hashes</I>. Its development aligns with broader industry trends towards secure software supply chains.


title: TLDR
content:
<b>Generate hash for a package file</b>`pip hash [path/to/package.whl]`<br><b>Generate hash using a specific algorithm</b>`pip hash [[-a|--algorithm]] [sha256|sha384|sha512|...] [path/to/package.whl]`<br><b>Generate hashes for multiple files</b>`pip hash [path/to/package1.whl path/to/package2.whl ...]`<br><b>Generate hash for downloaded archive</b>`pip hash [path/to/package.tar.gz]`


title: PARAMETERS
content:
<b><b>PACKAGE...</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Optional.</i> One or more package names to inspect. If omitted, information about all installed packages may be displayed, depending on other options.<br><br><b><b>--list</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists all installed packages in the environment.<br><br><b><b>--files</b> <i>&lt;PACKAGE&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Shows a list of files installed by the specified package.<br><br><b><b>--dependencies</b> <i>&lt;PACKAGE&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays the direct and transitive dependency tree for the specified package.<br><br><b><b>--reverse-dependencies</b> <i>&lt;PACKAGE&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Shows which packages in the environment depend on the specified package.<br><br><b><b>--paths</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Includes installation paths in the output for packages or files.<br><br><b><b>--json</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Outputs the results in machine-readable JSON format.<br><br><b><b>--env</b> <i>&lt;PATH&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the path to a Python environment (e.g., a virtual environment) to inspect instead of the current one.<br><br><b><b>--freeze</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Outputs installed packages in a format similar to <i>pip freeze</i>, suitable for requirements files.<br><br><b><b>--report</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Generates a detailed report on the entire Python environment, including conflicts and detailed package metadata.<br><br><b><b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Shows the program's version number and exits.<br><br><b><b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a help message and exits.<br><br>


title: DESCRIPTION
content:
<i>pip-inspect</i> is a powerful command-line tool, part of the <i>packaging-inspect</i> project, <br>designed to provide detailed insights into Python packages installed in a given environment. <br><br>It goes beyond basic <i>pip list</i> or <i>pip show</i> commands by offering a more comprehensive view, <br>including package files, direct and transitive dependencies, and potential conflicts. <br><br>This tool is invaluable for debugging installation issues, understanding the composition of a virtual environment, <br>or auditing package integrity. It can operate on specified packages or list all installed packages, <br>offering various output formats for easy parsing and analysis. <br><br>Its primary goal is to make inspecting Python environments more robust and informative <br>for developers, system administrators, and CI/CD pipelines.


title: CAVEATS
content:
<i>pip-inspect</i> is not a built-in <i>pip</i> command and requires separate installation via <br><i>pip install packaging-inspect</i>. <br><br>It may have limitations when inspecting non-standard Python installations or environments <br>where package metadata is not fully compliant with modern packaging standards. <br><br>Its output can be extensive, particularly for large environments or <br>when requesting detailed reports, requiring careful parsing or filtering.


title: <B>USE CASES</B>
content:
<i>pip-inspect</i> is highly versatile for various scenarios:<br><b>Debugging:</b> Rapidly identify missing files, incorrect package versions, or circular dependencies that cause application failures.<br><b>Auditing:</b> Verify the contents of a Python environment for security compliance, licensing adherence, or to ensure only approved packages are present.<br><b>Environment Replication:</b> While not directly a replication tool, its detailed output can inform the creation of precise <i>requirements.txt</i> or similar dependency specification files.


title: <B>INSTALLATION</B>
content:
To use <i>pip-inspect</i>, it must be installed. This can be done via <i>pip</i>:<br><br><i>pip install packaging-inspect</i><br><br>It is recommended to install it within a virtual environment to avoid conflicts with system-wide Python packages.


title: HISTORY
content:
The <i>packaging-inspect</i> project, which introduced <i>pip-inspect</i>, emerged from the need <br>for more sophisticated introspection tools for Python environments. <br><br>While <i>pip</i> itself provides basic listing and showing capabilities, <br>developers and system administrators often required deeper insights into <br>dependency graphs, installed files, and potential conflicts. <br><br><i>pip-inspect</i> was developed to fill this gap, offering a more robust and <br>detailed view into Python package installations, evolving with Python's packaging ecosystem.


title: TLDR
content:
<b>Inspect the current environment</b>`pip inspect`<br><b>Inspect and save output to a file</b>`pip inspect > [environment_report.json]`<br><b>Inspect only locally installed packages (not global)</b>`pip inspect --local`<br><b>Inspect only user-installed packages</b>`pip inspect --user`<br><b>Inspect packages in a specific path</b>`pip inspect --path [path/to/environment]`<br><b>Inspect with verbose output (Note: the -v flag can be repeated to increase verbosity)</b>`pip inspect [[-v|--verbose]]`


title: PARAMETERS
content:
<b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the help message and exit.<br><br><b>-o OUTPUT, --output OUTPUT</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the output filename for the lockfile (default: <i>requirements.txt</i>).<br><br><b>--index-url INDEX_URL</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Base URL for the Python Package Index (default: <i>https://pypi.org/simple</i>).<br><br><b>--extra-index-url EXTRA_INDEX_URL</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Extra URLs for the Python Package Index. Can be used multiple times.<br><br><b>--no-index</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Ignore the package index (only look in <b>--find-links</b> locations).<br><br><b>--find-links FIND_LINKS</b><br>&nbsp;&nbsp;&nbsp;&nbsp;If a URL or path to an HTML file, then parse for links to archives. If a path to a directory, then look for archives in this directory. Can be used multiple times.<br><br><b>--force-reinstall</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Force reinstallation of all packages during the internal dry-run process, even if already present.<br><br><b>--verbose</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show more detailed output during execution.<br><br><b>--version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show program's version number and exit.<br><br>


title: DESCRIPTION
content:
<i>pip-lock</i> is a Python package management utility designed to create a single, robust <i>requirements.txt</i> file. Unlike standard <b>pip freeze</b>, it resolves and includes <b>all</b> transitive dependencies, along with their corresponding SHA256 hashes. This ensures highly reproducible installations by preventing tampering or unexpected changes in package versions or sources.<br><br>It functions by internally using <b>pip install --dry-run --report</b> to determine the full dependency tree and gather package metadata, then generates a lockfile that can be used for secure and deterministic deployments. It accepts package names or existing requirement files as input, making it a powerful tool for maintaining strict control over project dependencies.


title: CAVEATS
content:
<i>pip-lock</i> is not a standard <b>pip</b> command and requires separate installation (e.g., <b>pip install pip-lock</b>). It can be slower for large dependency trees due to the process of fetching and hashing all transitive dependencies. While aiming for high reproducibility, its reliance on <b>pip install --dry-run</b> might occasionally miss nuances in very complex or custom package builds, and it is generally less mature and widely adopted than alternatives like <b>pip-tools</b>.


title: DETERMINISTIC BUILDS
content:
The primary benefit of <i>pip-lock</i> is to ensure absolutely deterministic builds. By locking down every dependency, including transitive ones, with specific SHA256 hashes, it guarantees that installing from the generated <i>requirements.txt</i> will always result in the exact same set of packages, bit-for-bit, preventing environmental drift and 'works on my machine' issues across different environments or over time.


title: SUPPLY CHAIN SECURITY
content:
Including hashes for all packages provides a strong defense against supply chain attacks. If a package on a PyPI mirror or custom index is tampered with or replaced, the hash in the <i>requirements.txt</i> will no longer match, preventing the installation of potentially malicious code and alerting users to the discrepancy during the installation process.


title: HISTORY
content:
<i>pip-lock</i> emerged from the ongoing challenge in Python dependency management to achieve truly deterministic and secure builds. While tools like <b>pip freeze</b> provide a basic snapshot, and <b>pip-tools compile</b> offers robust dependency resolution, <i>pip-lock</i> specifically addresses the need for a single, comprehensive lockfile that includes <b>all</b> dependency hashes by default. This approach gained traction as a response to increasing concerns about supply chain security and the desire for stronger guarantees of reproducible environments, typically gaining more niche adoption compared to <b>pip-tools</b>.


title: TLDR
content:
<b>Generate a pylock.toml for the current project</b>`pip lock [[-e|--editable]] .`<br><b>Lock dependencies from a requirements file</b>`pip lock [[-r|--requirement]] [path/to/requirements.txt]`<br><b>Specify a custom output file for the lock</b>`pip lock [[-o|--output]] [path/to/lockfile.toml]`<br><b>Lock a specific package and its dependencies</b>`pip lock [package]`


title: SYNOPSIS
content:
<b>pip wheel</b> [options] &lt;package/requirement specifier&gt; ...<br><b>pip wheel</b> [options] <b>-r</b> &lt;requirements file&gt; ...<br><b>pip wheel</b> [options] &lt;directory&gt;


title: PARAMETERS
content:
<b><b>--wheel-dir &lt;dir&gt;</b>, <b>-w &lt;dir&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Directory to store built wheels. Defaults to the current directory.<br><br><b><b>--no-deps</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Don't build or download package dependencies. Only build the specified packages.<br><br><b><b>--no-binary &lt;package&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not use pre-built binary packages (wheels) for the specified package(s). Force building from source.<br><br><b><b>--only-binary &lt;package&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Only use pre-built binary packages (wheels) for the specified package(s). Do not build from source.<br><br><b><b>-r &lt;file&gt;</b>, <b>--requirement &lt;file&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Build wheels for packages listed in the given requirements file.<br><br><b><b>-f &lt;url&gt;</b>, <b>--find-links &lt;url&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Look for project archives in this URL or path. Can be an HTML file or a directory containing packages.<br><br><b><b>--index-url &lt;url&gt;</b>, <b>-i &lt;url&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Base URL of the Python Package Index (e.g., https://pypi.org/simple).<br><br><b><b>--extra-index-url &lt;url&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Extra URLs of package indexes to use in addition to the primary index URL.<br><br><b><b>--build-option &lt;option&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Extra option to pass to <i>setup.py bdist_wheel</i> for controlling the build process.<br><br><b><b>--no-build-isolation</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disable isolation when building a modern source distribution. Uses the current environment for dependencies.<br><br><b><b>--python-version &lt;version&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The Python version to use for wheel building (e.g., '3' or '3.8').<br><br><b><b>--platform &lt;platform&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specific platform to build wheels for (e.g., 'manylinux1_x86_64', 'win_amd64').<br><br><b><b>--abi &lt;abi&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specific ABI (Application Binary Interface) to build wheels for (e.g., 'cp37m').<br><br><b><b>--implementation &lt;implementation&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Python implementation to build wheels for (e.g., 'cp' for CPython, 'pp' for PyPy).<br><br>


title: DESCRIPTION
content:
<i>pip wheel</i> is a <i>pip</i> subcommand used to build "wheel" files (<b>.whl</b>) from specified Python packages. Wheels are a standard built-package format for Python, designed to allow for easy and fast installation without needing to re-run setup scripts or compilers. This is especially beneficial in environments lacking build tools or internet access during deployment.<br><br>The command resolves package dependencies, downloads source distributions if necessary, builds them into wheel files, and stores these files locally. It's a crucial tool for creating a "wheelhouse" – a local directory of pre-built packages – which is invaluable for air-gapped systems, continuous integration/delivery pipelines (CI/CD), and faster, more reliable deployments by avoiding repeated compilation.


title: CAVEATS
content:
<ul><li><b>Dependency Handling:</b> By default, <i>pip wheel</i> will download and build dependencies, but it does NOT install them into the current environment. It only places their wheels in the specified wheel directory.</li><li><b>Platform Specificity:</b> Wheels containing compiled extensions are platform-specific. A wheel built on Linux will typically not work on Windows or macOS. Pure-Python wheels are generally cross-platform.</li><li><b>Build Tools Required:</b> If a package contains compiled extensions (e.g., C, C++, Fortran), the system where <i>pip wheel</i> is run must have the necessary build tools (like a C compiler, Python development headers) installed.</li></ul>


title: THE 'WHEELHOUSE' CONCEPT
content:
<i>pip wheel</i> is commonly used to create a 'wheelhouse' – a local directory containing pre-built <b>.whl</b> files for a project and all its dependencies. This wheelhouse can then be used to install packages rapidly and offline, typically with a command like: <br><code>pip install --no-index --find-links /path/to/wheelhouse -r requirements.txt</code>. <br>This approach guarantees reproducible builds and simplifies deployments to air-gapped or production environments.


title: UNDERSTANDING WHEEL COMPATIBILITY TAGS
content:
The filename of a wheel (e.g., <code>numpy-1.21.2-cp39-cp39-manylinux_2_17_x86_64.whl</code>) contains 'tags' that describe its compatibility. These tags specify the Python version, ABI, and platform it was built for. When building wheels for different deployment targets, it's crucial to consider these tags and potentially build separate wheelhouses for each unique environment (e.g., different Python versions or operating systems) using options like <b>--python-version</b> and <b>--platform</b>.


title: HISTORY
content:
The wheel format (<b>.whl</b>), formally introduced as PEP 427 in 2012, aimed to standardize a built-package format for Python that would be faster and more reliable to install than traditional source distributions (<i>sdist</i>). <i>pip</i> adopted the <i>wheel</i> subcommand to simplify the creation of these binary packages. This made it significantly easier for developers to pre-build their project's dependencies for various deployment scenarios, particularly in CI/CD pipelines and environments with restricted internet access. Wheels have since become the preferred method for distributing and installing most Python packages, especially those with compiled components.


title: TLDR
content:
<b>Build a wheel for a package</b>`pip wheel [package]`<br><b>Build wheels for packages in requirements file</b>`pip wheel [[-r|--requirement]] [path/to/requirements.txt]`<br><b>Build wheel to a specific directory</b>`pip wheel [package] [[-w|--wheel-dir]] [path/to/directory]`<br><b>Build wheel without dependencies</b>`pip wheel [package] --no-deps`<br><b>Build wheel from local project</b>`pip wheel [path/to/project]`<br><b>Build wheel from Git repository</b>`pip wheel git+[https://github.com/user/repo.git]`


title: TLDR
content:
<b>Package a Pygame project and start a local test server</b>`pygbag [path/to/project_folder]`<br><b>Package using Python module syntax</b>`python -m pygbag [path/to/project_folder]`<br><b>Package and build without starting the test server</b>`pygbag [path/to/project_folder] --build`<br><b>Package with a specific template</b>`pygbag [path/to/project_folder] --template [template_name.tmpl]`<br><b>Package and create a ZIP archive for <https://itch.io></b>`pygbag [path/to/project_folder] --archive`<br><b>Package with optimization turned off</b>`pygbag [path/to/project_folder] --no_opt`<br><b>Specify a custom port for the test server</b>`pygbag [path/to/project_folder] --port [8080]`<br><b>Display help</b>`pygbag [[-h|--help]]`


title: TLDR
content:
<b>Reindex a specific database</b>`reindexdb [database_name]`<br><b>Reindex a specific database using connection options</b>`reindexdb [database_name] [[-h|--host]] [hostname] [[-p|--port]] [port] [[-U|--username]] [username]`<br><b>Reindex all databases</b>`reindexdb [[-a|--all]]`<br><b>Reindex a specific table in a database</b>`reindexdb [database_name] [[-t|--table]] [table_name]`<br><b>Reindex a specific index in a database</b>`reindexdb [database_name] [[-i|--index]] [index_name]`<br><b>Reindex a specific schema in a database</b>`reindexdb [database_name] [[-S|--schema]] [schema_name]`<br><b>Reindex with verbose output</b>`reindexdb [database_name] [[-v|--verbose]]`<br><b>Reindex a database using multiple parallel jobs</b>`reindexdb [database_name] [[-j|--jobs]] [number_of_jobs]`


title: SYNOPSIS
content:
<b>vacuumdb</b> [<i>option</i>...] [<i>dbname</i>]<br><b>vacuumdb</b> [<i>option</i>...] <b>--all</b><br><b>vacuumdb</b> [<i>option</i>...] <b>--table</b>=<i>table</i> [<i>(column,...)</i>]


title: PARAMETERS
content:
<b><b>-a</b>, <b>--all</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Vacuum or analyze all databases.<br><br><b><b>-d</b> <i>dbname</i>, <b>--dbname</b>=<i>dbname</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the name of the database to be vacuumed or analyzed. If not specified, defaults to the user's login name.<br><br><b><b>-e</b>, <b>--echo</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Echo the commands that <i>vacuumdb</i> generates and sends to the server.<br><br><b><b>-f</b>, <b>--full</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Performs a 'full' vacuum, which can reclaim more space but is much slower and requires an exclusive lock on the table.<br><br><b><b>--freeze</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Freezes transaction IDs in tuples. This is equivalent to running <code>VACUUM FREEZE</code>. This option is important for preventing transaction ID wraparound.<br><br><b><b>-j</b> <i>num</i>, <b>--jobs</b>=<i>num</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Executes commands concurrently using <i>num</i> jobs. Can speed up vacuuming and analyzing of multiple tables or databases.<br><br><b><b>-q</b>, <b>--quiet</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not display progress messages.<br><br><b><b>-t</b> <i>table</i> [(<i>column,...</i>)], <b>--table</b>=<i>table</i> [(<i>column,...</i>)]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Vacuum or analyze a specific table. Can optionally specify columns to analyze only those.<br><br><b><b>-v</b>, <b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Print detailed progress reports during operation.<br><br><b><b>-V</b>, <b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Print the <i>vacuumdb</i> version and exit.<br><br><b><b>-z</b>, <b>--analyze</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Updates statistics for the query planner after vacuuming.<br><br><b><b>-Z</b>, <b>--analyze-only</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Only updates statistics; does not perform a vacuum operation.<br><br><b><b>--disable-page-skipping</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disables the page-skipping optimization during vacuuming. Useful in conjunction with <b>--freeze</b> to ensure all pages are processed.<br><br><b><b>--clean-catalog</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Clean system catalog tables. Equivalent to <code>VACUUM (CLEAN_CATALOG ON)</code>.<br><br><b><b>--no-index-cleanup</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Skips index cleanup. Use with caution as this can lead to larger indexes. Equivalent to <code>VACUUM (INDEX_CLEANUP OFF)</code>.<br><br><b><b>--no-truncate</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not truncate empty pages at the end of the table. Equivalent to <code>VACUUM (TRUNCATE OFF)</code>.<br><br><b><b>--skip-locked</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Skip any relations (tables) that cannot be locked immediately. This allows <i>vacuumdb</i> to continue processing other relations.<br><br><b><b>--min-xid-age</b>=<i>age</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Vacuum tables where the transaction ID age is at least <i>age</i>, helping to prevent transaction ID wraparound.<br><br><b><b>--min-mxid-age</b>=<i>age</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Vacuum tables where the multixact ID age is at least <i>age</i>.<br><br>


title: DESCRIPTION
content:
<i>vacuumdb</i> is a utility for performing maintenance on a PostgreSQL database, specifically to <b>vacuum</b> and <b>analyze</b> it. <br><br>The primary function of <b>vacuuming</b> is to reclaim storage occupied by 'dead' tuples (rows that have been deleted or updated). In PostgreSQL's MVCC (Multi-Version Concurrency Control) architecture, old versions of rows are not immediately removed from disk; they are marked as 'dead' and remain until vacuumed. Reclaiming this space is crucial for preventing disk bloat and maintaining database performance.<br><br>The <b>analyze</b> function gathers statistics about the contents of tables, which the PostgreSQL query planner uses to determine the most efficient execution plans for queries. Regularly updated statistics are vital for optimal query performance.<br><br>Beyond space reclamation and statistics updates, <i>vacuumdb</i> also plays a critical role in preventing <i>transaction ID wraparound</i>, a condition that can lead to database shutdown if not properly managed. It can operate on a single database, all databases, or specific tables, making it a flexible tool for database administrators. While PostgreSQL's auto-vacuum daemon handles much of the routine maintenance, <i>vacuumdb</i> provides a powerful command-line interface for manual, on-demand, or more aggressive maintenance tasks.


title: CAVEATS
content:
Using <b>--full</b> can be very resource-intensive, requiring an <i>exclusive lock</i> on the table and temporarily doubling the disk space usage. It should be used sparingly and typically during maintenance windows.<br><br>While <i>vacuumdb</i> is essential, frequent manual runs might indicate that PostgreSQL's auto-vacuum daemon is not optimally configured for your workload.<br><br>Inadequate vacuuming can lead to significant database bloat, decreased performance, and ultimately, a critical database shutdown due to <i>transaction ID wraparound</i>.


title: AUTO-VACUUM VS. VACUUMDB
content:
PostgreSQL's <i>auto-vacuum</i> daemon automatically performs vacuum and analyze operations in the background. For most routine maintenance, auto-vacuum is sufficient. <i>vacuumdb</i> provides a way to trigger these operations manually, which is useful for: <br><ul><li>Performing more aggressive vacuuming (e.g., with <b>--full</b>).</li><li>Running vacuum/analyze on demand after large data changes.</li><li>Addressing specific issues like impending transaction ID wraparound.</li><li>Integrating with custom maintenance scripts.</li></ul>


title: TRANSACTION ID WRAPAROUND
content:
Every transaction in PostgreSQL is assigned a unique <i>Transaction ID (XID)</i>. These IDs are 32-bit integers, meaning they eventually 'wrap around'. If the oldest active transaction ID in the database is not 'frozen' (i.e., marked as permanently completed) before the system runs out of new XIDs, the database will shut down to prevent data corruption. <i>vacuumdb</i> (especially with options like <b>--freeze</b> or <b>--min-xid-age</b>) is a critical tool for preventing this by ensuring old transaction IDs are properly frozen and recycled.


title: HISTORY
content:
<i>vacuumdb</i> has been a cornerstone utility of PostgreSQL since its early development, essential due to PostgreSQL's MVCC architecture. Its core functionality of reclaiming dead space and updating query planner statistics has remained consistent.<br><br>Over time, the command has evolved with PostgreSQL itself, gaining new options to offer finer control over the vacuuming process, improve performance (e.g., through parallel execution with <b>--jobs</b>), and address specific maintenance challenges like transaction ID wraparound with options like <b>--freeze</b> and <b>--min-xid-age</b>.<br><br>The introduction and continuous improvement of the auto-vacuum daemon in PostgreSQL have significantly reduced the necessity for frequent manual <i>vacuumdb</i> runs, but it remains an indispensable tool for targeted maintenance, troubleshooting, and administrative scripts.


title: TLDR
content:
<b>Vacuum a specific database</b>`vacuumdb [database_name]`<br><b>Vacuum all databases</b>`vacuumdb [[-a|--all]]`<br><b>Vacuum a specific table in a database</b>`vacuumdb [[-t|--table]] [table_name] [database_name]`<br><b>Vacuum and update statistics for the query planner</b>`vacuumdb [[-z|--analyze]] [database_name]`<br><b>Perform a full vacuum (more aggressive, locks tables, rewrites the whole table)</b>`vacuumdb [[-f|--full]] [database_name]`<br><b>Vacuum with verbose output</b>`vacuumdb [[-v|--verbose]] [database_name]`<br><b>Vacuum a database using multiple parallel jobs</b>`vacuumdb --jobs [number_of_jobs] [database_name]`


title: PARAMETERS
content:
<b><i>packages/files</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<br>Specifies the Go packages or individual source files to be vetted. For example, <code>.</code> for the current package, <code>./...</code> for all subpackages, or a specific file like <code>main.go</code>.<br><br><b><code>-n</code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<br><i>Print the commands that would be executed</i> by <b><code>go vet</code></b> to standard output, but do not run them. Useful for debugging or understanding the execution flow.<br><br><b><code>-x</code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<br><i>Print the commands as they are executed</i>. This option is similar to <code>-n</code> but actually runs the commands, showing the underlying operations.<br><br><b><code>-vettool</code> <i>prog</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<br><i>Specify an alternate vetting tool</i> to use instead of the default <code>go tool vet</code>. This allows users to substitute a custom static analysis tool or a different version of <code>vet</code>.<br><br>


title: DESCRIPTION
content:
The command <b>vet</b> is <i>not a standard standalone Linux utility</i> found in most distributions. When referred to in a Linux context, it most commonly alludes to <b><code>go vet</code></b>, a powerful static analysis tool for the Go programming language. <br><br><b><code>go vet</code></b> systematically examines Go source code for constructs that are syntactically correct but are likely to be errors or suspicious. It catches issues that the Go compiler might miss, such as mismatches between <code>printf</code> format strings and arguments, incorrect method signatures, unreachable code, or potential locking issues. <br><br>By identifying these patterns early in the development cycle, <b><code>go vet</code></b> significantly contributes to improving code quality, reliability, and maintainability. It's an essential tool for Go developers, often integrated into Continuous Integration (CI) pipelines to ensure code adheres to best practices and avoids common pitfalls. While it aims to catch common errors, it's not exhaustive and may occasionally produce false positives or miss complex issues.


title: CAVEATS
content:
The command <b>vet</b> is <i>not a general-purpose Linux command</i>. Its functionality is entirely dependent on the Go programming language toolchain. It requires Go to be installed and correctly configured on the system. While powerful, <b><code>go vet</code></b> provides static analysis and may not catch all runtime bugs; it can also sometimes produce 'false positives' that require manual inspection.


title: CLARIFICATION ON 'VET'
content:
It's crucial to understand that <i>'vet' is not a standard, universally available Linux command</i> like <code>ls</code> or <code>grep</code>. This analysis specifically pertains to <b><code>go vet</code></b>, the static analysis tool for the Go programming language, which is the most prominent tool using 'vet' in its name within the Linux environment. If you encountered 'vet' in another context, it might be a custom script or an alias unique to that environment.


title: CONFIGURING SPECIFIC CHECKS
content:
While <b><code>go vet</code></b> itself has a few flags, the vast majority of its powerful checks (such as for <code>printf</code> format string mismatches, shadowed variables, unreachable code, or checking composite literals) are actually configured via flags passed to the underlying <code>go tool vet</code> utility. These are not directly exposed by <b><code>go vet</code></b> but are implicitly used or can be controlled when using <code>-vettool</code> with specific arguments.


title: HISTORY
content:
The <b><code>vet</code></b> tool has a long history within the Go ecosystem. It originated as a standalone command (simply <code>vet</code>) provided by the Go team, designed to catch common programming errors. Over time, it was integrated more closely into the Go toolchain, becoming <b><code>go tool vet</code></b>, which is a sub-command accessed via <b><code>go tool</code></b>. Eventually, for user convenience, the <b><code>go vet</code></b> wrapper command was introduced, making it easier to invoke. Its set of checks has expanded and evolved with the Go language itself, continuously improving its ability to detect potential issues.


title: TLDR
content:
<b>Scan the current directory</b>`vet scan [[-D|--directory]] .`<br><b>Scan the package-lock.json manifest file</b>`vet scan [[-M|--manifests]] [path/to/manifest_file]`<br><b>Scan with filter to fail on any critical vulnerability found in the codebase</b>`vet scan [[-D|--directory]] [path/to/directory] --filter 'vulns.critical.exists(p, true)' --filter-fail`<br><b>Scan any OSS package for malware</b>`vet inspect malware --purl [package_url]`<br><b>Start the MCP server for AI enabled security in code editors like Cursor</b>`vet server mcp`


title: PARAMETERS
content:
<b><I>No standard parameters documented</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Since <b>zapier-history</b> is not a standard Linux command, there are no universally defined parameters. Its options are entirely dependent on its specific implementation. However, if it wraps a Zapier CLI command or is a custom script, it might commonly accept:<br><b><I>--help</I></b>: Displays usage information and available options.<br><b><I>-v</I></b> or <b><I>--verbose</I></b>: Provides more detailed output.<br><b><I>--app <app_id></I></b>: Specifies the Zapier app ID to query history for (if applicable).<br>Consult local documentation or script source for actual supported options.<br><br>


title: DESCRIPTION
content:
The <b>zapier-history</b> command is generally not a standard Linux utility, but rather a custom script, an alias, or an internal command often found in environments utilizing the Zapier Platform CLI or custom deployment pipelines. Its primary purpose is to display a historical record of Zapier-related activities. This could include past deployments of Zapier integrations, a log of Zap runs, or other significant events within a Zapier development or operational workflow. As it is not standardized, its exact behavior, available options, and output format depend entirely on its specific implementation, which might be a wrapper around more official CLI commands like <b><I>zapier deploy:history</I></b> or a wholly custom logging solution. Users typically invoke this command to audit changes, troubleshoot issues, or simply keep track of the development lifecycle of their Zapier integrations.


title: CAVEATS
content:
The <b>zapier-history</b> command is highly context-dependent. It is crucial to understand that it is likely a custom script, an alias, or a non-standard command. Therefore:<br><br>1. <b><I>Not Universally Available</I></b>: It will not be present on all Linux systems unless explicitly installed or created.<br>2. <b><I>Implementation Varies</I></b>: Its functionality, output, and parameters are entirely determined by its specific implementation in a given environment.<br>3. <b><I>Potential for Customization</I></b>: Users should consult the source code or local documentation for its precise usage.<br>4. <b><I>May Wrap Other Tools</I></b>: It often acts as a convenience wrapper around official Zapier Platform CLI commands like <b><I>zapier deploy:history</I></b>, or other internal logging tools.


title: USAGE CONTEXT
content:
This command is most commonly found in development or CI/CD environments where Zapier integrations are being built, deployed, and maintained. It helps developers keep track of versioning and changes applied to their Zapier apps or Zaps.


title: DEBUGGING AID
content:
In a debugging scenario, reviewing the output of <b>zapier-history</b> can provide valuable insights into when a particular change was deployed or when an event occurred, aiding in pinpointing the source of issues.


title: HISTORY
content:
The command <b>zapier-history</b> likely emerged from the need within development teams or individual developers working with the Zapier Platform CLI to quickly view past deployments or activity logs. While the Zapier Platform CLI itself provides commands like <b><I>zapier deploy:history</I></b>, a hyphenated `zapier-history` might be a shell alias, a custom script for convenience, or an older naming convention. Its development would be driven by the practical demand for a concise way to track changes and events related to Zapier integrations, simplifying auditing and troubleshooting processes.


title: TLDR
content:
<b>List the history for an integration</b>`zapier history`<br><b>Display additional debug output</b>`zapier history [[-d|--debug]]`<br><b>List the history with a different output structure</b>`zapier history [[-f|--format]] [plain|json|raw|row|table]`


title: PARAMETERS
content:
<b>--zrok-url <url></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the URL of the zrok controller. Defaults to 'https://api.zrok.io'.<br><br><b>--api-key <key></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Provides the API key for authentication with the zrok controller.<br><br><b>--verbose</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables verbose logging output for detailed operation insights.<br><br><b>--output <format></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the output format (e.g., 'json') for command results.<br><br><b>--insecure</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Allows insecure SSL connections when connecting to the zrok controller (use with caution).<br><br><b><i>(Subcommand-specific options)</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Many <b>zrok</b> commands (e.g., 'share', 'access', 'reserve') have their own specific options. For example, the 'share' command includes options like '--unique-name', '--backend-mode', and '--auth-scheme' to configure the sharing behavior.<br><br>


title: DESCRIPTION
content:
<b>zrok</b> is an open-source command-line tool that enables secure, private, and programmable sharing of local services and resources, leveraging the underlying <I>OpenZiti</I> zero-trust network platform. It allows users to expose local web servers, SSH, databases, or any TCP service to the internet without requiring firewall modifications, port forwarding, or VPNs. <br><br>The tool supports various sharing modes, including public, private (password-protected), and reserved shares for persistent endpoints. It emphasizes security by establishing an outbound-only connection to the <I>zrok</I> service, making the exposed service invisible on the public internet until accessed via the designated <I>zrok</I> URL. This zero-trust approach ensures that only authorized users or services can access the shared resource, significantly enhancing security for development, demonstrations, or internal tool exposure.


title: CAVEATS
content:
<b>zrok</b> requires an active <I>zrok</I> controller and frontend service, either hosted by <I>OpenZiti</I> (zrok.io) or self-hosted. Network performance and reliability depend on the underlying OpenZiti network and the specific <I>zrok</I> service infrastructure. Security of shared services relies heavily on proper configuration, especially for public shares using authentication schemes. Users should be mindful of exposing sensitive services and properly configure access controls.


title: CORE CONCEPTS: SHARING MODES
content:
<b>zrok</b> offers several modes for sharing: <br><i>Public Shares</i>: Accessible via a unique URL. Can be protected with basic authentication.<br><i>Private Shares</i>: Require a <I>zrok</I> 'access' command to establish a secure client-side connection.<br><i>Reserved Shares</i>: Provide a persistent, unchanging <I>zrok</I> URL, ideal for services that need a stable endpoint. <br><i>Backend Proxy Shares</i>: Used for internal service mesh integration, providing a programmatic way for services to access other services securely.


title: OPENZITI INTEGRATION
content:
At its core, <b>zrok</b> leverages the <I>OpenZiti</I> overlay network. When you share a service with <b>zrok</b>, it initiates an outbound-only connection to the <I>zrok</I> infrastructure, which is built on <I>OpenZiti</I>. This creates a secure, dark network path for your service, making it inaccessible from the public internet unless explicitly routed through the <I>zrok</I> and <I>OpenZiti</I> fabric, enforcing zero-trust principles.


title: HISTORY
content:
<b>zrok</b> was developed by <I>OpenZiti</I> (a project by <I>NetFoundry</I>) and first introduced in late 2022 / early 2023. It was designed to provide a secure and flexible way to share services, building upon the foundational zero-trust networking principles of the <I>OpenZiti</I> platform. Its development aimed to offer a more secure and programmable alternative to traditional port-forwarding or basic tunnel services.


title: TLDR
content:
<b>Request an invitation to use the public zrok service (run this first)</b>`zrok invite`<br><b>Enable the zrok environment with the token from an invitation email</b>`zrok enable [your_token]`<br><b>Create a publicly accessible URL for a local web server</b>`zrok share public [http://localhost:8080]`<br><b>Create a secure share accessible only with a unique token</b>`zrok share private [http://localhost:3000]`<br><b>Access a private share created by another user</b>`zrok access private [share_token]`<br><b>Serve the contents of a local directory as a simple website</b>`zrok share public --backend-mode web [path/to/directory]`<br><b>Display the status of the zrok environment and active shares</b>`zrok status`


title: SYNOPSIS
content:
<b>brew-abv</b> <i>[OPTIONS]</i> <b>--og</b> <i>&lt;original_gravity&gt;</i> <b>--fg</b> <i>&lt;final_gravity&gt;</i>


title: PARAMETERS
content:
<b><b>--og</b> <i>&lt;value&gt;</i>, <b>-o</b> <i>&lt;value&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the Original Gravity (OG) of the wort before fermentation. This is a mandatory input.<br><br><b><b>--fg</b> <i>&lt;value&gt;</i>, <b>-f</b> <i>&lt;value&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the Final Gravity (FG) of the fermented beer. This is a mandatory input.<br><br><b><b>--method</b> <i>&lt;simple|advanced&gt;</i>, <b>-m</b> <i>&lt;method&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Chooses the calculation method for ABV. <i>'simple'</i> uses a basic formula (e.g., (OG-FG) * 131.25), while <i>'advanced'</i> might use a more complex, accurate formula for higher ABV beers.<br><br><b><b>--units</b> <i>&lt;sg|plato|brix&gt;</i>, <b>-u</b> <i>&lt;units&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Defines the units for the provided gravity values (OG and FG). Default is typically 'sg' (Specific Gravity).<br><br><b><b>--verbose</b>, <b>-v</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Outputs additional details about the calculation, such as the formula used and intermediate steps.<br><br><b><b>--quiet</b>, <b>-q</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppresses all output except for the final ABV result.<br><br><b><b>--help</b>, <b>-h</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a help message and exits.<br><br>


title: DESCRIPTION
content:
The <b>brew-abv</b> command is a conceptual command-line utility designed to assist homebrewers in calculating the Alcohol By Volume (ABV) of their fermented beverages. While not a standard Linux command distributed with most operating systems, it represents a common need within the homebrewing community for a quick and accessible tool to perform this calculation directly from the terminal. <br><br>It typically takes two primary gravity measurements as input: the Original Gravity (OG) and the Final Gravity (FG). These values are crucial for determining the amount of sugar converted into alcohol during fermentation. The command would then apply a specific formula to these inputs to output the ABV percentage. <br><br>Implementations of such a tool often include options for different calculation formulas (e.g., simple or more precise methods), support for various units of measurement (Specific Gravity, Plato, Brix), and flexible input methods. Its purpose is to streamline a frequent calculation for brewers, providing immediate results without needing external applications or manual calculations.


title: CAVEATS
content:
The <b>brew-abv</b> command is not a standard, pre-installed Linux command. It represents a hypothetical or user-implemented script often created by homebrewers for their specific needs. Therefore, its availability, exact syntax, and options can vary significantly depending on how it was implemented (e.g., a Bash script, Python program, etc.). Users would need to create or obtain such a script and ensure it's executable and located in their system's PATH to use it.


title: ABV CALCULATION FORMULAS
content:
The most common simple formula for ABV calculation is: <br><i>ABV (%) = (OG - FG) * 131.25</i> <br><br>For more accurate results, especially at higher ABVs, an 'advanced' formula like the following is often used: <br><i>ABV (%) = 76.08 * (OG - FG) / (1.775 - OG) * (FG / 0.794)</i> or a similar complex polynomial equation. The specific formula implemented can vary between different versions of a <b>brew-abv</b> script.


title: UNITS OF MEASUREMENT
content:
<ul><li><i><b>Specific Gravity (SG)</b>:</i> The most common unit, representing the density of a liquid relative to water (1.000).</li><li><i><b>Plato (°P)</b>:</i> A measure of sugar content by weight, often used in professional brewing.</li><li><i><b>Brix (°Bx)</b>:</i> Primarily used in winemaking and fruit juice, similar to Plato but based on sucrose content. Conversion between these units is often handled internally by more robust <b>brew-abv</b> implementations.</ul>


title: HISTORY
content:
The concept behind <b>brew-abv</b> stems from the long-standing need within homebrewing and professional brewing to accurately measure alcohol content. Historically, this involved complex laboratory equipment or manual calculations using hydrometer readings. With the rise of command-line tools and scripting, brewers began creating simple utilities to automate this calculation. While no single, universally adopted <b>brew-abv</b> command exists, various iterations have been developed by individuals over the years, often shared in brewing forums or as part of larger brewing software packages. Its development is driven by convenience and the desire to integrate brewing calculations into a command-line workflow.


title: SYNOPSIS
content:
<b>brew uninstall</b> [<i>options</i>] &lt;<i>formula</i>&gt; [...]<br><b>brew uninstall --cask</b> [<i>options</i>] &lt;<i>cask</i>&gt; [...]


title: PARAMETERS
content:
<b><i>&lt;formula&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The name of the formula (command-line tool or library) to uninstall. Multiple formulae can be specified.<br><br><b><i>&lt;cask&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The name of the cask (macOS GUI application) to uninstall. Requires the <b>--cask</b> option.<br><br><b><b>--formula</b>, <b>--formulae</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Explicitly treat all named arguments as formulae. This is usually the default behavior when <b>--cask</b> is not used.<br><br><b><b>--cask</b>, <b>--casks</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Explicitly treat all named arguments as casks. Required for uninstalling macOS GUI applications.<br><br><b><b>--ignore-dependencies</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not check or fail if other installed formulae depend on the formula being uninstalled.<br><br><b><b>--force</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Remove all installed versions of a formula, not just the latest. Use with caution as this is irreversible.<br><br><b><b>--zap</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;For casks, remove all associated files, including configuration and application support files. This is a destructive operation and should be used carefully.<br><br><b><b>--cleanup-only</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Only remove cached downloads, logs, and other files related to the formula, without uninstalling the formula itself.<br><br><b><b>--dry-run</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show what would be uninstalled without actually performing the removal.<br><br>


title: DESCRIPTION
content:
The command `<b>brew uninstall</b>` is used to remove software packages (known as formulae or casks) that have been installed using the Homebrew package manager. While Homebrew is primarily known for macOS, it can also be used on Linux systems (often referred to as 'Homebrew on Linux' or historically 'Linuxbrew'). This command efficiently uninstalls a specified package, cleaning up its files and symlinks. It's an essential tool for managing installed software, freeing up disk space, and maintaining a clean system. Users can specify multiple packages for removal and utilize options to control the uninstallation process, such as removing all versions of a formula or performing a 'zap' uninstall for casks to remove associated application support files.


title: CAVEATS
content:
The command `brew-remove` is not a standard Linux command. This analysis pertains to `<b>brew uninstall</b>`, the uninstallation command for <b>Homebrew</b>. While Homebrew can be installed on Linux, it is primarily a package manager for macOS and is not a native Linux package manager like `apt`, `yum`, or `dnf`. Using `<b>--force</b>` or `<b>--zap</b>` can lead to irreversible removal of data or specific versions, so these options should be used with extreme care.


title: CLARIFICATION ON 'BREW-REMOVE'
content:
There is no direct Linux command named `brew-remove`. The instruction likely refers to `<b>brew uninstall</b>`, which is the command used within the Homebrew ecosystem to remove packages. Homebrew itself can be installed on Linux, enabling its package management capabilities on non-macOS systems.


title: HOMEBREW ON LINUX
content:
Homebrew on Linux (historically known as Linuxbrew) allows users to install macOS-centric packages and use the Homebrew environment on Linux. It typically installs into a user's home directory (e.g., `<i>$HOME/.linuxbrew</i>` or `<i>/home/linuxbrew/.linuxbrew</i>`) to avoid conflicts with the system's native package manager.


title: FORMULAE VS. CASKS
content:
`<b>brew uninstall</b>` handles two main types of packages: 'formulae' (command-line tools, libraries, and frameworks) and 'casks' (macOS graphical applications). When uninstalling casks, it's often recommended to use the `<b>--cask</b>` option explicitly to ensure proper handling.


title: HISTORY
content:
Homebrew was initiated by Max Howell in 2009 for macOS, aiming to simplify software installation. The `<b>brew uninstall</b>` command has been fundamental since its early days, serving as the essential counterpart to `<b>brew install</b>`. Its design reflects Homebrew's philosophy of ease-of-use and clarity in package management, constantly evolving to handle new package types like casks and refine its removal mechanisms over time.


title: SEE ALSO
content:
brew install(1), brew list(1), brew cleanup(1), apt remove(8), yum remove(8), dnf remove(8), pacman -R(8)


title: SYNOPSIS
content:
<I>cargo msrv</I> [OPTIONS]<br><I>cargo msrv</I> find [OPTIONS]<br><I>cargo msrv</I> show [OPTIONS]<br><I>cargo msrv</I> set <I>&lt;VERSION&gt;</I> [OPTIONS]


title: PARAMETERS
content:
<b><I>--min &lt;VERSION&gt;</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the minimum Rust version to consider in the search range.<br><br><b><I>--max &lt;VERSION&gt;</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the maximum Rust version to consider in the search range.<br><br><b><I>--path &lt;PATH&gt;</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Path to the crate root directory to analyze. Defaults to the current directory.<br><br><b><I>--target &lt;TRIPLE&gt;</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the target triple (e.g., <code>x86_64-unknown-linux-gnu</code>) for cross-compilation MSRV checks.<br><br><b><I>--workspace</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Finds the MSRV for the entire workspace, rather than just the current crate.<br><br><b><I>--output-format &lt;FORMAT&gt;</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the output format for the MSRV result (e.g., <code>human</code>, <code>json</code>).<br><br><b><I>--check &lt;COMMAND_NAME&gt;</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the <I>cargo</I> subcommand to run for testing compatibility (e.g., <code>check</code>, <code>build</code>, <code>test</code>).<br><br><b><I>--log-level &lt;LEVEL&gt;</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the verbosity of logging output (e.g., <code>info</code>, <code>debug</code>, <code>trace</code>).<br><br><b><I>-h</I>, <I>--help</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays help information for the command or a specific subcommand.<br><br><b><I>-V</I>, <I>--version</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prints the version of the <I>cargo-msrv</I> tool.<br><br>


title: DESCRIPTION
content:
<code>cargo-msrv</code> is a <I>cargo</I> subcommand designed to automatically determine the lowest Rust compiler version that can successfully build a given Rust project. This tool is invaluable for library authors and application developers who need to define and adhere to a Minimum Supported Rust Version (MSRV) to ensure broad compatibility with their users' toolchains.<br><br>It operates by leveraging <I>rustup</I> to iteratively install and switch between various Rust toolchain versions, performing build or check operations for each. By analyzing the success or failure of these operations, <I>cargo-msrv</I> systematically identifies the MSRV. The process helps in maintaining compatibility in the rapidly evolving Rust ecosystem, preventing accidental MSRV bumps, and aiding in the integration of MSRV verification into Continuous Integration (CI) pipelines.


title: CAVEATS
content:
<b>Prerequisites:</b> <I>cargo-msrv</I> heavily relies on <I>rustup</I> being installed and available on the system to manage Rust toolchains. Without <I>rustup</I>, it cannot function.<br><b>Execution Time:</b> Determining the MSRV can be a time-consuming process, especially for projects with a wide range of potential Rust versions or complex dependency trees, as it involves downloading and compiling with multiple toolchains.<br><b>Network Dependency:</b> The tool requires active network connectivity to download new Rust toolchains and release data via <I>rustup</I>.


title: <B>MSRV DEFINITION</B>
content:
The <b>Minimum Supported Rust Version (MSRV)</b> is the oldest Rust toolchain version that a particular crate (library or application) is guaranteed to build and function correctly with. Specifying an MSRV helps crate users understand the minimum compiler version they need to use, ensuring compatibility and avoiding build failures.


title: <B>HOW IT WORKS</B>
content:
<I>cargo-msrv</I> operates by systematically testing different Rust toolchains. It utilizes <I>rustup</I> to install and switch between various Rust versions. For each version, it attempts to run a specified <I>cargo</I> command (e.g., <code>cargo check</code> or <code>cargo build</code>). By tracking which versions succeed and which fail, it uses an efficient search strategy (typically bisecting) to pinpoint the lowest compatible Rust version.


title: <B>CI INTEGRATION</B>
content:
Many Rust projects integrate <I>cargo-msrv</I> into their Continuous Integration (CI) workflows. This automation ensures that every code change is automatically checked against the declared MSRV, preventing accidental bumps or regressions. This proactive verification helps maintain compatibility and assures users that the crate adheres to its stated MSRV policy.


title: HISTORY
content:
<I>cargo-msrv</I> emerged from the Rust community's growing need to automate the process of identifying and verifying the Minimum Supported Rust Version (MSRV) for crates. Before its development, MSRV checks were often manual, tedious, and prone to error, especially for libraries aiming for broad compatibility. The project gained traction as a crucial tool for library maintainers, providing an efficient, automated method to manage MSRV declarations and prevent regressions. It has seen continuous enhancements, including improved search strategies (like bisecting), better integration with workspace setups, and diverse output options tailored for CI/CD pipelines, solidifying its role in the modern Rust development workflow.


title: SYNOPSIS
content:
<b>conda config</b> <i>[-h | --help] [GLOBAL_OPTIONS] COMMAND [ARGUMENTS...]</i><br><br><b>Common Commands:</b><br><b>conda config</b> <i>--get [KEY ...]</i><br><b>conda config</b> <i>--set KEY VALUE [VALUE ...]</i><br><b>conda config</b> <i>--show</i><br><b>conda config</b> <i>--show-sources</i><br><b>conda config</b> <i>--remove KEY VALUE</i><br><b>conda config</b> <i>--remove-key KEY</i><br><b>conda config</b> <i>--append KEY VALUE</i><br><b>conda config</b> <i>--prepend KEY VALUE</i><br><b>conda config</b> <i>--validate</i><br><b>conda config</b> <i>--describe [KEY ...]</i><br><br><b>Targeting Config Files:</b><br><i>[--file FILE | --env | --system | --site | --rc-path RC_PATH]</i>


title: PARAMETERS
content:
<b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a help message for the <b>conda config</b> command and exits.<br><br><b><b>--get</b> <i>[KEY ...]</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Retrieves and displays the current value(s) for the specified configuration <i>KEY</i>. If no <i>KEY</i> is provided, it lists all configurable keys and their current effective values.<br><br><b><b>--set</b> <i>KEY VALUE [VALUE ...]</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets a configuration value for the specified <i>KEY</i>. For list-type configurations, this replaces the entire list with the provided <i>VALUE(s)</i>.<br><br><b><b>--show</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays all active configuration values, aggregated and resolved from all applicable <i>.condarc</i> files in order of precedence.<br><br><b><b>--show-sources</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists the paths to all <i>.condarc</i> files that Conda is currently using, along with their order of precedence.<br><br><b><b>--remove</b> <i>KEY VALUE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Removes a specific <i>VALUE</i> from a list-type configuration <i>KEY</i>. The <i>VALUE</i> must exactly match an existing entry.<br><br><b><b>--remove-key</b> <i>KEY</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Completely removes a configuration <i>KEY</i> and its associated value from the target <i>.condarc</i> file.<br><br><b><b>--append</b> <i>KEY VALUE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adds a <i>VALUE</i> to the end of a list-type configuration <i>KEY</i>, preserving existing entries.<br><br><b><b>--prepend</b> <i>KEY VALUE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adds a <i>VALUE</i> to the beginning of a list-type configuration <i>KEY</i>, preserving existing entries. This is useful for channel prioritization.<br><br><b><b>--validate</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Checks all <i>.condarc</i> files that Conda finds for valid YAML syntax, reporting any errors.<br><br><b><b>--describe</b> <i>[KEY ...]</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Provides a detailed description of one or more configuration <i>KEYs</i>, including their purpose, type, and default values. If no <i>KEY</i> is given, it describes all known configuration options.<br><br><b><b>--file</b> <i>FILE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies a particular <i>.condarc</i> <i>FILE</i> to manipulate, rather than the default user, environment, or system locations. Alias: <b>--rc-path</b>.<br><br><b><b>--env</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Directs <b>conda config</b> to write changes to the <i>.condarc</i> file located within the active Conda environment.<br><br><b><b>--system</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Directs <b>conda config</b> to write changes to the system-wide <i>.condarc</i> file (e.g., <i>/etc/conda/.condarc</i> or within the root Conda installation).<br><br><b><b>--site</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Directs <b>conda config</b> to write changes to the site-wide <i>.condarc</i> file. This is less commonly used than user or system files.<br><br>


title: DESCRIPTION
content:
<b>conda config</b> is a fundamental command-line utility within the Conda package and environment manager, designed to control various aspects of Conda's behavior. It allows users to view, set, modify, and remove configuration options stored in <i>.condarc</i> files. These configuration files can reside at multiple levels—system-wide, user-specific (typically <i>~/.condarc</i>), or environment-specific—providing a flexible way to manage settings. <br><br>Through <b>conda config</b>, users can customize critical parameters such as channel priorities for package discovery, network proxy settings, SSL verification behaviors, package installation preferences (e.g., <i>always_copy</i>), and update strategies. By manipulating these settings, individuals and organizations can fine-tune how Conda resolves dependencies, sources packages, and interacts with external resources, ensuring compatibility, security, and optimal performance for their development and deployment workflows. It supports various operations like fetching values, setting new ones, appending/prepending to lists, removing entries, and validating configuration files.


title: CAVEATS
content:
When using <b>conda config</b>, it's crucial to understand the precedence of <i>.condarc</i> files: settings in environment-specific files override user-level files, which in turn override system-level files. Incorrectly configured settings can prevent Conda from finding packages, resolving dependencies, or even starting up correctly. Always be mindful of the scope (user, environment, or system) of the changes you are making. For list-type settings like <i>channels</i>, <b>--set</b> will overwrite the entire list, while <b>--append</b> or <b>--prepend</b> are safer for adding entries.


title: <I>.CONDARC</I> FILE STRUCTURE
content:
<i>.condarc</i> files are plain text files formatted using YAML (YAML Ain't Markup Language). They contain key-value pairs where keys represent specific configuration settings (e.g., <i>channels</i>, <i>proxy_servers</i>, <i>ssl_verify</i>) and values can be strings, booleans, integers, or lists. It's possible to manually edit these files, but <b>conda config</b> is the recommended tool to prevent syntax errors.


title: CONFIGURATION PRECEDENCE
content:
Conda loads configuration settings from multiple <i>.condarc</i> files, typically in a specific order: <b>system-level</b> (e.g., <i>/etc/conda/.condarc</i>), <b>user-level</b> (<i>~/.condarc</i>), and <b>environment-level</b> (<i>/path/to/env/.condarc</i>). Settings defined in files loaded later (i.e., environment-level) override those defined in earlier files. For list-type settings (like <i>channels</i>), the behavior can vary; often, entries from higher-precedence files are prepended or merged according to specific Conda logic.


title: HISTORY
content:
The <b>conda config</b> subcommand has been an integral part of the Conda package manager since its early development by Continuum Analytics (now Anaconda Inc.) in 2012. As Conda grew in complexity and feature set, the need for robust and user-friendly configuration management became paramount. <b>conda config</b> evolved to provide granular control over various aspects of Conda's operation, from channel management and network settings to installation preferences and security parameters. Its design around the YAML-formatted <i>.condarc</i> files ensures a human-readable and portable way to manage configurations across different operating systems and Conda installations, adapting to the growing demands of data science and software development communities.


title: PARAMETERS
content:
<b><b>-n</b> <i>ENV_NAME</i>, <b>--name</b> <i>ENV_NAME</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;List packages in the specified environment by name. For example, 'conda list -n my_env'.<br><br><b><b>-p</b> <i>ENV_PATH</i>, <b>--prefix</b> <i>ENV_PATH</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;List packages in the specified environment by its absolute path. Useful when environments are not in the default locations.<br><br><b><b>-r</b>, <b>--revisions</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;List the revision history for the active environment. This shows when changes were made and what packages were affected.<br><br><b><b>--json</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Output all requested information in JSON format, facilitating programmatic parsing and integration with other tools.<br><br><b><b>--show-channel-urls</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the full channel URL for each package. This is often the default behavior in newer Conda versions.<br><br><b><b>-f</b> <i>REGEX</i>, <b>--filter</b> <i>REGEX</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Filter the list of packages by a regular expression pattern. Only packages matching the pattern will be displayed.<br><br><b><b>-e</b>, <b>--export</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Output the packages in a format suitable for recreating an environment. Note: <i>conda env export</i> is generally preferred for full environment definitions.<br><br><b><b>--explicit</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;List all explicitly installed packages, excluding their dependencies.<br><br><b><b>--full-name</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display the full package name, including the version and build string, without truncation.<br><br><b><b>--md5</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the MD5 hash of each package file, providing a checksum for verification.<br><br><b><b>--no-pip</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not include pip-installed packages in the output list.<br><br>


title: DESCRIPTION
content:
The <b>conda list</b> command is a fundamental tool for inspecting the contents of Conda environments. It displays a comprehensive list of all packages installed within a specified (or currently active) environment, along with their respective versions, build strings, and the channels from which they were installed. This command is invaluable for verifying installed dependencies, debugging environment issues, and preparing to reproduce environments. Users can specify an environment by name or path, filter results by package name, and even view the history of changes made to an environment through its revision system. It serves as a quick overview of an environment's current state, aiding in both development and deployment workflows.


title: CAVEATS
content:
The <i>--export</i> option for <b>conda list</b> provides a simpler list of packages than <i>conda env export</i>, which is generally recommended for generating complete, reproducible environment definition files (<i>environment.yml</i>). Output can be extensive for large environments. When using <i>package_spec</i>, remember it filters by name, not by exact match.


title: DEFAULT BEHAVIOR
content:
When no environment is specified using <i>-n</i> or <i>-p</i>, <b>conda list</b> operates on the currently active Conda environment. If no <i>package_spec</i> is provided, it lists all installed packages in that environment.


title: SEARCHING FOR PACKAGES
content:
You can provide a <i>package_spec</i> argument (e.g., 'numpy' or 'python=3.9') directly after the command name to search for specific packages within an environment. This acts as a simple filter.


title: HISTORY
content:
Part of the core Conda package manager from its early development by Continuum Analytics (now Anaconda Inc.), <b>conda list</b> has been a foundational command for environment inspection since its inception, evolving with Conda's features for package and environment management.


title: DESCRIPTION
content:
The command '<I>eim</I>' does not appear to be a standard or widely recognized utility in common Linux distributions or their core package repositories. It is highly probable that it is either a typo for another common command (e.g., <I>vim</I>, <I>emacs</I>), a custom alias or shell function defined on a specific system, or a very obscure tool not included in standard operating system installations.<br><br>Users encountering '<I>eim</I>' should verify the correct spelling of the command they intend to use, check for local aliases (e.g., with `alias eim`), or confirm if it is part of a specialized application or a package that needs to be explicitly installed on their system. Without further context, generic information about '<I>eim</I>' cannot be provided as a standard Linux command.


title: CAVEATS
content:
Attempting to execute '<I>eim</I>' on most standard Linux systems will result in a '<B>command not found</B>' error.<br>It is crucial to ensure the command name is correct. If you expect '<I>eim</I>' to perform a specific function, please check for typos or consult your system administrator/documentation regarding local configurations or custom tools.


title: HISTORY
content:
There is no documented history or development timeline available for a standard Linux command named '<I>eim</I>', as it is not recognized as a part of common distributions or their utility sets.


title: PARAMETERS
content:
<b>--config <path></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the path to a JSON or YAML file containing the detailed definition of the task to be executed. This file typically includes script content, environment variables, working directory, and other execution parameters.<br><br><b>--working-directory <path></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the working directory where the task's commands and scripts will be executed. This is usually the repository checkout directory.<br><br><b>--log-level <level></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Defines the verbosity of the logging output for the task execution (e.g., 'debug', 'info', 'warn', 'error'). This aids in troubleshooting workflow failures.<br><br><b>--trace</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables detailed tracing for the task execution, providing more granular insights into its operations and sub-processes.<br><br><b>--help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a help message with available options and exits.<br><br><b>--version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Shows the version information of the <i>gh-agent-task</i> utility and exits.<br><br>


title: DESCRIPTION
content:
<i>gh-agent-task</i> is an internal utility command primarily used by the GitHub Actions self-hosted runner application. Its core function is to execute a specific task or step within a GitHub Actions workflow job. When the runner agent receives a job assignment from the GitHub Actions service, it leverages this command (or a similar internal mechanism) to spin up a process that performs the actual work defined in a workflow step, such as running scripts, installing dependencies, or executing actions. This command is not intended for direct invocation by users from the command line but rather forms a crucial component of the runner's execution engine, providing the isolation and execution context for each step of a job.


title: CAVEATS
content:
This command is an internal component of the GitHub Actions self-hosted runner application. It is <b>not designed for direct user interaction</b> or standalone execution outside of the runner's context. Attempting to run it directly may lead to unexpected behavior or errors as it relies on specific environmental conditions and configurations set up by the runner agent. Users should interact with GitHub Actions workflows through the GitHub web interface or GitHub CLI, not by invoking this low-level utility.


title: EXECUTION CONTEXT
content:
<i>gh-agent-task</i> executes within a tightly controlled environment established by the main runner process. This includes setting up necessary environment variables (e.g., <code>GITHUB_TOKEN</code>, <code>RUNNER_TEMP</code>), path configurations, and potentially container isolation (e.g., Docker) if the job specifies a container image for execution. It ensures that each step runs with the correct prerequisites and isolation from other jobs or system processes.


title: SECURITY CONSIDERATIONS
content:
As this command is responsible for executing code provided by GitHub Actions workflows, it operates under the security model of the self-hosted runner. It's crucial for administrators to understand the implications of running untrusted code on their machines, as <i>gh-agent-task</i> is the direct executor of potentially malicious scripts. Best practices include running self-hosted runners on dedicated, isolated machines, and carefully reviewing workflow definitions, especially those from external repositories.


title: HISTORY
content:
The <i>gh-agent-task</i> utility (or its functional equivalent) has been an integral part of the GitHub Actions self-hosted runner's architecture since its inception. It evolved alongside the runner application, adapting to new features and execution models introduced in GitHub Actions. Its primary design goal is to provide a robust and isolated execution environment for workflow steps, ensuring consistency and reliability across diverse self-hosted environments. Its development tracks the evolution of the GitHub Actions platform, including support for different operating systems and execution methods.


title: SYNOPSIS
content:
gh attestation <I>command</I> [flags]<br><br><I>Available Commands:</I><br>  <B>generate</B>&nbsp;&nbsp;&nbsp;&nbsp;Generate an attestation for a build<br>  <B>upload</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Upload an attestation to a repository<br>  <B>verify</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Verify an attestation against policies<br>  <B>download</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Download an attestation from a repository<br>  <B>help</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Help about any command


title: PARAMETERS
content:
<b>--repo <owner/repo></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The repository to operate on. Defaults to the current repository.<br><br><b>--branch <name></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The branch associated with the workflow run or artifact.<br><br><b>--workflow <file></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The workflow file to generate/upload an attestation for.<br><br><b>--ref <ref></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The Git reference (e.g., tag, commit SHA) for the attestation subject.<br><br><b>--output <path></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Output path for the generated attestation file (for 'generate' command).<br><br><b>--bundle <path></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Path to a pre-generated attestation bundle file (for 'upload' and 'verify' commands).<br><br><b>--subject <artifact-path>:<digest></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies an artifact subject and its digest for the attestation. Can be repeated.<br><br><b>--format <format></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Output format for the generated attestation (e.g., 'json', 'spdx', 'cyclonedx').<br><br><b>--predicate-type <type></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The type of predicate to generate or verify (e.g., 'slsa.provenance', 'cyclonedx', 'spdx').<br><br><b>--policy <file></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Path to a policy file for verification (for 'verify' command).<br><br><b>--artifact-path <path></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Path to the artifact whose attestation needs to be verified (for 'verify' command).<br><br>


title: DESCRIPTION
content:
The `gh attestation` command is a vital tool for enhancing <I>software supply chain security</I> within the GitHub ecosystem. It enables developers to generate, upload, and verify <I>cryptographic attestations</I> for their software artifacts, particularly those built using GitHub Actions.<br><br>These attestations, often conforming to the <B>SLSA (Supply Chain Levels for Software Artifacts) framework</B>, provide an immutable record of an artifact's <I>provenance</I> – detailing how, when, and by whom it was built. This transparency is crucial for mitigating risks associated with supply chain attacks, ensuring the integrity and authenticity of software components.<br><br>The command allows users to <B>generate</B> attestations (e.g., SLSA Provenance), <B>upload</B> them to secure storage like GitHub's OCI registry alongside the artifacts, and subsequently <B>verify</B> these attestations against defined policies. By integrating `gh attestation` into CI/CD pipelines, organizations can establish a robust security posture, enabling consumers of their software to confidently trust its origin and integrity.


title: CAVEATS
content:
Attestation generation is most robust and automatic within <B>GitHub Actions</B> workflows, leveraging GitHub's built-in signing capabilities. Manual generation and upload can be more complex.<br><br>Defining effective <B>verification policies</B> requires a deep understanding of your supply chain and security requirements, and their implementation can be intricate.<br><br>The security and trustworthiness of attestations fundamentally rely on the integrity of the <B>signing keys</B> and the underlying cryptographic infrastructure.


title: SLSA FRAMEWORK INTEGRATION
content:
`gh attestation` is heavily aligned with the <B>SLSA (Supply Chain Levels for Software Artifacts)</B> framework, a set of standards designed to enhance the integrity of software artifacts. It primarily supports generating SLSA Provenance attestations, which detail the source code, build process, and dependencies of a built artifact. This direct integration helps projects achieve higher SLSA levels by providing cryptographic proof of their build process.


title: USAGE IN GITHUB ACTIONS
content:
While `gh attestation` can be used locally, its most common and powerful application is within <B>GitHub Actions workflows</B>. GitHub provides native actions and environments that streamline the generation and signing of attestations for artifacts produced in a workflow run. This automation ensures that every build automatically generates verifiable provenance, which can then be uploaded and later verified by consumers.


title: HISTORY
content:
The `gh attestation` command emerged as a direct response to the increasing threat of <B>software supply chain attacks</B> and the industry's drive for greater transparency and trustworthiness in software development. Following initiatives like the <B>SLSA (Supply Chain Levels for Software Artifacts)</B> framework, GitHub invested heavily in providing tools to secure its ecosystem.<br><br>Introduced as a feature within the <B>GitHub CLI</B>, `gh attestation` provides a convenient, command-line interface for interacting with GitHub's attestation services, enabling developers to easily integrate provenance generation and verification into their CI/CD pipelines, particularly within GitHub Actions. Its development reflects a broader industry shift towards verifiable software artifacts.


title: PARAMETERS
content:
<b><i>&lt;PR_NUMBER&gt;</i> | <i>&lt;PR_URL&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the pull request to inspect. If omitted, the command targets the pull request associated with the current Git branch.<br><br><b><b>-w</b>, <b>--watch</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Continuously monitors and refreshes the display of check statuses as they change.<br><br><b><b>-i</b>, <b>--interval</b> <i>&lt;duration&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the refresh interval (e.g., "5s") when the <b>--watch</b> flag is active.<br><br><b><b>--repo</b> <i>&lt;owner/repo&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Explicitly specifies the GitHub repository (e.g., "cli/cli") if not run within a Git repository context.<br><br><b><b>-a</b>, <b>--all</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays all checks, including those that have successfully completed.<br><br><b><b>--required</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Filters the output to show only checks that are marked as required for the pull request to be mergeable.<br><br><b><b>--fail-fast</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Causes the command to exit immediately with a non-zero status code if any check is found to be in a failed state.<br><br>


title: DESCRIPTION
content:
The <b>gh-pr-checks</b> extension provides a concise way to view the status of all continuous integration (CI) and other automated checks associated with a GitHub pull request. It aggregates information from various status checks—such as builds, tests, linters, and deployment previews—presenting them in an easily digestible, often color-coded format directly within the terminal. This tool is invaluable for developers and reviewers who need to quickly verify that all automated checks have passed before merging a pull request, or for efficiently diagnosing the cause of a blocked PR. By providing crucial check status information on the command line, <b>gh-pr-checks</b> significantly streamlines the development workflow, minimizing the need to switch between the terminal and the web UI.


title: CAVEATS
content:
Requires the GitHub CLI (<b>gh</b>) to be installed and authenticated.<br>Must be installed as a <b>gh</b> extension using `<i>gh extension install vilmibm/gh-pr-checks</i>`.<br>Operates exclusively with GitHub repositories.<br>Subject to GitHub API rate limits, which may affect frequent polling in watch mode.


title: INSTALLATION
content:
To use <b>gh-pr-checks</b>, it must first be installed as a GitHub CLI extension:<br>`<i>gh extension install vilmibm/gh-pr-checks</i>`


title: INTERACTIVE WATCH MODE
content:
When run with the <b>-w</b> or <b>--watch</b> flag, the command continuously updates the check statuses in real-time, providing a dynamic view of CI progress without manual refreshes.


title: HISTORY
content:
The <b>gh-pr-checks</b> extension was developed by @vilmibm to fulfill a critical need for developers using the GitHub CLI: the ability to rapidly assess the status of CI/CD checks for pull requests without leaving the terminal environment. Its inception reflects a broader movement to integrate more of the GitHub workflow directly into the command line, thereby enhancing developer productivity by significantly reducing context switching. Upon its release, it quickly became a popular and essential tool for optimizing pull request review workflows among the GitHub CLI user base.


title: SYNOPSIS
content:
<code>gh ruleset &lt;command&gt; [flags]</code><br><br><i>Available commands:</i><br>&nbsp;&nbsp;<b>create</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a repository ruleset<br>&nbsp;&nbsp;<b>delete</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete a repository ruleset<br>&nbsp;&nbsp;<b>list</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List repository rulesets<br>&nbsp;&nbsp;<b>update</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Update a repository ruleset<br>&nbsp;&nbsp;<b>view</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;View a repository ruleset<br><br>For more details on a specific command, use <code>gh ruleset &lt;command&gt; --help</code>.


title: PARAMETERS
content:
<b><code>&lt;ruleset_id&gt;</code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The ID of the ruleset to view, update, or delete. (Argument for <b>view</b>, <b>update</b>, <b>delete</b>)<br><br><b><code>--repo &lt;[HOST/]OWNER/REPO&gt;</code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the repository to operate on. Defaults to the current repository. (Applies to all subcommands)<br><br><b><code>--limit &lt;int&gt;</code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Maximum number of rulesets to list. Default is 30. (Applies to <b>list</b>)<br><br><b><code>--confirm</code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Confirm deletion without a prompt. (Applies to <b>delete</b>)<br><br><b><code>--name &lt;string&gt;</code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The name of the ruleset. (Applies to <b>create</b>, <b>update</b>)<br><br><b><code>--target &lt;target&gt;</code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The target of the ruleset, either <i>BRANCH</i> or <i>TAG</i>. (Applies to <b>create</b>, <b>update</b>)<br><br><b><code>--source &lt;source_id_or_login_or_name&gt;</code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The source of the ruleset (e.g., repository ID, user login, or organization name). (Applies to <b>create</b>)<br><br><b><code>--enforcement &lt;enforcement&gt;</code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The enforcement status: <i>active</i>, <i>evaluate</i>, or <i>disabled</i>. (Applies to <b>create</b>, <b>update</b>)<br><br><b><code>--bypass-actors &lt;actor_id_or_login&gt;</code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Comma-separated list of actor IDs or logins allowed to bypass the ruleset. (Applies to <b>create</b>, <b>update</b>)<br><br><b><code>--bypass-mode &lt;mode&gt;</code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The bypass mode for actors: <i>ALWAYS</i> or <i>PULL_REQUEST</i>. (Applies to <b>create</b>, <b>update</b>)<br><br><b><code>--conditions &lt;json&gt;</code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;JSON string defining the conditions under which the ruleset applies. (Applies to <b>create</b>, <b>update</b>)<br><br><b><code>--rules &lt;json&gt;</code></b><br>&nbsp;&nbsp;&nbsp;&nbsp;JSON string defining the specific rules to enforce. (Applies to <b>create</b>, <b>update</b>)<br><br>


title: DESCRIPTION
content:
GitHub repository rulesets enable administrators to enforce a consistent set of policies across branches and tags, enhancing code quality and security. The <code>gh ruleset</code> command, part of the GitHub CLI, provides a powerful interface to programmatically interact with these rulesets directly from the command line. It allows users to list existing rulesets, view their detailed configurations, create new ones, update their settings, and delete them.<br><br>This command streamlines the management of complex branch protection rules, facilitating automation and ensuring compliance with organizational standards without needing to navigate the web UI. It supports defining rules for various aspects like required pull request reviews, commit signing, specific commit message formats, and more.


title: CAVEATS
content:
Using <code>gh ruleset</code> requires appropriate permissions (e.g., admin or owner) for the target repository. The <code>--conditions</code> and <code>--rules</code> flags require complex JSON input, which can be challenging to construct and escape correctly directly on the command line, especially for intricate rulesets. It is often recommended to prepare these JSON structures in a separate file and then use command substitution (e.g., <code>"$(cat file.json)"</code>) to pass them to the command. Overlapping rulesets or rulesets interacting with legacy branch protection rules can lead to unexpected behavior; understanding their precedence is crucial.


title: COMPLEX JSON INPUT FOR RULES AND CONDITIONS
content:
The <code>--conditions</code> and <code>--rules</code> flags accept a JSON string that defines the specific criteria and actions for a ruleset. For complex configurations, it is highly recommended to construct this JSON in a separate file and then pass it to the command line using command substitution to avoid quoting issues and improve readability. For example:<br><code>gh ruleset create --name "My Ruleset" --target BRANCH --source &lt;repo_id&gt; --enforcement active --conditions "$(cat conditions.json)" --rules "$(cat rules.json)"</code>


title: RULESET STRUCTURE AND COMPONENTS
content:
A ruleset is comprised of several key components: a <i>name</i> for identification, an <i>enforcement status</i> (active, evaluate, disabled), a <i>target</i> (BRANCH or TAG), optional <i>bypass actors</i> who can override the ruleset, <i>conditions</i> that determine when the ruleset applies (e.g., `ref_name/include`), and the actual <i>rules</i> which define the policies (e.g., `required_pull_request_reviews`, `required_signatures`). A thorough understanding of these components and their JSON structure is essential for effective ruleset management.


title: HISTORY
content:
GitHub introduced repository rulesets as a more flexible and powerful alternative to the older "protected branches" feature, allowing for more granular and centralized control over repository interactions. The <code>gh ruleset</code> command was subsequently added to the GitHub CLI to empower users to manage these rulesets programmatically, integrating this advanced capability directly into developer workflows. This evolution reflects GitHub's commitment to providing robust policy enforcement tools for modern development practices.


title: PARAMETERS
content:
<b><b>-s</b> <I>scale</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the global scale factor for node positions and sizes.<br><br><b><b>-c</b> <I>margin</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies a margin around the mapped layout in graph units.<br><br><b><b>-d</b> <I>node_size</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the default size for nodes that don't have explicit size attributes.<br><br><b><b>-m</b> <I>map_file</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the path to the map file containing spatial data for node mapping.<br><br><b><b>-f</b> <I>font_size</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the default font size for node labels.<br><br><b><b>-h</b>, <b>-?</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a help message with command usage and options.<br><br><b><I>files</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;One or more input graph files in <B>DOT language</B> format. If omitted, reads from standard input.<br><br>


title: DESCRIPTION
content:
<i>gvmap</i> is a specialized filter command within the Graphviz suite, designed to facilitate the creation of graph layouts based on geographic or spatial data. It reads a graph described in the <B>DOT language</B> and, using an external <B>map file</B>, transforms node attributes into geometric positions and sizes. This allows users to generate layouts where graph nodes accurately reflect real-world locations or specific spatial arrangements without manually specifying coordinates for each node in the DOT file. The command is typically employed as part of a larger Graphviz pipeline, often preceding a layout engine like <B>sfdp</B> to achieve spatially aware graph visualizations. Its primary utility lies in automating the placement of nodes according to predefined spatial relationships or coordinates provided in the map file, thereby simplifying the creation of complex geographical graph diagrams.


title: CAVEATS
content:
<i>gvmap</i> requires a properly formatted <B>map file</B> to perform its core function, making its utility dependent on external data.<br>It does not perform layout generation on its own but rather preprocesses the graph for subsequent layout engines, usually <B>sfdp</B>.<br>Intended primarily for graphs where nodes have a meaningful spatial or geographic dimension, rather than arbitrary graph structures.<br>Part of the Graphviz suite; a full Graphviz installation is required for its functionality.


title: <B>INPUT/OUTPUT</B>
content:
<i>gvmap</i> reads a graph in <B>DOT language</B> from standard input or specified files and outputs a modified <B>DOT graph</B> to standard output. The output graph will have added or modified <I>pos</I> (position) attributes for nodes, suitable for layout by Graphviz engines.


title: <B>MAP FILE FORMAT</B>
content:
The <B>map file</B> (specified by <B>-m</B>) is a plain text file where each line typically contains a node name followed by its spatial coordinates. A common format is: <I>nodename x y [width height]</I>. For example: <I>city_a 100 200</I> or <I>country_b 50 50 30 20</I>. These coordinates are then used to place the corresponding nodes in the graph.


title: <B>TYPICAL USAGE</B>
content:
<i>gvmap</i> is rarely used in isolation. A typical pipeline might look like: <I>cat graph.dot | gvmap -m map.txt | sfdp -Tpng > graph.png</I>. Here, <B>gvmap</B> adds positional data, and <B>sfdp</B> (a layout engine) then uses that data to render the graph, creating a spatially informed visualization.


title: HISTORY
content:
<i>gvmap</i> is an integral component of the open-source Graphviz graph visualization software project, which originated at <B>Bell Labs</B> in the 1990s. Its development arose from the need to visualize complex networks and data structures, specifically catering to scenarios where graph nodes represent geographical locations or have inherent spatial coordinates. Over time, as Graphviz evolved into a comprehensive suite of tools for various graph layout challenges, <i>gvmap</i> solidified its role as the go-to utility for incorporating external spatial data into graph layouts, automating what would otherwise be a tedious manual process of coordinate assignment.


title: SYNOPSIS
content:
<b>kubectl diff</b> (<b>-f</b> <i>FILENAME</i> | <b>-k</b> <i>DIRECTORY</i> | <i>TYPE NAME</i>) [<i>options</i>]


title: PARAMETERS
content:
<b><b>-f</b>, <b>--filename</b> <i>stringArray</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Path to one or more files, directories, or URLs containing the configuration to diff.<br><br><b><b>-k</b>, <b>--kustomize</b> <i>string</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Path to a Kustomize directory containing the configuration to diff.<br><br><b><i>TYPE NAME</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The type and name of a resource to diff (e.g., <i>deployment my-app</i>). Used to diff a live resource against a default/template.<br><br><b><b>--server-side</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;If true, the diff computation is performed server-side, providing a more accurate preview. This is the default behavior for `kubectl diff`.<br><br><b><b>--local</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;If true, perform a diff without contacting the cluster. This compares the local input files against a blank (empty) object in memory.<br><br><b><b>-n</b>, <b>--namespace</b> <i>string</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;If present, the namespace scope for this CLI request.<br><br><b><b>--context</b> <i>string</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The name of the kubeconfig context to use.<br><br><b><b>--kubeconfig</b> <i>string</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Path to the kubeconfig file to use for CLI requests.<br><br><b><b>--dry-run</b> <i>string</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Must be 'server' or 'client'. For `diff`, it defaults to 'server', submitting a dry-run request to the API server for comparison.<br><br><b><b>--field-manager</b> <i>string</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Name of the field manager to use for the server-side apply dry-run during diff operation.<br><br><b><b>--recursive</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;If true and a directory is specified with <b>-f</b>, process the directory recursively.<br><br><b><b>--validate</b> <i>string</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Validate the input against a schema. Possible values: 'strict', 'warn', 'ignore'.<br><br><b><b>--timeout</b> <i>duration</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The length of time to wait for a server response (e.g., <i>5s</i>, <i>1m</i>).<br><br><b><b>-l</b>, <b>--selector</b> <i>string</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Selector (label query) to filter resources for the diff operation.<br><br><b><b>--all-namespaces</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;If present, list resources across all namespaces (for TYPE NAME usage).<br><br>


title: DESCRIPTION
content:
The `kubectl diff` command provides a powerful mechanism to safely preview the changes that would occur if a `kubectl apply` operation were executed. It compares the current live state of one or more Kubernetes resources within a cluster with a desired state defined in local configuration files, Kustomize directories, or standard input. By performing a dry-run against the Kubernetes API server, `kubectl diff` computes the potential resulting object and then presents a standard `diff` output, highlighting additions, deletions, and modifications. This allows users to meticulously review and confirm intended changes before they are actually applied to the cluster, significantly reducing the risk of unintended modifications, misconfigurations, or service disruptions.


title: CAVEATS
content:
<i>kubectl diff</i> performs a dry-run and relies on the API server's interpretation. While highly accurate, it may not perfectly reflect all possible mutations by admission controllers or webhooks that could occur during an actual <i>apply</i> operation. The <b>--local</b> option compares against a blank object, which is useful for validating syntax but does not reflect the current live state without cluster contact.


title: HOW IT WORKS
content:
Internally, <i>kubectl diff</i> sends a dry-run 'apply' request to the Kubernetes API server with the desired configuration. The API server then processes this request as if it were a real 'apply' but without persisting any changes. It computes the theoretical resulting object, incorporating default values, schema validations, and server-side mutations. This theoretical object is then returned to <i>kubectl</i>, which compares it against the resource's current live state in the cluster and presents the differences using a standard patch-style diff format.


title: INTEGRATION WITH GITOPS
content:
<i>kubectl diff</i> is a cornerstone tool in GitOps workflows. It enables automated CI/CD pipelines and developers to verify that the configuration defined in a Git repository (the desired state) accurately reflects the changes that would be made to the live Kubernetes cluster (the actual state) before any deployment takes place. This pre-flight check ensures consistency, minimizes surprises, and maintains a verifiable audit trail of changes.


title: HISTORY
content:
The <i>kubectl diff</i> command was introduced into <i>kubectl</i> to address the critical need for pre-deployment validation and to enhance the safety of <i>kubectl apply</i> operations. Its development paralleled the evolution of server-side apply capabilities in Kubernetes, allowing it to leverage the API server for more authoritative and accurate dry-run comparisons. This integration has solidified its role as an indispensable tool for safe and predictable resource management in Kubernetes environments.


title: SYNOPSIS
content:
<b>mhwd</b> [<b>-h</b>|<b>--help</b>]<br><b>mhwd</b> [<b>-v</b>|<b>--version</b>]<br><b>mhwd</b> [<b>-d</b>|<b>--detect</b>]<br><b>mhwd</b> [<b>-l</b>|<b>--list</b> [<b>-p</b> <I>busid</I>]]<br><b>mhwd</b> [<b>-la</b>|<b>--listall</b> [<b>-p</b> <I>busid</I>]]<br><b>mhwd</b> [<b>-li</b>|<b>--listinstalled</b> [<b>-p</b> <I>busid</I>]]<br><b>mhwd</b> [<b>-a</b>|<b>--autoinstall</b> <I>pci</I> {<I>free</I>|<I>nonfree</I>} [<b>0300</b>|<b>0380</b>|<b>0600</b>]]<br><b>mhwd</b> [<b>-i</b>|<b>--install</b> <I>pci</I> <I>driver_name</I> [<b>-f</b>|<b>--force</b>]]<br><b>mhwd</b> [<b>-r</b>|<b>--remove</b> <I>pci</I> <I>driver_name</I> [<b>-f</b>|<b>--force</b>]]


title: PARAMETERS
content:
<b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a help message and exits.<br><br><b><b>-v</b>, <b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays version information and exits.<br><br><b><b>-d</b>, <b>--detect</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Detects hardware and outputs a list of detected PCI devices.<br><br><b><b>-l</b>, <b>--list</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists currently detected and recommended drivers for your hardware. Can be filtered by <b>-p</b> <I>busid</I>.<br><br><b><b>-la</b>, <b>--listall</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists all available drivers for installation, including those not currently recommended for your system. Can be filtered by <b>-p</b> <I>busid</I>.<br><br><b><b>-li</b>, <b>--listinstalled</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists all drivers currently installed on your system. Can be filtered by <b>-p</b> <I>busid</I>.<br><br><b><b>-a</b>, <b>--autoinstall</b> <I>pci</I> {<I>free</I>|<I>nonfree</I>} [<b>0300</b>|<b>0380</b>|<b>0600</b>]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Automatically installs recommended <I>free</I> (open-source) or <I>nonfree</I> (proprietary) drivers for a specific PCI device class (e.g., <b>0300</b> for VGA controllers).<br><br><b><b>-i</b>, <b>--install</b> <I>pci</I> <I>driver_name</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Installs the specified driver (e.g., <I>video-nvidia</I> or <I>video-linux</I>) for PCI devices. Use <I>mhwd -la</I> to find driver names.<br><br><b><b>-r</b>, <b>--remove</b> <I>pci</I> <I>driver_name</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Removes the specified driver from PCI devices. Use <I>mhwd -li</I> to find installed driver names.<br><br><b><b>-f</b>, <b>--force</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Forces the installation or removal of a driver, potentially overriding warnings or conflicts. Use with caution.<br><br><b><b>-p</b>, <b>--pci</b> <I>busid</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies a particular PCI bus ID (e.g., <I>0000:01:00.0</I>) to target operations on a specific device, especially useful for multi-GPU setups.<br><br><b><b>--nvidia-prime</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Configures NVIDIA Prime for hybrid graphics systems, allowing seamless switching between integrated and dedicated NVIDIA GPUs.<br><br><b><b>--amdgpu-prime</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Configures AMDGPU Prime for hybrid graphics systems, allowing seamless switching between integrated and dedicated AMD GPUs.<br><br>


title: DESCRIPTION
content:
<I>mhwd</I> (Manjaro Hardware Detection) is a powerful, Manjaro-specific command-line utility designed to simplify the complex process of installing and managing hardware drivers, particularly graphics drivers. It automatically detects the hardware components of your system and provides a straightforward way to install the most suitable open-source (<I>free</I>) or proprietary (<I>nonfree</I>) drivers. This significantly improves the user experience, especially for new Linux users who might find manual driver installation challenging.<br><br><I>mhwd</I> acts as an abstraction layer over lower-level package managers like <I>pacman</I>, handling dependencies and configurations automatically. It's especially useful for managing dual-GPU setups (e.g., NVIDIA Optimus or AMD switchable graphics), allowing users to easily switch between integrated and dedicated GPUs. Its primary goal is to ensure optimal system performance and stability by providing robust and well-tested driver solutions tailored for the Manjaro ecosystem.


title: CAVEATS
content:
<b><I>mhwd</I></b> is a utility specific to <I>Manjaro Linux</I> and is not available or functional on other distributions. Misuse, particularly with the <b>-f</b> (force) option, can lead to system instability, unbootable systems, or display issues. Always ensure your system is up-to-date before installing or removing drivers, and consider creating a system snapshot or backup for critical changes. While <I>mhwd</I> simplifies driver management, a basic understanding of your hardware and driver types (free vs. nonfree) is recommended.


title: DRIVER TYPES
content:
<I>mhwd</I> distinguishes between two main driver types:<br><b><I>free</I></b>: Refers to open-source drivers, typically developed by the Linux community (e.g., <I>video-linux</I> which includes Mesa for Intel/AMD/Nouveau). These are generally more stable and integrated with the kernel.<br><b><I>nonfree</I></b>: Refers to proprietary drivers provided by hardware manufacturers (e.g., <I>video-nvidia</I> for NVIDIA cards). These often offer better performance or support for newer features but can sometimes be less stable or cause compatibility issues with kernel updates.


title: PCI BUS IDS AND DEVICE CLASSES
content:
<I>mhwd</I> interacts with hardware via <I>PCI Bus IDs</I> (e.g., <I>0000:01:00.0</I>) which uniquely identify each PCI device on your system. You can find these using <I>lspci</I>.<br>Additionally, <I>mhwd</I> uses <I>PCI Device Classes</I> for broad categorization. Common classes include:<br><b>0300</b>: VGA compatible controller (graphics cards)<br><b>0380</b>: Display controller (other display related devices)<br><b>0600</b>: Host bridge (system controllers)<br>These are used in commands like <I>mhwd -a pci nonfree 0300</I> to target specific types of hardware for driver auto-installation.


title: HYBRID GRAPHICS MANAGEMENT
content:
One of <I>mhwd</I>'s key features is its ability to manage hybrid graphics setups (systems with both an integrated GPU and a dedicated GPU, common in laptops). It provides tools and configurations, such as <b>--nvidia-prime</b> and <b>--amdgpu-prime</b>, to set up and switch between GPUs, ensuring optimal power efficiency or performance depending on the user's needs.


title: HISTORY
content:
<I>mhwd</I> was developed as a core component of <I>Manjaro Linux</I> with the goal of providing an 'it just works' experience for hardware and driver management. Recognizing that driver installation, especially for graphics cards, was a frequent pain point for new Linux users, Manjaro developers created <I>mhwd</I> to automate and simplify this process. Its development focused on abstracting away the complexities of kernel modules, Xorg configuration, and package dependencies, making Manjaro more accessible and user-friendly since its early days.


title: PARAMETERS
content:
<b><b>-D</b><i>&lt;property&gt;</i>=<i>&lt;value&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Defines a system property that can influence the build. For example, <i>-Dmaven.compiler.source=11</i> sets the source compatibility for compilation.<br><br><b><b>-P</b> <i>&lt;profiles&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Activates one or more specific build profiles defined in the <i>pom.xml</i> or Maven settings.<br><br><b><b>-U</b>, <b>--update-snapshots</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Forces a check for updated releases and snapshots from remote repositories, ensuring the latest dependencies are used.<br><br><b><b>-B</b>, <b>--batch-mode</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Runs Maven in non-interactive batch mode, suppressing user prompts. Ideal for continuous integration environments.<br><br><b><b>-e</b>, <b>--errors</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Produces execution error messages, providing more detailed stack traces for debugging.<br><br><b><b>-X</b>, <b>--debug</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Generates extensive debug output for the entire Maven execution, useful for deep troubleshooting.<br><br><b><b>-q</b>, <b>--quiet</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppresses non-error messages, producing minimal output.<br><br><b><b>-fn</b>, <b>--fail-never</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Allows the build to continue and finish even if some modules or phases fail.<br><br><b><b>-pl</b>, <b>--projects</b> <i>&lt;arg&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Builds only the specified reactor projects (modules) instead of all projects in a multi-module build.<br><br><b><b>-T</b>, <b>--threads</b> <i>&lt;arg&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Builds projects concurrently, specifying the number of threads (e.g., <i>-T 4C</i> for 4 CPU cores, <i>-T 2.5C</i> for 250% of CPU cores, or <i>-T 4</i> for 4 threads).<br><br>


title: DESCRIPTION
content:
The command <b>mvn compile</b> executes the <i>compile</i> phase within the Maven default build lifecycle. Its primary function is to transform a project's source code, typically Java <i>.java</i> files found in <i>src/main/java</i>, into compiled bytecode <i>.class</i> files. These generated class files are then placed in the <i>target/classes</i> directory within the project's root.<br><br>Before executing the <i>compile</i> phase, Maven automatically runs all preceding phases in the default lifecycle, which include <i>validate</i>, <i>initialize</i>, <i>generate-sources</i>, <i>process-sources</i>, <i>generate-resources</i>, and <i>process-resources</i>. This ensures that all necessary preliminary steps, such as resource copying and source generation, are completed.<br><br>The <b>mvn compile</b> command relies heavily on the project's <i>pom.xml</i> for configuration, including dependency declarations and the setup of the <i>maven-compiler-plugin</i>. It is a fundamental step in building any Java application with Maven, as subsequent phases like <i>package</i> or <i>install</i> require the compiled classes to be present. It's important to note that this command specifically compiles main project sources and does not handle test sources, which are processed by the <i>test-compile</i> goal.


title: CAVEATS
content:
The command requires a <i>pom.xml</i> file to be present in the current directory or a parent directory. A Java Development Kit (JDK) must be installed and correctly configured in the system's PATH. If the source files have not changed since the last compilation, Maven might not recompile them unless a <i>clean</i> goal is executed first or the compiler plugin is explicitly configured to force recompilation. Large projects with many dependencies can experience slow compilation times, especially during the initial download of dependencies.


title: DEFAULT COMPILER PLUGIN
content:
Maven uses the <i>maven-compiler-plugin</i> by default to handle the compilation process. The version and specific configurations (like source/target Java versions, encoding, etc.) of this plugin can be declared and customized within the <i>&lt;build&gt;</i> section of the project's <i>pom.xml</i> file.


title: DEPENDENCY RESOLUTION
content:
During the <i>compile</i> phase, Maven automatically resolves and downloads all project dependencies declared in the <i>pom.xml</i> from configured Maven repositories (local and remote). These dependencies are then added to the compilation classpath, ensuring that the source code can correctly reference external libraries.


title: HISTORY
content:
Maven, originally released in 2004, emerged from the Apache Turbine project as a build automation tool. It aimed to simplify and standardize the build process for Java projects, moving away from more complex, imperative build scripts like those used in Ant. The <i>compile</i> goal has been a foundational part of Maven's lifecycle since its early versions, representing the core step of source code compilation. Its design principles, focusing on convention over configuration and a well-defined lifecycle, have remained consistent, making <b>mvn compile</b> a stable and essential command in the Java development ecosystem.


title: PARAMETERS
content:
<b>--output <file></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the output file path for the generated SBOM. If not provided, SBOM is printed to stdout.<br><br><b>--format <json|xml></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Choose the output format for the SBOM. Supported formats are <I>json</I> (default) and <I>xml</I>.<br><br><b>--pretty</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Pretty-print the JSON or XML output for better human readability.<br><br><b>--output-version <1.4|1.5></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the CycloneDX schema version to use for the generated SBOM. Common versions are <I>1.4</I> and <I>1.5</I>.<br><br><b>--force-bom-ref-type <hash|purl></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Force a specific type for component BOM-Refs. Options include <I>hash</I> or <I>purl</I>.<br><br><b>--json-file-indent <num></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the indentation level for JSON output. Specify a numeric value for spaces.<br><br><b>--exclude-dev</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Exclude development dependencies from the generated SBOM.<br><br><b>--include-bom-refs</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Explicitly include <I>bom-ref</I> attributes in the generated SBOM components.<br><br><b>--include-optional</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Explicitly include optional dependencies in the generated SBOM.<br><br><b>--include-peer</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Explicitly include peer dependencies in the generated SBOM.<br><br><b>--verbose</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable verbose output for additional diagnostic information during SBOM generation.<br><br><b>--help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display help information for the command.<br><br><b>--version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display the version number of the <b>npm-sbom</b> tool.<br><br>


title: DESCRIPTION
content:
The <b>npm-sbom</b> command, typically provided by the <I>@bom-squad/npm-sbom</I> package, is a powerful utility designed to create Software Bill of Materials (SBOMs) for Node.js projects managed with npm.<br><br>An SBOM is a formal, machine-readable inventory of components that make up a software application. For Node.js projects, this includes details about direct and transitive npm dependencies.<br><br><b>npm-sbom</b> primarily generates SBOMs in the <I>CycloneDX</I> format, which is a lightweight, full-stack, and multi-domain SBOM standard. These SBOMs are crucial for enhancing software supply chain security, enabling organizations to identify, track, and manage open-source and third-party components within their applications.<br><br>By parsing <I>package.json</I> and <I>package-lock.json</I> files, the tool extracts comprehensive information about dependencies, including their versions, licenses, and unique identifiers (like Package URLs - PURLs). This data allows for proactive vulnerability management, compliance auditing, and improved transparency throughout the software development lifecycle. It supports various output options, including JSON and XML, and different CycloneDX schema versions, making it flexible for integration into existing security workflows and tooling.


title: CAVEATS
content:
The <b>npm-sbom</b> command relies on the presence and integrity of <I>package.json</I> and <I>package-lock.json</I> files in the project directory. Issues with these files (e.g., corrupted or outdated lock files) can lead to incomplete or incorrect SBOMs.<br><br>While it captures direct and transitive npm dependencies, it may not automatically include non-npm assets, build-time dependencies not managed by npm, or dynamically loaded components. Users might need to augment the generated SBOMs with additional information for a complete picture of their software supply chain.<br><br>Currently, the primary focus is on generating <I>CycloneDX</I> formatted SBOMs; direct support for other standards like SPDX might require additional tooling or conversion steps.


title: SBOM STANDARDS: CYCLONEDX VS. SPDX
content:
There are two primary open-source SBOM standards: <I>CycloneDX</I> and <I>SPDX</I> (Software Package Data Exchange). <br><br><b>CycloneDX</b>, championed by OWASP, is designed to be lightweight, prescriptive, and security-focused, making it ideal for vulnerability management and supply chain risk. It is well-suited for automation and integration into CI/CD pipelines.<br><br><b>SPDX</b>, an ISO standard, offers a broader scope, including detailed licensing information, copyrights, and other provenance data. While more comprehensive, it can sometimes be more complex to implement. <b>npm-sbom</b> primarily focuses on generating SBOMs in the <I>CycloneDX</I> format, aligning with its security and automation-centric approach for Node.js projects.


title: IMPORTANCE IN SUPPLY CHAIN SECURITY
content:
In today's interconnected software landscape, applications often rely heavily on open-source and third-party components. This introduces significant supply chain security risks, as vulnerabilities in any single component can compromise the entire application. <br><br>SBOMs generated by tools like <b>npm-sbom</b> provide a critical inventory that helps organizations:<br><ul><li>Identify known vulnerabilities (CVEs) present in their dependencies.</li><li>Track licensing compliance and avoid legal risks.</li><li>Understand their attack surface and manage risks proactively.</li><li>Respond quickly to newly discovered vulnerabilities by pinpointing affected applications.</li><li>Meet regulatory requirements and industry best practices for software transparency.</li></ul>


title: HISTORY
content:
The concept of Software Bill of Materials (SBOMs) gained significant traction in the early 2020s, driven by increasing concerns over software supply chain security and various governmental mandates, notably U.S. Executive Order 14028 (May 2021) which emphasized the need for enhanced cybersecurity and SBOM usage.<br><br>As a response to this growing demand, various tools emerged to automate SBOM generation for different programming ecosystems. The <I>CycloneDX</I> standard, developed by the OWASP Foundation, became a leading choice due to its flexibility and comprehensive data model. Tools like <I>@bom-squad/npm-sbom</I> (which provides the <b>npm-sbom</b> command) were developed to specifically address the Node.js/npm ecosystem, allowing developers and security teams to easily generate CycloneDX compliant SBOMs directly from their project's dependency metadata. This development reflects a broader industry shift towards greater transparency and accountability in software component management.


title: SYNOPSIS
content:
<b>paclock</b> [<i>options</i>] [<i>command</i>]<br><b>paclock</b> <i>--help</i><br><b>paclock</b> <i>--version</i>


title: PARAMETERS
content:
<b>-S, --status</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the current status of the <code>pacman</code> lock file.<br><br><b>-L, --lock</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Create the <code>pacman</code> lock file. This typically requires root privileges.<br><br><b>-U, --unlock</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Remove the <code>pacman</code> lock file. Use with extreme caution as improper use can lead to database corruption.<br><br><b>-p, --pidfile <<i>path</i>></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify an alternative lock file path instead of the default <code>/var/lib/pacman/db.lck</code>.<br><br><b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display a help message and exit.<br><br><b>-V, --version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display version information and exit.<br><br>


title: DESCRIPTION
content:
<code>paclock</code> is a utility from the <code>pacutils</code> package designed to manage the <code>pacman</code> package database lock file, typically located at <code>/var/lib/pacman/db.lck</code>.<br><br>This lock file is critical for ensuring the integrity of the <code>pacman</code> database by preventing multiple instances of <code>pacman</code> or other package management tools from accessing and modifying it concurrently. While <code>pacman</code> itself usually handles the creation and removal of this lock file automatically during package operations, <code>paclock</code> provides a manual interface to query its status, create it, or remove it.<br><br>This can be particularly useful in scenarios where a <code>pacman</code> process might have crashed, leaving the lock file behind and preventing subsequent <code>pacman</code> operations, or for scripting package management tasks. Improper use of <code>paclock</code>, especially forcing removal of the lock when <code>pacman</code> is actually running, can lead to severe database corruption.


title: CAVEATS
content:
<b><br>Database Corruption Risk</b>: Forcibly removing the lock file (using <code>-U</code> or <code>--unlock</code>) when <code>pacman</code> or another package manager is actively running can lead to severe database corruption, potentially breaking your system. Always verify no <code>pacman</code> processes are running (e.g., using <code>ps aux | grep pacman</code>) before unlocking manually.<br><br><b>Privileges</b>: <code>paclock</code> often requires root privileges to create or remove the lock file in its default system-wide location (<code>/var/lib/pacman/db.lck</code>).<br><br><b>Manual Intervention</b>: It's generally best practice to let <code>pacman</code> manage its own lock file automatically. <code>paclock</code> is primarily intended for troubleshooting orphaned lock files or for advanced scripting when automated lock management fails.


title: COMMON USE CASE: ORPHANED LOCK FILE
content:
Sometimes, a <code>pacman</code> operation might crash or be interrupted, leaving the <code>/var/lib/pacman/db.lck</code> file behind. This 'orphaned' lock file prevents any further <code>pacman</code> commands from running, displaying an error like 'error: failed to synchronize all databases (unable to lock database)'. In such cases, after confirming no <code>pacman</code> processes are active, <code>paclock -U</code> can be used to safely remove the stale lock file and restore <code>pacman</code> functionality.


title: SECURITY CONSIDERATIONS
content:
While `paclock` itself doesn't directly pose a security risk, its misuse can lead to system instability and potential package database corruption. It should only be used by experienced users or system administrators who fully understand the implications of manually manipulating package manager lock files, especially regarding database integrity and concurrent operations.


title: HISTORY
content:
`paclock` is an integral part of the <code>pacutils</code> project, a collection of auxiliary tools designed to complement and extend the functionality of <code>pacman</code>, the Arch Linux package manager. The development of <code>pacutils</code>, including `paclock`, has focused on providing robust and scriptable utilities for more advanced package management tasks, evolving to address specific needs like manual lock file management that are not directly handled by <code>pacman</code>'s core commands, thereby enhancing system administration capabilities.


title: PARAMETERS
content:
<b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display a brief help message and exit.<br><br><b>-V, --version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show version information for <b>pacrepairfile</b> and exit.<br><br><b>-q, --quiet</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppress most output messages, running silently.<br><br><b>-v, --verbose</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Increase the verbosity of output messages, providing more details about the process.<br><br><b>-f, --force</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Pass the <I>--force</I> option to the underlying <B>pacman -S</B> command, compelling a reinstall even if the package is already up-to-date or files conflict.<br><br><b>-R <path>, --root <path></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify an alternative install root directory for <B>pacman</B> operations.<br><br><b>-S <path>, --dbpath <path></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify an alternative database path for <B>pacman</B> to use.<br><br><b>-c <path>, --cachedir <path></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify an alternative package cache directory for <B>pacman</B>.<br><br><b>-l <path>, --logpath <path></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify an alternative log file path for <B>pacman</B>.<br><br><b>-o <glob>, --overwrite <glob></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Pass the <I>--overwrite &lt;glob&gt;</I> option to <B>pacman -S</B>, allowing files matching the glob pattern to be overwritten during reinstall.<br><br><b>-P, --print-package</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Instead of reinstalling, merely print the name of the package(s) that own the specified file(s).<br><br>


title: DESCRIPTION
content:
The <b>pacrepairfile</b> command is a utility from the <I>pacutils</I> suite designed for Arch Linux and its derivatives. Its primary function is to repair or restore files on a system that have been modified, corrupted, or accidentally deleted. When given one or more file paths, <b>pacrepairfile</b> intelligently queries the <I>libalpm</I> database (Arch Linux Package Management library) to determine which installed package owns each specified file.<br><br>Once the owning package is identified, the command then initiates a reinstall of that package using <b>pacman -S --force &lt;package&gt;</b> (or similar, depending on options). This process replaces the problematic files with their original versions from the package, effectively repairing the system's integrity regarding those specific files. It's an indispensable tool for maintaining system stability and quickly resolving file-related issues without having to manually track down and reinstall packages.


title: CAVEATS
content:
Exclusively designed for Arch Linux and its derivatives, relying on the <I>libalpm</I> library and <B>pacman</B>.<br><br>Requires root privileges (e.g., using <I>sudo</I>) to perform the actual package reinstall operation. Without sufficient permissions, it can only identify owning packages or print help/version information.<br><br>While it reinstalls the original package files, it generally does not touch configuration files that <B>pacman</B> has marked for preservation or user-modified files (e.g., creating <I>.pacnew</I> or <I>.pacsave</I> files). Users should manually review and merge such files.<br><br>Does not fix issues with the <B>pacman</B> database itself; it relies on a functional database to identify package ownership.


title: USAGE CONTEXT
content:
This command is invaluable for system administrators and power users on Arch Linux who need to quickly restore integrity to specific system files without reinstalling an entire operating system or manually tracking down package sources. It streamlines the process of fixing broken symlinks, corrupted binaries, or missing library files by automatically identifying the owning package and reinstalling it.


title: OPERATION FLOW
content:
<b>pacrepairfile</b> first performs a lookup in the Arch Linux Package Management (ALPM) database to determine which installed package contains the specified file(s). Once the package name is identified, it constructs and executes a <B>pacman -S</B> command, effectively requesting <B>pacman</B> to reinstall that specific package. This ensures all files belonging to that package are restored to their pristine state.


title: HISTORY
content:
Part of the <I>pacutils</I> suite, <b>pacrepairfile</b> emerged as a specialized tool to address common issues of file corruption or accidental deletion within an Arch Linux system. <I>pacutils</I> itself was developed to offer enhanced functionality and a more consistent command-line interface for tasks that <B>pacman</B> either doesn't directly support or handles differently, leveraging <I>libalpm</I> for direct database interaction. It fills a crucial gap for users needing quick, targeted file system repair without a full package manager reinstall.


title: PARAMETERS
content:
<b><b>-C</b> <I>channel</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the channel to use for the command (e.g., `pecl.php.net`).<br><br><b><b>-D</b> <I>name</I>=<I>value</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Define a configuration variable for the command (e.g., `ext_dir=/usr/lib/php/modules`).<br><br><b><b>-E</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not enable the extension in `php.ini` after installation.<br><br><b><b>-F</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Force installation, overwriting existing files or ignoring conflicts.<br><br><b><b>-P</b> <I>state</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the preferred package stability state (e.g., `stable`, `beta`, `devel`).<br><br><b><b>-Z</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Only download the package, do not install it.<br><br><b><b>-g</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not upgrade dependencies when installing or upgrading a package.<br><br><b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display help information for the <b>pecl</b> command or a specific subcommand.<br><br><b><b>-n</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Non-interactive mode; do not ask any questions, assume 'yes' to prompts.<br><br><b><b>-q</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Quiet output; suppress most messages, only show errors.<br><br><b><b>-v</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Verbose output; show more detailed information about the operation.<br><br><b><b>-V</b>, <b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display the <b>pecl</b> version information.<br><br>


title: DESCRIPTION
content:
The <b>pecl</b> command is a command-line interface for the PHP Extension Community Library (PECL). PECL serves as a repository for PHP extensions, which are typically written in C and compiled into PHP to add new functionalities or improve performance.<br><br>It provides a streamlined way for developers and system administrators to download, compile, install, upgrade, and uninstall PHP extensions. Instead of manually downloading source code, running `phpize`, configuring, compiling with `make`, and then editing `php.ini`, <b>pecl</b> automates most of these steps.<br><br>This tool is crucial for extending PHP's capabilities with community-contributed modules that are not bundled with the core PHP distribution. It helps maintain consistency in extension management and ensures that dependencies are handled correctly, integrating new functionalities seamlessly into your PHP environment.


title: CAVEATS
content:
Using <b>pecl</b> often requires development tools like a C compiler (e.g., `gcc`) and PHP development headers (e.g., `php-dev` or `php-devel` package on most Linux distributions). Without these, extensions cannot be compiled.<br><br>Installations may require root privileges (e.g., `sudo`) if installing to system-wide PHP directories. Care must be taken to ensure extensions are compatible with the specific PHP version in use. Misconfigurations or compilation failures can lead to PHP not starting or unexpected behavior.


title: COMMON COMMANDS
content:
Some of the most frequently used <b>pecl</b> commands include:<br><b>install</b> <I>package-name</I>: Downloads, compiles, and installs a PHP extension.<br><b>uninstall</b> <I>package-name</I>: Removes an installed PHP extension.<br><b>list</b>: Lists all locally installed PECL packages.<br><b>search</b> <I>search-term</I>: Searches the PECL channel for packages matching the term.<br><b>update-channels</b>: Updates the list of available PECL channels.<br><b>upgrade</b> <I>package-name</I>: Upgrades an installed PHP extension to its latest stable version.


title: INSTALLATION WORKFLOW
content:
A typical <b>pecl</b> installation workflow involves:<br>1. <b>Discovery</b>: `pecl search <I>extension</I>` to find the desired package.<br>2. <b>Installation</b>: `pecl install <I>extension</I>` which downloads the source, runs `phpize`, configures, compiles, and installs the extension into PHP's extension directory.<br>3. <b>Configuration</b>: If not automatically enabled (e.g., via `pecl install -E`), add `extension=<I>extension-name</I>.so` to your `php.ini` file.<br>4. <b>Verification</b>: Restart your web server/PHP-FPM and check `php -m` or `phpinfo()` for the newly installed extension.


title: HISTORY
content:
The <b>pecl</b> command and its underlying system were developed as a counterpart to PEAR (PHP Extension and Application Repository). While PEAR focused on pure PHP code packages, PECL was specifically designed for managing PHP extensions written in C. It emerged in the early 2000s, alongside the development of PHP 4 and 5, to standardize the distribution and installation of compiled PHP modules. Its creation addressed the growing need for a robust system to manage complex, compiled extensions, ensuring they could be easily integrated into various PHP environments without extensive manual compilation and configuration.


title: SYNOPSIS
content:
<br><b>pg_basebackup</b> <I>-D directory</I> [<b>-F {p|t}</b>] [<b>-X {n|f|s}</b>] [<b>-z|-Z level</b>] [<b>OPTION</b>]...


title: PARAMETERS
content:
<b><b>-D</b>, <b>--pgdata=</b><I>directory</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the target directory for the backup. This is a mandatory option.<br><br><b><b>-F</b>, <b>--format=</b><I>format</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the output format. <I>p</I> for plain (default), <I>t</I> for tar. With <I>tar</I>, all files are written into tar archives.<br><br><b><b>-X</b>, <b>--wal-method=</b><I>method</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Includes the required WAL files in the backup. <I>none</I> (default) excludes WAL. <I>fetch</I> collects WAL files after the backup. <I>stream</I> streams WAL files during the backup process.<br><br><b><b>-z</b>, <b>--gzip</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables gzip compression for tar files. Requires <b>-F t</b>.<br><br><b><b>-Z</b>, <b>--compress=</b><I>level</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables gzip compression with a specified compression <I>level</I> (0-9). Requires <b>-F t</b>.<br><br><b><b>-S</b>, <b>--slot=</b><I>slotname</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Requires a replication slot with the specified name to be used for streaming WAL. This ensures the master retains WAL files until the backup is complete.<br><br><b><b>-l</b>, <b>--label=</b><I>label</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the label for the backup (e.g., 'my_daily_backup'). This is written to the backup_label file.<br><br><b><b>-P</b>, <b>--progress</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables progress reporting during the backup process, showing the amount of data transferred.<br><br><b><b>-v</b>, <b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables verbose output, displaying more details about the operation.<br><br><b><b>-h</b>, <b>--host=</b><I>hostname</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the host name of the machine on which the server is running. Defaults to a local Unix domain socket if available, otherwise localhost.<br><br><b><b>-p</b>, <b>--port=</b><I>port</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections.<br><br><b><b>-U</b>, <b>--username=</b><I>username</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;User name to connect as. Requires replication privileges.<br><br><b><b>-T</b>, <b>--tablespace-mapping=</b><I>olddir</I>=<I>newdir</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Relocates a tablespace from <I>olddir</I> to <I>newdir</I> in the backup. Can be specified multiple times.<br><br><b><b>--checkpoint=</b><I>method</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the checkpoint method. <I>fast</I> (default) for minimal delay, <I>spread</I> to spread disk I/O over a longer time.<br><br><b><b>--no-sync</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disables syncing of files to disk. This can be faster but risks data corruption if the system crashes during backup. Use with extreme caution.<br><br><b><b>--max-rate=</b><I>rate</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Limits the data transfer rate (in KB/s) for the backup. Useful to prevent `pg_basebackup` from consuming too much network bandwidth or disk I/O.<br><br><b><b>--verify-checksums</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Verifies data checksums during the backup process, if checksums are enabled on the server. Helps detect data corruption.<br><br><b><b>--dry-run</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Performs all actions except actually writing the backup files. Useful for testing connectivity and permissions.<br><br>


title: DESCRIPTION
content:
<br><i><b>pg_basebackup</b> is a utility used to take a consistent base backup of a running PostgreSQL database cluster. It makes a binary copy of the cluster's data directory, ensuring all necessary files for a full data recovery are included. This command is an essential tool for setting up <I>Point-in-Time Recovery (PITR)</I> and for creating standby servers for replication. It connects to the target PostgreSQL server, which must be running, and streams the data directory contents, optionally including or streaming the Write-Ahead Log (WAL) files. Backups can be taken in either <I>plain</I> file format, which mirrors the server's data directory structure, or <I>tar</I> format, where files are compressed into tar archives. It significantly simplifies the process of creating a consistent backup compared to manual file system copy methods, as it handles the complexities of ensuring data consistency during the backup operation.</i>


title: CAVEATS
content:
<br><i><b>pg_basebackup</b> requires the PostgreSQL server to be running and the connecting user to have replication privileges (or be a superuser). It generally does not back up configuration files that are stored outside the main <I>PGDATA</I> directory, such as a custom <I>postgresql.conf</I> if symlinked elsewhere, nor does it typically include logs. While it creates a consistent backup, it's crucial to ensure sufficient disk space at the destination. The `--write-recovery-conf` option, used in older PostgreSQL versions to automatically create a <I>recovery.conf</I> file, is deprecated and effectively removed in PostgreSQL 12 and later, replaced by the <I>standby.signal</I> file and configuration within <I>postgresql.conf</I>.</i>


title: USAGE IN POINT-IN-TIME RECOVERY (PITR)
content:
<i><b>pg_basebackup</b> forms the foundation of a robust PITR strategy. A base backup provides a consistent starting point, which is then combined with a continuous stream of archived Write-Ahead Log (WAL) files. To restore to a specific point in time, the base backup is first restored, and then the archived WAL files are replayed up to the desired recovery target. Using <b>pg_basebackup -X stream</b> or <b>-X fetch</b> ensures that all WAL segments necessary to make the base backup consistent are either included or streamed, making the backup self-contained and ready for recovery.</i>


title: REPLICATION SLOTS FOR RELIABLE BACKUPS
content:
<i>When taking a base backup, especially for creating a new standby server or ensuring WAL retention for PITR, it is highly recommended to use the <b>--slot=<I>slotname</I></b> option. A replication slot ensures that the primary server does not remove WAL files that are still needed by the base backup process or a subsequent recovery. This prevents scenarios where the primary might truncate WAL segments before they have been successfully included in the backup or processed by a replica, thus avoiding backup failures or data inconsistencies. The slot should be created on the primary server before initiating the backup.</i>


title: HISTORY
content:
<br><i>The <b>pg_basebackup</b> utility was introduced with PostgreSQL 9.1 in 2011. Before its introduction, users typically performed base backups by manually copying the data directory (e.g., using <I>rsync</I> or <I>tar</I>) and ensuring WAL archiving was correctly set up. <b>pg_basebackup</b> streamlined this complex process by providing an integrated, online method for creating consistent file-system-level backups, significantly improving the ease and reliability of setting up replication and Point-in-Time Recovery. Its development focused on making PostgreSQL disaster recovery and standby server provisioning more robust and user-friendly.</i>


title: PARAMETERS
content:
<b>--bindir</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the location of user executables (e.g., psql, pg_dump).<br><br><b>--docdir</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the location of documentation files.<br><br><b>--htmldir</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the location of HTML documentation files.<br><br><b>--includedir</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the location of C header files for client applications.<br><br><b>--pkgincludedir</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the location of package-specific C header files, for use by other packages.<br><br><b>--includedir-server</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the location of C header files for server programming (e.g., writing extensions).<br><br><b>--libdir</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the location of object code libraries.<br><br><b>--pkglibdir</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the location of package-specific object code libraries, for use by other packages.<br><br><b>--localedir</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the location of locale data.<br><br><b>--mandir</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the location of manual pages.<br><br><b>--sharedir</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the location of architecture-independent support files.<br><br><b>--sysconfdir</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the location of system configuration files.<br><br><b>--pgxs</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the location of the pgxs extension makefile infrastructure.<br><br><b>--configure</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the options that were given to the <i>configure</i> script when PostgreSQL was built.<br><br><b>--cc</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the C compiler used to build PostgreSQL.<br><br><b>--cppflags</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the preprocessor flags used to build PostgreSQL.<br><br><b>--cflags</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the C compiler flags used to build PostgreSQL.<br><br><b>--cflags_sl</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the C compiler flags used to build PostgreSQL shared libraries.<br><br><b>--ldflags</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the linker flags used to build PostgreSQL.<br><br><b>--ldflags_ex</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the linker flags used to build PostgreSQL executables.<br><br><b>--ldflags_sl</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the linker flags used to build PostgreSQL shared libraries.<br><br><b>--libs</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the libraries that client applications should link against.<br><br><b>--version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the PostgreSQL version string.<br><br><b>--help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show a help message and exit.<br><br>


title: DESCRIPTION
content:
The <b>pg_config</b> command-line utility provides essential information about the installed PostgreSQL version. It is an invaluable tool for developers and administrators needing to programmatically discover PostgreSQL's installation layout, compiler flags, and library paths. When invoked without any options, it outputs a comprehensive list of all available configuration parameters, including directories for executables, documentation, header files, and libraries, as well as the <i>configure</i> options used during its build.<br><br>Specifically, <b>pg_config</b> reports on paths like <i>bindir</i> (executables), <i>libdir</i> (libraries), and <i>includedir</i> (header files), which are crucial for compiling client applications or server extensions. It also reveals important build-time details such as the C compiler (<i>cc</i>), preprocessor flags (<i>cppflags</i>), and linker flags (<i>ldflags</i>). By standardizing access to this information, <b>pg_config</b> significantly simplifies the process of integrating third-party software with PostgreSQL, ensuring compatibility and reducing manual configuration errors across different environments.


title: CAVEATS
content:
While <b>pg_config</b> provides details about the installed PostgreSQL version, it's crucial to ensure that the executable being run corresponds to the desired PostgreSQL installation, especially in environments with multiple PostgreSQL versions. The command reports on the configuration as determined at build time and how it was installed, not necessarily the runtime configuration of a specific database cluster. Always check your <code>PATH</code> or specify the full path to <b>pg_config</b> if you have multiple installations.


title: COMMON USAGE EXAMPLES
content:
Here are a few practical examples demonstrating how to use <b>pg_config</b>:<br><br><I>1. Get the path to PostgreSQL client executables:</I><br><code><b>pg_config --bindir</b></code><br><br><I>2. Find the compiler flags needed for client applications:</I><br><code><b>pg_config --cflags</b></code><br><br><I>3. Display all available configuration parameters:</I><br><code><b>pg_config</b></code><br>This command, executed without any options, provides a comprehensive overview of all reported paths, compiler flags, and build information, making it an excellent starting point for understanding your PostgreSQL installation.


title: HISTORY
content:
The <b>pg_config</b> utility has been a fundamental component of PostgreSQL for many years, designed to provide a standardized, programmatic interface for querying PostgreSQL's build and installation parameters. Its introduction and continuous evolution reflect PostgreSQL's commitment to supporting robust third-party application development and simplifying integration across diverse operating systems and build environments. It ensures that applications can dynamically adapt to the specific PostgreSQL setup they are interacting with, rather than relying on brittle, hard-coded paths.


title: SYNOPSIS
content:
pg_test_fsync [<b>-f</b> <i>DIRECTORY</i>] [<b>-s</b> <i>SIZE</i>] [<b>-n</b> <i>NUM_FILES</i>] [<b>-d</b>] [<b>-D</b>] [<b>-p</b>] [<b>-r</b>] [<b>-h</b>] [<b>-V</b>]


title: PARAMETERS
content:
<b><b>-f</b> <i>DIRECTORY</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the directory where temporary test files will be created. By default, it uses the current working directory. It's recommended to point this to the actual PostgreSQL data directory or volume.<br><br><b><b>-s</b> <i>SIZE</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the size of each temporary test file. Accepts units like <i>kB</i>, <i>MB</i>, <i>GB</i>. The default size is 1MB.<br><br><b><b>-n</b> <i>NUM_FILES</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Determines the number of temporary files to use for testing. The default is 1 file.<br><br><b><b>-d</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Uses the <i>O_DSYNC</i> flag when opening files. This flag ensures that writes are synchronized to the underlying storage device, ensuring data is physically written before the write call returns.<br><br><b><b>-D</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Uses the <i>O_DIRECT</i> flag when opening files. This flag bypasses the operating system's page cache for I/O operations, allowing for direct I/O to the disk (Linux-specific). Can reveal raw disk performance.<br><br><b><b>-p</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Inserts a short pause (sleep) between write operations to allow the operating system to flush data to disk. This can help reveal latency issues not visible during continuous writes.<br><br><b><b>-r</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reports raw timing results in milliseconds instead of normalized values, providing more granular performance data.<br><br><b><b>-h</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays help information about the command and its options, then exits.<br><br><b><b>-V</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays the version information of the <i>pg_test_fsync</i> utility, then exits.<br><br>


title: DESCRIPTION
content:
<i>pg_test_fsync</i> is a utility bundled with PostgreSQL designed to measure the performance of various <i>fsync</i> (file system synchronization) methods on a specified directory. Its primary purpose is to help database administrators identify the most efficient <i>fsync</i> technique for their underlying storage system, which is critical for PostgreSQL's data integrity and overall performance. The command creates temporary files, writes data to them, and then forces the operating system to flush this data to permanent storage using different `fsync`-related system calls, such as <i>fsync()</i>, <i>fdatasync()</i>, and <i>open()</i> with <i>O_SYNC</i> or <i>O_DSYNC</i> flags. By comparing the average time taken for each method, users can determine which option provides the best balance of data durability and speed for their environment. This information is crucial for optimizing the <i>fsync</i> parameter within the <i>postgresql.conf</i> configuration file.


title: CAVEATS
content:
The results from <i>pg_test_fsync</i> are highly dependent on the underlying hardware, filesystem type, and operating system configuration. <br>The <i>O_DIRECT</i> flag is Linux-specific and may not be available or function identically on other platforms. <br>Test results should always be interpreted carefully and ideally run on the actual database volume under conditions representative of the database's expected load. <br>Running this command on a system with heavy I/O activity might yield skewed or inconsistent results due to contention.


title: INTERPRETING RESULTS
content:
The output of <i>pg_test_fsync</i> typically shows the average write time (in microseconds or milliseconds) for various <i>fsync</i> methods like <i>fdatasync</i>, <i>fsync</i>, <i>open_datasync</i>, and <i>open_sync</i>. Lower values indicate better performance for that specific synchronization method. The goal is to identify the method with the lowest reliable time, which can then guide the configuration of the <b>fsync</b> parameter in <i>postgresql.conf</i> to optimize PostgreSQL's write performance while maintaining data integrity.


title: TYPICAL USAGE
content:
It is crucial to run <i>pg_test_fsync</i> in the actual directory that PostgreSQL will use for its data files, or on a directory residing on the same physical filesystem. This ensures that the test results accurately reflect the I/O characteristics that the database will experience. For example: <br><i>pg_test_fsync -f /var/lib/pgsql/data -s 100MB</i>


title: PARAMETERS
content:
<b><b>dir</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays the path to pip's cache directory.<br><br><b><b>info</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Shows a summary of the cache usage, including its total size and the number of entries.<br><br><b><b>list</b> [<<i>options</i>>]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists the packages currently stored in the cache. Can be filtered or formatted using options.<br><i>Options:</i><br><i>--format <format_type></i>: Specifies the output format (e.g., 'json', 'text').<br><br><b><b>purge</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Clears the entire pip cache, removing all stored packages and freeing up disk space.<br><br><b><b>remove</b> <<i>package_name</i>> [<<i>package_name</i>> ...]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Removes specific packages from the cache. Multiple package names can be provided to remove several at once.<br><br>


title: DESCRIPTION
content:
<b>pip cache</b> is a powerful subcommand of the <i>pip</i> package installer that allows users to manage its local cache of downloaded packages. This cache stores source distributions and wheel files for packages, significantly speeding up subsequent installations of the same packages or dependencies, especially in environments with limited internet access or for offline development.<br><br>It helps conserve bandwidth and reduces build times by avoiding repeated downloads. The <b>pip cache</b> command provides various subcommands to inspect, list, clear, or remove specific items from this cache, making package management more efficient.


title: CAVEATS
content:
The cache can grow quite large over time, consuming significant disk space. Regular use of <b>pip cache purge</b> or <b>pip cache remove</b> might be necessary to manage its size.<br>Note that the cache stores downloaded distributions, not installed ones. Removing a package from the cache does not uninstall it from your Python environment.<br>Using the global option <b>--no-cache-dir</b> with <i>pip install</i> will bypass the cache entirely for that specific installation command.


title: CACHE LOCATION
content:
The default cache directory for <i>pip</i> is typically <i>~/.cache/pip</i> on Linux and macOS, and <i>%LocalAppData%\pip\Cache</i> on Windows. This location can be overridden using the <b>PIP_CACHE_DIR</b> environment variable or the <b>--cache-dir</b> global option with any <i>pip</i> command.


title: CACHE STRATEGY
content:
When <i>pip</i> needs to install a package, it first checks if the required distribution (wheel or source archive) is already present in its cache. If found, it uses the cached version, avoiding a re-download. If not, it downloads the distribution and then caches it before proceeding with the installation. This intelligent caching mechanism significantly optimizes the installation workflow, especially for frequently used packages or when working offline.


title: HISTORY
content:
The <b>pip cache</b> subcommand was introduced in <i>pip</i> version 10.0, which was released in May 2018. Prior to its introduction, managing pip's cache typically involved manually locating and deleting files from the cache directory (e.g., <i>~/.cache/pip</i> on Linux/macOS). The <b>pip cache</b> command formalized and streamlined this management process, providing a consistent and user-friendly interface for cache interaction.


title: PARAMETERS
content:
<b>clear</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Clears specified entries or the entire Poetry cache. Use with the <i>--all</i> option and a <i>&lt;cache-type&gt;</i> pattern.<br><br><b>list</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists the types and entries currently stored in Poetry's cache.<br><br><b><i>--all</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>(Used with <b>clear</b> subcommand)</i> Clears all entries for the specified cache type pattern.<br><br><b><i>&lt;cache-type&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>(Argument for <b>clear</b> subcommand)</i> A pattern or specific type of cache to clear (e.g., `pypi`, `wheels`, `src`).<br><br>


title: DESCRIPTION
content:
The <b>poetry cache</b> command is a crucial utility within the Poetry ecosystem, designed to manage Poetry's internal cache of downloaded packages and other artifacts. This cache is essential for efficient dependency resolution and installation, as it stores distributions (like <i>wheels</i> and <i>source distributions</i>) from PyPI and other configured repositories, along with metadata related to virtual environments. By caching these assets, Poetry can significantly reduce network traffic and installation times on subsequent runs. <br><br>Users leverage `poetry cache` for several key purposes: to free up disk space by clearing old or unused cache entries, to resolve potential issues caused by corrupted or outdated cached files, or to force fresh downloads of dependencies. It provides subcommands like <b>clear</b> to remove specific cache types or entries, and <b>list</b> to inspect the current contents and types of the cache. Understanding and utilizing `poetry cache` helps maintain a clean, performant, and reliable development environment, especially when working with numerous projects or frequently updating dependencies. It prevents redundant downloads and ensures that Poetry operates with the most relevant and uncorrupted data available.


title: CAVEATS
content:
Clearing the cache can sometimes lead to longer installation times as packages need to be re-downloaded from remote repositories. Exercise caution when using `poetry cache clear --all &lt;cache-type&gt;` as it permanently removes all matching entries. The specific cache types (e.g., `pypi`, `wheels`, `src`) that are recognized by Poetry may evolve with different versions of the tool. Importantly, `poetry cache` is a subcommand of `poetry` and is not a standalone system utility; it requires Poetry to be installed and accessible in your environment.


title: CACHE LOCATION
content:
Poetry's cache directories are typically located within the user's home directory, under operating system-specific paths (e.g., `~/.cache/pypoetry` on Linux, `~/Library/Caches/pypoetry` on macOS, or `%LOCALAPPDATA%/pypoetry/Cache` on Windows). The exact location can be influenced or overridden by the `POETRY_CACHE_DIR` environment variable. These directories store downloaded package distributions and other transient data.


title: COMMON CACHE TYPES
content:
While the `<b>clear</b>` subcommand often refers to `pypi` (for packages downloaded from PyPI) and `wheels` (for compiled wheel distributions), other types like `src` (for source distributions) might also be managed. The `<b>list</b>` subcommand is the best way to discover the currently recognized cache types and their contents within your Poetry environment.


title: HISTORY
content:
The `poetry cache` subcommand was introduced as Poetry matured, providing users with essential control over the tool's internal caching mechanisms. Its development was driven by the need to address common issues such as managing disk space, resolving corrupted package installations, and ensuring efficient dependency workflows. This functionality has been a stable and integral part of Poetry's CLI for several major versions, reflecting the importance of cache management in modern dependency tools.


title: PARAMETERS
content:
<b><B>-E, --extras</B> <I>&lt;EXTRAS&gt;</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Install extra feature dependencies defined in <B>pyproject.toml</B>. This option can be specified multiple times.<br><br><b><B>--all-extras</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Install all extra feature dependencies defined in <B>pyproject.toml</B>.<br><br><b><B>--only</B> <I>&lt;GROUP&gt;</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Install only dependencies from the specified group(s). This option can be specified multiple times to include multiple groups.<br><br><b><B>--without</B> <I>&lt;GROUP&gt;</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not install dependencies from the specified group(s). This option can be specified multiple times to exclude multiple groups.<br><br><b><B>--with</B> <I>&lt;GROUP&gt;</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Install dependencies from the specified group(s). This option can be specified multiple times to include multiple groups. Useful for optional groups not installed by default.<br><br><b><B>--sync-with-source</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Synchronize the dependencies with the defined sources in <B>pyproject.toml</B> and the lock file.<br><br><b><B>--dry-run</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Output the operations that would be performed, but do not execute them. Useful for previewing changes without altering the environment.<br><br><b><B>--no-dev</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not install development dependencies. Only main dependencies and optionally specified groups will be installed.<br><br><b><B>--no-root</B></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not install the root package (the project itself) into the virtual environment.<br><br>


title: DESCRIPTION
content:
<I>poetry-sync</I> is a subcommand of the <I>Poetry</I> dependency management tool for Python. Its primary function is to synchronize the installed dependencies in a project's virtual environment with the exact versions specified in the <B>poetry.lock</B> file. This command ensures that the project's dependencies are precisely what the lock file dictates, making development environments reproducible and consistent across different machines or deployments.<br><br>Unlike <B>poetry install</B>, which might create or update the <B>poetry.lock</B> file if it's missing or outdated, <I>poetry-sync</I> strictly adheres to the existing lock file, installing only the packages listed there and actively removing any packages from the environment that are not present in the lock file. This 'pruning' behavior is crucial for maintaining a clean and accurate dependency environment. It's particularly useful in CI/CD pipelines to guarantee that the build environment precisely matches the committed lock file, preventing potential issues caused by mismatched or additional dependencies.


title: CAVEATS
content:
<ul><li>Requires the <B>Poetry</B> dependency manager to be installed and available in the system's PATH.</li><li>A valid <B>pyproject.toml</B> file must exist in the project root.</li><li>A <B>poetry.lock</B> file must exist. <I>poetry-sync</I> will not create or update this file; it strictly reads from it. If the lock file is missing or outdated, consider using <B>poetry install</B> or <B>poetry update</B> first.</li><li>Only manages dependencies for Python projects specifically configured with Poetry.</li></ul>


title: DIFFERENCE FROM <B>POETRY INSTALL</B>
content:
While both commands install dependencies, <I>poetry-sync</I> never creates or updates the <B>poetry.lock</B> file. Its core distinction is its 'pruning' behavior: it will actively uninstall any package from the virtual environment that is not explicitly listed in <B>poetry.lock</B>. <B>poetry install</B>, by default, will not remove unmanaged packages, although it can achieve similar behavior if passed the <B>--sync</B> option. <I>poetry-sync</I> is designed for strict environment enforcement and purity.


title: IDEAL USE CASES
content:
<I>poetry-sync</I> is perfect for continuous integration (CI) environments to ensure that builds are always performed with the exact dependencies defined in the committed <B>poetry.lock</B> file. It's also invaluable for development teams to ensure all developers are working with identical dependency sets, preventing 'works on my machine' issues. It guarantees a clean, consistent, and reproducible state for the project's dependencies, making it a cornerstone for reliable software development workflows.


title: HISTORY
content:
The <B>Poetry</B> project was initiated around 2017 to offer a more robust and integrated solution for Python dependency management and packaging. Initially, <B>poetry install</B> served as the primary command for installing dependencies from the <B>poetry.lock</B> file. The <I>poetry-sync</I> command was introduced in later versions (specifically around Poetry 1.2 or 1.3) to provide a dedicated, explicit mechanism for strictly synchronizing the environment with the lock file. This separation of concerns made it clearer that <I>poetry-sync</I>'s role is to ensure environmental fidelity by installing exact versions and removing extraneous packages, without altering the lock file, thus reinforcing reproducible builds and clean environments.


title: SYNOPSIS
content:
<b>pw-container</b> [<i>OPTIONS</i>] [<i>COMMAND</i> [<i>ARGUMENTS...</i>]]<br><br>The <i>COMMAND</i> and its <i>ARGUMENTS</i> are typically the <i>PipeWire</i> daemon itself or a specific <i>PipeWire</i> module/tool to be run within the isolated environment.


title: PARAMETERS
content:
<b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Display help options and exit.</i><br><br><b>--version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Show program version information and exit.</i><br><br><b>--debug[=LEVEL]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Enable debug messages, optionally specifying a debug level.</i><br><br><b>--verbose[=LEVEL]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Enable verbose messages, optionally specifying a verbose level.</i><br><br><b>-p, --pipewire-binary=FILE</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specify the path to the PipeWire binary.</i><br><br><b>-r, --runtime-dir=DIR</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Set the runtime directory for the container.</i><br><br><b>-c, --config-dir=DIR</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Set the configuration directory for the container.</i><br><br><b>-l, --library-dir=DIR</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Set the library directory for the container.</i><br><br><b>-C, --container-config=FILE</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Provide a path to a specific container configuration file.</i><br><br><b>-m, --module-dir=DIR</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Set the module directory for the container.</i><br><br><b>-S, --socket=PATH</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specify the socket path for the container to use.</i><br><br><b>-u, --user=USER</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Run the container process as the specified user.</i><br><br><b>-g, --group=GROUP</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Run the container process as the specified group.</i><br><br><b>-e, --env=VAR=VALUE</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Set an environment variable for the container process.</i><br><br><b>--</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Separator; all subsequent arguments are passed directly to COMMAND.</i><br><br>


title: DESCRIPTION
content:
<i>pw-container</i> is a utility within the <i>PipeWire</i> framework designed to run <i>PipeWire</i> modules or services in an isolated environment, often referred to as a container. This isolation is crucial for enhancing system stability and security by preventing a misbehaving module from affecting the entire <i>PipeWire</i> instance or other system components. It effectively creates a sandbox for specific audio or video processing tasks. <br><br>The command achieves this by setting up dedicated directories for runtime, configuration, and libraries, and by potentially running the contained process under a different user or group. This allows for a more robust and secure management of various <i>PipeWire</i> components, especially when dealing with third-party or experimental modules. It's particularly useful for debugging, testing new configurations, or deploying sensitive components without impacting the main <i>PipeWire</i> daemon.


title: CAVEATS
content:
<i>pw-container</i> provides process isolation and restricted file system access but is <b>not a full system virtualization or containerization solution</b> like Docker or Podman. It relies on <i>PipeWire</i>'s internal sandboxing mechanisms and system capabilities (like user/group separation and directory isolation) to achieve its goals. <br><br>Configuration for the contained environment, especially paths for libraries and modules, must be carefully managed to ensure the container can function correctly while remaining isolated. Debugging issues within a container can sometimes be more complex due to the restricted environment.


title: USAGE IN SYSTEMD SERVICES
content:
<i>pw-container</i> is frequently used in <i>systemd</i> unit files to run specific <i>PipeWire</i> services or modules as dedicated system services. This allows for fine-grained control over their lifecycle, resource allocation, and security contexts, independent of the main <i>PipeWire</i> daemon. For example, a <i>Bluetooth audio service</i> or a <i>media session manager</i> might be run within its own <i>pw-container</i> instance to enhance stability and security.


title: HISTORY
content:
The <i>pw-container</i> utility emerged as part of the broader <i>PipeWire</i> project, which was initiated to provide a unified framework for handling audio, video, and hardware streams on Linux. As <i>PipeWire</i> gained adoption as a replacement for PulseAudio and JACK, the need for robust sandboxing and isolation of modules became apparent. <br><br>It addresses concerns related to security, stability, and compatibility, allowing diverse audio/video components to coexist and operate without interfering with each other or the main system. Its development reflects <i>PipeWire</i>'s commitment to building a modern, secure, and flexible multimedia framework for Linux.


title: PARAMETERS
content:
<b>--build</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Initiates the build process to generate the web application.<br><br><b>--target <path></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the output directory where the built web app files will be saved.<br><br><b>--bind <address></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the IP address for the local development server (e.g., 0.0.0.0 for all interfaces).<br><br><b>--port <number></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Defines the port number for the local development server.<br><br><b>--debug</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables verbose debug output and potentially debug-specific features during build/run.<br><br><b>--template <path></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Allows using a custom HTML template file for the web application.<br><br><b>--title <string></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the title for the generated HTML page and PWA.<br><br><b>--icon <path></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the path to an icon file to be used for the PWA and browser favicon.<br><br><b>--add <path></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Includes additional files or directories into the web application package.<br><br><b>--install <package></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Installs additional Python packages (e.g., from PyPI) into the WASM environment during build.<br><br><b>--upgrade</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Attempts to upgrade the <b>pygbag</b> package itself before performing the build.<br><br><b>--fast</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Activates optimizations to speed up the build process, potentially skipping some checks.<br><br><b>--pwa</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Explicitly enables Progressive Web App features (often enabled by default).<br><br><b>--verbose</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Provides more detailed output during the command execution.<br><br><b>--version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays the current version of <b>pygbag</b>.<br><br>


title: DESCRIPTION
content:
<b>pygbag</b> is a powerful Python package and command-line tool designed to simplify the deployment of Python applications, particularly those utilizing the Pygame library, onto the web. It acts as a comprehensive toolchain, taking your Python source code and its dependencies, compiling them into WebAssembly (WASM), and packaging them alongside HTML, CSS, and JavaScript into a distributable web application. The primary goal of <b>pygbag</b> is to enable Pygame games and other Python GUI applications to run directly within a standard web browser, eliminating the need for users to have a local Python installation. <br><br>It handles the complexities associated with Emscripten compilation and JavaScript integration, abstracting these technical details from the developer. The output is a self-contained web application, frequently configured as a Progressive Web App (PWA), which can be served from any web server or even run offline, offering a native-like experience. This significantly broadens the accessibility and reach of Python projects by making them available to anyone with a modern web browser.


title: CAVEATS
content:
Certain Python features requiring direct native system access, specific C extensions, or advanced file system operations outside <b>pygbag</b>'s virtual environment might not function as expected or require specialized porting. Performance for graphically intensive applications may differ from native desktop builds. Debugging applications deployed to the web via WASM can be more intricate than traditional Python debugging. Browser security policies (e.g., CORS, sandboxing) can impose limitations on functionality.


title: PROGRESSIVE WEB APP (PWA) CAPABILITIES
content:
Projects built with <b>pygbag</b> often result in Progressive Web Apps. These PWAs can be 'installed' on user devices, appearing and behaving more like native applications. They leverage browser technologies like service workers to cache assets, enabling the application to run even when offline, providing a robust and reliable user experience without a constant internet connection.


title: CROSS-PLATFORM WEB DEPLOYMENT
content:
The fundamental advantage of <b>pygbag</b> is its ability to facilitate true cross-platform deployment. A Python application compiled with <b>pygbag</b> can run on any device (desktop, mobile, tablet) that supports a modern web browser, dramatically increasing the potential audience and accessibility of Python-based projects without requiring platform-specific builds.


title: HISTORY
content:
<b>pygbag</b> was developed by pmp-p to address a growing need for a streamlined method to deploy Pygame projects directly to the web. Before its advent, achieving this often involved complex manual setups with Emscripten and Pyodide, which presented a steep learning curve. Since its initial release, <b>pygbag</b> has steadily gained popularity as a more accessible and user-friendly alternative. Its development continues with a focus on enhancing compatibility with a broader range of Python modules, improving build times, and optimizing the performance of WebAssembly output.


title: SYNOPSIS
content:
<b>semanage login</b> <i>-a | --add</i> <b>-s</b> <i>SELINUX_USER</i> <i>LOGIN</i><br><b>semanage login</b> <i>-d | --delete</i> <i>LOGIN</i><br><b>semanage login</b> <i>-m | --modify</i> <b>-r</b> <i>REMAP_TO_SELINUX_USER</i> <i>LOGIN</i><br><b>semanage login</b> <i>-l | --list</i> <i>[LOGIN]</i><br>Common options: <i>[-P | --permanent]</i>


title: PARAMETERS
content:
<b>login</b><br>&nbsp;&nbsp;&nbsp;&nbsp;This subcommand of <b>semanage</b> is used to manage SELinux login mappings.<br><br><b>-a, --add</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adds a new mapping between a Linux login and an SELinux user.<br><br><b>-d, --delete</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Deletes an existing mapping for a specified Linux login.<br><br><b>-m, --modify</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Modifies an existing mapping for a specified Linux login, reassigning it to a different SELinux user.<br><br><b>-l, --list</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists all configured login mappings or the mapping for a specific <i>LOGIN</i>.<br><br><b>-s SELINUX_USER, --seuser=SELINUX_USER</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the SELinux user (e.g., <i>user_u</i>, <i>staff_u</i>) to map to when adding a new entry with <i>-a</i>.<br><br><b>-r REMAP_TO_SELINUX_USER, --remap-to-seuser=REMAP_TO_SELINUX_USER</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the new SELinux user to remap to when modifying an entry with <i>-m</i>.<br><br><b>LOGIN</b><br>&nbsp;&nbsp;&nbsp;&nbsp;The Linux login name (e.g., <i>john_doe</i>) or special pattern (e.g., <i>__default__</i>) for which the mapping is managed.<br><br><b>-P, --permanent</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Makes the changes persistent by writing them to the policy store. Without this, changes might be temporary or lost on reboot.<br><br>


title: DESCRIPTION
content:
The <b>semanage-login</b> command is a specialized component of the <b>semanage</b> utility used to manage the mapping between Linux user accounts and SELinux user identities. When a user logs into a Linux system, their Linux user ID is resolved and mapped to a specific SELinux user. This mapping is fundamental for determining the SELinux context under which the user's processes will run and, consequently, the resources they can access. <br><br>This command allows system administrators to add, delete, modify, or list these critical mappings. For instance, an administrator might map a regular Linux user to an SELinux user like <i>user_u</i>, while a privileged user might be mapped to <i>staff_u</i> or <i>sysadm_u</i>. These mappings are stored in the SELinux policy store and are crucial for enforcing the principle of least privilege in interactive user sessions. Changes made with <b>semanage-login</b> are applied to the active policy and can be made persistent across reboots.


title: CAVEATS
content:
When managing login mappings, the special <i>__default__</i> <i>LOGIN</i> entry is used for any Linux user that does not have an explicit mapping. It's crucial to correctly configure this default mapping. <br><br>Changes made with <b>semanage-login</b> typically require root privileges. These changes only affect future login sessions; active sessions are not immediately impacted. The SELinux users referenced in mappings must be defined using <b>semanage-user</b> before they can be assigned here.


title: THE __DEFAULT__ LOGIN
content:
The <i>__default__</i> login is a special entry that defines the SELinux user mapping for any Linux user account that does not have an explicit mapping defined. It's vital to ensure this default is set appropriately to avoid unexpected SELinux contexts for unmapped users. Typically, it maps to <i>user_u</i>.


title: INTERACTION WITH GETSEUSERBYNAME()
content:
The system library function <i>getseuserbyname()</i> is used by login programs to determine the SELinux user ID for a given Linux user ID, based on the mappings configured by <b>semanage-login</b>. This function is how the SELinux policy effectively assigns a context to a new user session.


title: HISTORY
content:
The <b>semanage-login</b> command is part of the <i>policycoreutils</i> package, which provides utilities for managing SELinux policy. It was developed as part of the broader effort to simplify SELinux administration, moving away from direct policy file manipulation to more user-friendly, high-level commands. Its usage evolved to provide a structured and robust way to manage user-to-SELinux mappings, a critical aspect of multi-user SELinux environments.


title: PARAMETERS
content:
<b>--allow, -A</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Search for <b>allow</b> rules in the policy.<br><br><b>--auditallow, -a</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Search for <b>auditallow</b> rules in the policy.<br><br><b>--dontaudit, -D</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Search for <b>dontaudit</b> rules in the policy.<br><br><b>--source <type>, -s <type></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the source <i>type</i> for the search criteria.<br><br><b>--target <type>, -t <type></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the target <i>type</i> for the search criteria.<br><br><b>--class <class>, -C <class></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the object <i>class</i> (e.g., file, process, socket) for the search criteria.<br><br><b>--perm <perm>, -P <perm></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the <i>permission</i> to search for (e.g., read, write, execute).<br><br><b>--type <type>, -c <type></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Search for statements involving a specific <i>type</i> or define a specific <i>type</i>.<br><br><b>--role <role>, -R <role></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Search for statements involving a specific <i>role</i>.<br><br><b>--verbose, -v</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display verbose output, often showing additional details for rules.<br><br><b>--linenum, -N</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show line numbers from the policy source file for found rules.<br><br><b>--policy <file>, -p <file></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use a specified policy file instead of the currently loaded or default policy.<br><br><b>--expression <expr>, -e <expr></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use a complex expression for searching (e.g., 'type foo and class file and perm read').<br><br><b>--help, -h</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display a help message and exit.<br><br>


title: DESCRIPTION
content:
The <b>sesearch</b> command is a crucial utility for administrators working with SELinux (Security-Enhanced Linux). It allows users to query and analyze the loaded SELinux policy to find specific rules, types, or other policy components. This is invaluable for debugging SELinux access denials, understanding existing security contexts, or verifying policy configurations. Users can search for various types of rules, such as <i>allow</i>, <i>auditallow</i>, or <i>dontaudit</i>, and specify criteria like source types, target types, object classes, and permissions. Its flexible search capabilities make it an essential tool for effective SELinux policy management and troubleshooting.


title: CAVEATS
content:
Using <b>sesearch</b> effectively requires a basic understanding of SELinux policy syntax and concepts (types, classes, permissions).<br>The output can be very extensive for broad search queries, requiring careful filtering.<br>It queries the currently loaded or specified policy, which may differ from policy source files if they haven't been compiled and loaded.


title: DEBUGGING ACCESS DENIALS
content:
<b>sesearch</b> is frequently used in conjunction with SELinux audit logs (e.g., from <i>/var/log/audit/audit.log</i>) to understand why an <i>AVC</i> (Access Vector Cache) denial occurred. By extracting the source type, target type, class, and permissions from an audit message, administrators can use <b>sesearch</b> to find the relevant policy rules or identify missing ones.


title: UNDERSTANDING POLICY STRUCTURE
content:
Beyond debugging, <b>sesearch</b> is a valuable tool for exploring and understanding the structure of a SELinux policy. It can help identify all rules related to a specific type, role, or resource, providing insights into how different components of the system are secured.


title: HISTORY
content:
<b>sesearch</b> is part of the <i>policycoreutils</i> package, which houses many essential SELinux utilities. Its origins trace back to the <i>SETools</i> project, developed by Tresys Technology, and later maintained by the SELinux community. It has evolved significantly to provide powerful and flexible querying capabilities for debugging and understanding complex SELinux policies, becoming a standard tool for SELinux administrators and developers over the years.


title: SYNOPSIS
content:
<b>setfiles</b> [<i>OPTIONS</i>] <i>PATHNAME</i> ...<br><b>setfiles</b> -B [<i>OPTIONS</i>] <i>PATHNAME</i> ...<br><b>setfiles</b> -C<br><b>setfiles</b> -V


title: PARAMETERS
content:
<b>-c <i>policy</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify an alternate SELinux policy file to use instead of the system default.<br><br><b>-d</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Dump the contents of the <i>file_contexts</i> database to standard output.<br><br><b>-e <i>exclude_pattern</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Exclude files or directories matching the specified regular expression pattern from processing.<br><br><b>-f <i>input_file</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Read a list of pathnames to process from the specified <i>input_file</i>, one path per line.<br><br><b>-F</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Force a complete relabel, resetting the contexts of all files even if they appear to be correct.<br><br><b>-h</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Handle symbolic links; if a link points to a directory, restore the context of the directory it points to.<br><br><b>-i</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Ignore files that do not exist, preventing errors for missing paths specified in input.<br><br><b>-l <i>login</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use the specified SELinux <i>login</i> context for labelling files.<br><br><b>-n</b><br>&nbsp;&nbsp;&nbsp;&nbsp;No action; perform a dry run. Display what would be done without actually changing any file contexts.<br><br><b>-o <i>output_file</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Save the compiled contents of the <i>file_contexts</i> database to the specified <i>output_file</i>.<br><br><b>-P</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not use mmap for reading the <i>file_contexts</i> file, using standard file I/O instead.<br><br><b>-q</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppress error messages during operation.<br><br><b>-r <i>root_dir</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify an alternate <i>root_dir</i> for the filesystem being relabelled, useful for chroot environments.<br><br><b>-R</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Recursively process directories. This is the default behavior when processing directories.<br><br><b>-s</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppress warning messages during operation.<br><br><b>-S</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Do not follow symbolic links. This is the default behavior.<br><br><b>-v</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable verbose output, showing details of files being processed and their context changes.<br><br><b>-W</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display warnings, even if suppressed by -s.<br><br><b>-x</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disable the use of xattr to store parent directory contexts, which can speed up the process.<br><br><b>-0</b><br>&nbsp;&nbsp;&nbsp;&nbsp;When reading input from a file with -f, interpret NUL characters as path delimiters instead of newlines.<br><br><b>-B</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Used with <i>PATHNAME</i>, checks the binary <i>file_contexts</i> for errors without relabeling.<br><br><b>-C</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Compile the text <i>file_contexts</i> and <i>file_contexts.local</i> into a binary <i>file_contexts.bin</i>.<br><br><b>-V</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display the version information of the <b>setfiles</b> utility.<br><br>


title: DESCRIPTION
content:
The <b>setfiles</b> command is a crucial utility in the SELinux framework, designed to restore the default SELinux security contexts of files and directories on a filesystem. It accomplishes this by comparing the current contexts of files with the rules defined in the system's SELinux policy's <i>file_contexts</i> configuration. When a discrepancy is found, <b>setfiles</b> will correct the file's security label to match the policy.<br><br>This command is frequently used in various scenarios:<br><ul><li>After installing new software or moving files, which might result in incorrect or unlabelled contexts.</li><li>Following an SELinux policy update, where existing file contexts might no longer align with the new rules.</li><li>During system initialisation or a full relabel, especially when switching SELinux modes or after a major system upgrade.</li></ul><br>While similar to <b>restorecon</b>, <b>setfiles</b> is generally a lower-level utility that offers more control, allowing for specific policy files or different root directories. It's an indispensable tool for maintaining the integrity and security of an SELinux-enabled system.


title: CAVEATS
content:
<ul><li><b>Root Privileges</b>: <b>setfiles</b> typically requires root privileges to modify file contexts on the filesystem.</li><li><b>Time Consuming</b>: On large filesystems, a full relabel (especially with <b>-F</b>) can take a significant amount of time and system resources.</li><li><b>Policy Dependency</b>: The correct functioning of <b>setfiles</b> is entirely dependent on having an up-to-date and accurate SELinux policy, specifically the <i>file_contexts</i> definitions.</li><li><b>Risk of Misconfiguration</b>: Incorrect usage or an erroneous policy can lead to files having the wrong contexts, potentially breaking applications or system functionality. Always perform a dry run (<b>-n</b>) before making widespread changes.</li></ul>


title: CONTEXT MATCHING LOGIC
content:
<b>setfiles</b> determines the correct security context for a file by matching its absolute path against regular expressions defined in the <i>file_contexts</i> configuration file (or its compiled binary form). These rules specify the default user, role, type, and sensitivity level for different files and directories across the filesystem. The most specific matching rule takes precedence, ensuring that even intricate context requirements can be met.


title: PERFORMANCE CONSIDERATIONS
content:
When performing a system-wide relabel, <b>setfiles</b> traverses the entire filesystem, accessing metadata for each file and directory. This intensive I/O operation can significantly impact system performance. Using options like <b>-x</b> (to disable xattr lookups for parent contexts) can sometimes offer minor performance improvements, but careful planning and execution during off-peak hours are recommended for large-scale operations.


title: HISTORY
content:
SELinux was initially developed by the National Security Agency (NSA) and released to the open-source community in 2000, eventually being integrated into the Linux kernel in 2003. As a core component of the SELinux userspace utilities, <b>setfiles</b> has been an integral part of managing file security contexts since the early days of SELinux adoption. Its functionality has evolved alongside the SELinux policy language and kernel modules, becoming a robust tool for system administrators to maintain the mandatory access control integrity of their systems.


title: PARAMETERS
content:
<b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display a help message and exit.<br><br><b>-v, --verbose</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable verbose output for detailed execution information.<br><br><b>-d, --device <I>DEVICE</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the ACP device path, e.g., <I>/dev/snd/acp0</I>.<br><br><b>-s, --status</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Print the current status of the ACP device.<br><br><b>-e, --enable</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable the Audio Class Protection (e.g., HDCP).<br><br><b>-D, --disable</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disable the Audio Class Protection.<br><br><b>-r, --reset</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reset the ACP device to its default state.<br><br><b>-p, --print-registers</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Print the values of all ACP hardware registers.<br><br><b>-w, --write-register <I>OFFSET</I> <I>VALUE</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Write <I>VALUE</I> to the ACP register at <I>OFFSET</I>.<br><br>


title: DESCRIPTION
content:
<br><i><b>spa-acp-tool</b></i> is a utility designed for interacting with the Audio Class Protection (ACP) hardware interface, primarily found in systems utilizing Sound Open Firmware (SOF) for audio processing. Its main purpose is to debug, configure, and manage aspects related to digital audio content protection, such as High-bandwidth Digital Content Protection (HDCP) for HDMI audio outputs.<br><br>The tool allows users to query the current status of ACP, enable or disable its functionalities, reset the ACP state, and directly read from or write to ACP hardware registers. This granular control is essential for diagnosing issues with protected audio streams, particularly when dealing with HDMI audio output where HDCP compliance might be a factor. It is often used by developers and advanced users to troubleshoot audio path problems on platforms like Intel SoundWire-based systems, ensuring proper handling of protected audio content.


title: CAVEATS
content:
<br><ul><li><i><b>spa-acp-tool</b></i> requires appropriate kernel modules (e.g., <I>snd-sof-acp</I>) to be loaded and the ACP device (<I>/dev/snd/acpX</I>) to be available.</li><li>Improper use of this tool, especially writing to registers, can lead to system instability or audio malfunctions. It is primarily intended for debugging and advanced configuration.</li><li>Changes made with this tool might not persist across reboots unless configured via system services or udev rules.</li><li>Root privileges are often required to access and modify ACP device files.</li></ul>


title: CONTEXT
content:
This tool is primarily relevant in environments where <i><b>PipeWire</b></i> is used as the audio server, especially on platforms that rely on <i><b>Sound Open Firmware (SOF)</b></i> for their audio hardware abstraction. It's not a general-purpose audio tool but rather a specialized utility for a specific subset of audio device management related to content protection.


title: USAGE SCENARIOS
content:
<i><b>spa-acp-tool</b></i> is often used when troubleshooting issues with HDMI audio output, particularly when no sound is produced from protected content, or when investigating HDCP handshake failures. It allows a lower-level interaction than typical <i><b>PipeWire</b></i> or <i><b>ALSA</b></i> control utilities.


title: HISTORY
content:
The <i><b>spa-acp-tool</b></i> is part of the <i><b>PipeWire</b></i> project, a media server for Linux that aims to provide a low-latency, graph-based processing engine for audio and video streams. Its development is closely tied to the evolution of modern audio frameworks on Linux, particularly for systems leveraging <i><b>Sound Open Firmware (SOF)</b></i> for hardware acceleration and advanced audio features.<br><br>This tool was created to provide a direct interface for debugging and managing Audio Class Protection (ACP) functionalities, which are crucial for handling DRM-protected content over interfaces like HDMI. Its emergence reflects the increasing complexity of audio stacks and the need for specialized tools to ensure compatibility and proper functioning of protected media pathways.


title: PARAMETERS
content:
<b><i>SUBCOMMAND</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>(Optional) The name of a specific <b>systemctl</b> subcommand for which to display more detailed help. If omitted, general help for all subcommands is shown.</i><br><br>


title: DESCRIPTION
content:
The <b>systemctl help</b> command provides a concise summary of the usage of <b>systemctl</b> and its various subcommands. When invoked without any arguments, it lists all available <b>systemctl</b> subcommands along with a brief description for each. This serves as a quick reference for users to understand the basic functionality and syntax of the primary service management tool in systemd-based Linux distributions.<br><br>If a specific subcommand name is provided as an argument, <b>systemctl help</b> attempts to display more detailed information or a specific synopsis for that particular subcommand, aiding users in understanding its options and arguments. It's an essential first stop for exploring <b>systemctl</b>'s capabilities without resorting to manual pages for every query.


title: CAVEATS
content:
The help output from <b>systemctl help</b> is often a summary. For comprehensive details, including all options, environment variables, and advanced usage, it is always recommended to consult the full manual page for <b>systemctl</b> using <b>man systemctl</b> or for specific subcommands, if available (e.g., <b>man systemctl.unit</b> for unit file syntax). The exact output and level of detail can vary slightly between systemd versions.


title: <I>OUTPUT FORMAT</I>
content:
<i>When run without arguments, <b>systemctl help</b> typically lists subcommands alphabetically, each followed by a one-line description. When a specific <b>SUBCOMMAND</b> is given, it usually prints the synopsis for that command.</i>


title: <I>DISTINCTION FROM MAN PAGES</I>
content:
<i>While <b>man systemctl</b> provides the exhaustive documentation, <b>systemctl help</b> is designed for quick in-terminal assistance, focusing on common usage and subcommand discovery rather than deep dives into every flag and configuration option.</i>


title: HISTORY
content:
The <b>systemctl</b> command itself was introduced as part of the systemd init system, which gained widespread adoption in Linux distributions starting in the early 2010s (around 2011-2012). The <b>help</b> subcommand has been an integral part of <b>systemctl</b> from its early days, providing an accessible way for users to discover its extensive functionality. It reflects systemd's design philosophy of offering comprehensive control and introspection capabilities for system services and state.


title: PARAMETERS
content:
<b><i>UNIT...</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;One or more <b>systemd</b> unit names (e.g., <i>apache2.service</i>, <i>multi-user.target</i>) whose active state is to be checked.<br><br><b><b>--quiet</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppresses output to standard output, making the command rely solely on its exit code for status determination. Useful for scripting when no console output is desired.<br><br><b><b>--user</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Connects to the <b>systemd</b> user instance for the current user, rather than the system-wide manager. This allows checking units managed by the user's session.<br><br><b><b>--system</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Connects to the system-wide <b>systemd</b> manager instance. This is the default behavior when no specific manager is specified.<br><br><b><b>--host=<i>HOST</i></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Operates on a remote host identified by <i>HOST</i>. This option is typically used for managing <b>systemd</b> instances over SSH.<br><br><b><b>--machine=<i>CONTAINER</i></b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Operates on a local container identified by <i>CONTAINER</i>. This allows managing <b>systemd</b> instances within specified containers.<br><br>


title: DESCRIPTION
content:
The <b>systemctl is-active</b> command is a specialized subcommand of the <b>systemctl</b> utility, which serves as the primary interface for controlling the <b>systemd</b> system and service manager.<br><br>Its fundamental purpose is to ascertain the current <i>active state</i> of one or more specified <b>systemd</b> units. The active state indicates whether a unit is actively running, stopped (inactive), in a failed state, or transitioning between states. This command is particularly valuable for scripting and automation, allowing conditional logic to be executed based on a service's operational status.<br><br>Upon execution, <b>systemctl is-active</b> returns a specific exit code: <b>0</b> if all specified units are active, <b>1</b> if at least one unit is not active (e.g., inactive, failed, reloading), and <b>3</b> if a unit name is unknown or invalid. By default, it also prints the active state (e.g., <i>"active"</i>, <i>"inactive"</i>, <i>"failed"</i>) to standard output, unless the <b>--quiet</b> option is used. It supports various <b>systemd</b> unit types, including <i>.service</i>, <i>.socket</i>, <i>.timer</i>, <i>.mount</i>, and <i>.target</i>, providing a versatile tool for system administrators and developers.


title: CAVEATS
content:
The command's output (or lack thereof with <b>--quiet</b>) combined with its exit code is the primary indicator of a unit's active state. An <i>inactive</i> state does not necessarily imply a <i>failed</i> state; an <i>inactive</i> unit might simply be stopped normally. Permissions are crucial; checking system-level units often requires root privileges (e.g., using <b>sudo</b>) if performed by a non-root user.


title: EXIT CODES
content:
The exit code returned by <b>systemctl is-active</b> is paramount for scripting purposes:<br><ul><li><b>0</b>: All specified units are <i>active</i>.</li><li><b>1</b>: At least one of the specified units is <i>inactive</i>, <i>failed</i>, <i>reloading</i>, <i>activating</i>, or in another non-active state.</li><li><b>3</b>: One or more unit names provided were unknown, invalid, or could not be found by <b>systemd</b>.</li></ul>


title: UNIT TYPES
content:
<b>systemctl is-active</b> can check the status of various <b>systemd</b> unit types, not just services. Common types include:<br><ul><li><b>.service</b>: A system service (e.g., web server, database).</li><li><b>.socket</b>: An IPC socket for systemd-activated services.</li><li><b>.device</b>: A kernel device.</li><li><b>.mount</b>: A filesystem mount point.</li><li><b>.automount</b>: An automount point.</li><li><b>.swap</b>: A swap device or file.</li><li><b>.target</b>: A synchronization point or grouping of other units.</li><li><b>.path</b>: A file system path for path-activated services.</li><li><b>.timer</b>: A timer for timer-activated services.</li></ul>


title: HISTORY
content:
The <b>systemctl</b> command, including its <b>is-active</b> subcommand, was introduced as part of the <b>systemd</b> initialization system. <b>systemd</b> began development in 2010 and rapidly gained adoption across major Linux distributions, effectively replacing older init systems like <i>SysVinit</i> and <i>Upstart</i>. The <b>is-active</b> subcommand has been a fundamental component since its inception, providing a consistent and programmatic way to query service states, which is critical for the robust automation and monitoring capabilities offered by the <b>systemd</b> ecosystem.


title: PARAMETERS
content:
<b><b>--force</b>, <b>-f</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Forces an immediate action. When used with <b>poweroff</b>, it skips some shutdown steps and might not wait for all services to stop cleanly, but still attempts to unmount filesystems. Use with caution.<br><br><b><b>--no-block</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Does not wait for the power-off operation to complete. The command will return immediately, allowing the calling script or session to continue while the system shuts down in the background.<br><br><b><b>--dry-run</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Shows what would be done without actually executing the power-off operation. Useful for testing and understanding the shutdown sequence without affecting the system state.<br><br><b><b>--force --force</b>, <b>-ff</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Performs an emergency power-off. This is extremely forceful and skips almost all graceful shutdown procedures, including syncing disk caches and unmounting filesystems. It can lead to data loss and filesystem corruption. <i>Use with extreme caution and only as a last resort.</i><br><br>


title: DESCRIPTION
content:
<b>systemctl poweroff</b> is the modern, recommended command for shutting down and powering off a Linux system running <i>systemd</i>.<br><br>When executed, it signals the <i>systemd</i> init system (PID 1) to perform a graceful shutdown. This process involves several critical steps: first, it attempts to stop all active services and processes in an orderly manner. Next, it unmounts all mounted filesystems to ensure data integrity and prevent corruption. Finally, it syncs any pending disk writes to storage before instructing the underlying hardware to cut power.<br><br>This command ensures a clean system state before powering down, minimizing the risk of data loss or filesystem damage that can occur with abrupt power disconnections. It replaces older methods like direct invocation of the <b>poweroff</b> command (which often symlinks to <b>systemctl</b> or uses <b>shutdown -h</b>) or manually cutting power.<br><br>It requires appropriate user permissions, typically root, or via <i>PolicyKit</i> rules configured for non-root users.


title: CAVEATS
content:
Requires <i>root</i> privileges or specific <i>PolicyKit</i> permissions.<br><br>Forcibly powering off (especially with <b>-ff</b>) can lead to data loss, filesystem corruption, or an unstable system state upon next boot. <i>Always use with extreme caution.</i><br><br>Ensure all users are logged out and critical applications are closed to prevent loss of unsaved work.


title: GRACEFUL VS. FORCEFUL SHUTDOWN
content:
By default, <b>systemctl poweroff</b> performs a graceful shutdown, stopping services, unmounting filesystems, and syncing data. Using <b>--force</b> or especially <b>--force --force</b> bypasses these steps, potentially leading to data loss but offering an immediate, albeit risky, power-off.


title: LEGACY EQUIVALENTS
content:
On <i>systemd</i> systems, commands like <b>poweroff</b> (without arguments) and <b>shutdown -h now</b> typically act as wrappers or symbolic links to <b>systemctl poweroff</b>, providing backward compatibility while utilizing the modern <i>systemd</i> shutdown mechanism.


title: HISTORY
content:
Before the advent of <i>systemd</i>, system shutdown was typically handled by commands like <b>poweroff</b> or <b>shutdown -h</b>, often part of <i>SysVinit</i> or <i>Upstart</i> systems.<br><br>With <i>systemd</i> becoming the default init system for many Linux distributions, <b>systemctl</b> was introduced as the primary interface for controlling the system and its services. The <b>poweroff</b> subcommand within <b>systemctl</b> now provides a unified and standardized way to initiate a system shutdown, leveraging <i>systemd</i>'s robust service management and shutdown sequence capabilities. On modern systems, the standalone <b>poweroff</b> command is often a symbolic link or a wrapper script that simply executes <b>systemctl poweroff</b>.


title: PARAMETERS
content:
<b><b>-v</b>, <b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increases the verbosity of the output, showing more details about the tests being run.</i><br><br><b><b>-c</b> <<i>file</i>>, <b>--config</b> <<i>file</i>></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specifies an alternative configuration file to use for the tests.</i><br><br><b><b>--integration</b> <<i>name</i>></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Runs tests specifically for a named Zapier integration.</i><br><br><b><b>--api-key</b> <<i>key</i>></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Provides an API key for authentication during API-related tests.</i><br><br><b><b>--dry-run</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Performs a test run without making actual changes or sending real data.</i><br><br><b><b>[test_path|test_name]</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Optional argument to specify a particular test file, directory, or test name to execute.</i><br><br>


title: DESCRIPTION
content:
<i>zapier-test</i> is not a standard Linux command found in typical distributions. Its name strongly suggests it is a custom script, alias, or executable created to facilitate testing within an environment related to Zapier, the popular web automation platform. This command would likely be used by developers or system administrators working with Zapier integrations, custom Zapier applications, or local development environments that interact with Zapier's API. Its primary purpose would be to validate the functionality, connectivity, or configuration of Zapier-related components, ensuring they operate as expected before deployment or during development.<br><br>The actual implementation and behavior of <i>zapier-test</i> would depend entirely on its creator. It could invoke a Zapier CLI testing utility, run a suite of unit or integration tests written in a programming language like Node.js or Python, or simply perform checks against Zapier's API endpoints using tools like <i>curl</i>. Users encountering this command should look for accompanying documentation within their project or organization to understand its specific usage and options.


title: CAVEATS
content:
This command is <b>not a standard Linux utility</b>. Its existence, functionality, and options are entirely dependent on a specific environment, project, or custom setup. It is likely a local script or alias. Therefore, documentation for <i>zapier-test</i> should be sought within the context where it is encountered (e.g., project README, internal wiki, or Zapier CLI documentation if it's a wrapper for that). Expect its behavior to vary significantly between different systems.


title: <B>CONTEXT OF ZAPIER</B>
content:
<i>Zapier is a leading web-based service that enables end users to integrate a wide array of web applications. It allows the creation of automated workflows, known as 'Zaps,' which connect different apps and automate tasks without requiring any coding. This command, <i>zapier-test</i>, would typically be used in the context of developing, extending, or maintaining these integrations, particularly for custom applications or private integrations.</i>


title: <B>COMMON IMPLEMENTATIONS</B>
content:
<i>A custom <i>zapier-test</i> command might internally call the Zapier Platform CLI (a Node.js command-line interface for building Zapier integrations), or it could be a wrapper around a standard test runner (like Jest for JavaScript projects or Pytest for Python projects) configured specifically for Zapier-related components. It might also involve environment variable management or API key handling.</i>


title: HISTORY
content:
As a non-standard command, <i>zapier-test</i> does not have a public or documented history. Its development and usage would be confined to the specific organization or developer that created it. Its emergence is likely tied to the growing need for robust local development and testing workflows for integrations built on platforms like Zapier, allowing developers to validate their code before deploying it to the live platform.


title: PARAMETERS
content:
<b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a help message for the command and exits.<br><br><b>--json</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Outputs all information in <b>JSON</b> format, which is ideal for scripting and programmatic parsing.<br><br><b>--yaml</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Outputs all information in <b>YAML</b> format, also highly useful for scripting and configuration management.<br><br><b>--base</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Shows only the prefix path of the <i>base</i> Conda environment, useful for locating the primary installation.<br><br><b>--envs</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists all known Conda environments on the system, along with their respective file paths.<br><br><b>--system</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays detailed system-level information, including operating system, CPU architecture, and memory details.<br><br><b>--unsafe-channels</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reveals any channels configured in your Conda setup that are considered to be unsafe or insecure.<br><br><b>--offline</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Executes the command in offline mode, preventing any internet connection attempts for channel information.<br><br><b>--all</b><br>&nbsp;&nbsp;&nbsp;&nbsp;A convenience option that displays all available information; equivalent to using both <code>--envs</code> and <code>--system</code>.<br><br>


title: DESCRIPTION
content:
<i>conda info</i> is a fundamental diagnostic command within the Conda ecosystem. It provides a comprehensive overview of your Conda setup, environment configurations, and system-specific details. This command is indispensable for debugging issues, verifying the health of your Conda installation, and understanding how your environments are structured.<br><br>When executed, it reports crucial details such as the Conda version, Python version used by Conda, the operating system and architecture, the location of the base environment, paths to package caches, and the configured channels for package retrieval.<br><br>It can also list all detected Conda environments, display system-wide information, and even output data in machine-readable formats like JSON or YAML, making it highly valuable for scripting and automation purposes. By using <i>conda info</i>, users can quickly grasp their Conda configuration, ensuring smooth package and environment management.


title: CAVEATS
content:
The <i>conda info</i> command primarily serves as a reporting tool and does not modify any Conda configurations or environments. <br><br>The output can be extensive, especially when using the <code>--all</code> option, which combines environment and system information. <br><br>For scripting purposes, always prefer the <code>--json</code> or <code>--yaml</code> flags for structured and reliable output, as the human-readable format can change.


title: SCRIPTING WITH JSON/YAML
content:
The <b>--json</b> and <b>--yaml</b> flags are incredibly powerful for integrating Conda information into scripts, automation pipelines, or monitoring tools, providing structured and easily parseable data. <br><br>This is crucial for tasks like programmatically checking active environments, verifying Conda versions, or confirming channel configurations without manual parsing of human-readable output.


title: DEBUGGING ENVIRONMENTS
content:
<i>conda info</i> is often the first command to run when encountering issues with Conda environments or package installations. The output helps in identifying incorrect paths, misconfigured channels, or unexpected environment activations, guiding the user towards a solution.


title: HISTORY
content:
The <i>conda info</i> command has been a foundational utility in the Conda package and environment manager since its early development by Continuum Analytics (now Anaconda, Inc.). It was designed from the outset to provide users with transparent access to their Conda setup's inner workings. <br><br>While its core function of reporting installation details remains consistent, <i>conda info</i> has evolved alongside Conda itself, incorporating new options like <code>--json</code> and <code>--yaml</code> for improved programmatic integration, reflecting the growing importance of automation in data science and software development workflows. Its persistent presence underscores its critical role in diagnosing and understanding Conda environments.


title: SYNOPSIS
content:
<b>conda-repoquery</b> [<i>command</i>] [<i>options</i>] [<i>package_spec</i>]<br><br><i>Common Commands:</i><br>&nbsp;&nbsp;<b>search</b> [<i>options</i>] <i>package_spec</i><br>&nbsp;&nbsp;<b>depends</b> [<i>options</i>] <i>package_spec</i><br>&nbsp;&nbsp;<b>whoneeds</b> [<i>options</i>] <i>package_spec</i><br>&nbsp;&nbsp;<b>history</b> [<i>options</i>] <i>package_spec</i>


title: PARAMETERS
content:
<b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the program's help message and exit.<br><br><b><b>-c</b> <i>CHANNEL</i>, <b>--channel</b> <i>CHANNEL</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify a Conda channel to search. Can be used multiple times.<br><br><b><b>--platform</b> <i>PLATFORM</i>, <b>--subdir</b> <i>PLATFORM</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Filter packages by target platform (e.g., <i>linux-64</i>, <i>win-64</i>, <i>osx-64</i>).<br><br><b><b>--json</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Output results in JSON format, suitable for programmatic parsing.<br><br><b><b>--pretty</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Pretty-print JSON output for better readability when using <b>--json</b>.<br><br><b><b>--show-all</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;For <i>search</i>, show all available versions and build strings of a package.<br><br><b><b>--recursive</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;For <i>depends</i> or <i>whoneeds</i>, recursively list all dependencies or reverse dependencies.<br><br><b><b>--build-string</b> <i>STRING</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Filter results by a specific build string pattern.<br><br><b><b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show program's version number and exit.<br><br>


title: DESCRIPTION
content:
<i>conda-repoquery</i> is a powerful command-line utility for inspecting and querying metadata from remote Conda package repositories directly. Unlike <i>conda search</i>, which might rely on a local cache or a more complex environment setup, <i>conda-repoquery</i> is designed for lightweight, direct interaction with repository APIs (like <i>repodata.json</i>).<br><br>It enables users to quickly find packages, list their dependencies, discover which packages depend on a given package, and even view package history across specified channels and platforms. This tool is invaluable for scripting, continuous integration/continuous deployment (CI/CD) pipelines, or when debugging package resolution issues, as it provides a clear, un-cached view of what's available in the Conda ecosystem without requiring a full local Conda environment or installing any packages.


title: CAVEATS
content:
<i>conda-repoquery</i> queries remote repositories directly and does not utilize a local Conda environment's package cache. Therefore, its results might differ from <i>conda search</i> if your local Conda configuration includes private channels or specific channel priorities that are not explicitly provided via <b>--channel</b>. It also does not perform full dependency resolution like <i>conda install</i>, focusing solely on package metadata lookup. Performance can be affected by network latency and the size of the queried repositories.


title: COMMON USE CASES
content:
  - Scripting package availability checks in CI/CD pipelines.<br>  - Quickly inspecting dependencies or reverse dependencies of a package on a specific channel.<br>  - Debugging issues related to packages being present or absent from remote repositories.<br>  - Programmatically fetching package metadata for custom tools or dashboards.


title: KEY SUBCOMMANDS
content:
<b>search</b>: Finds packages matching a specified name or pattern across available channels.<br><b>depends</b>: Lists the direct and, optionally, recursive dependencies of a given package.<br><b>whoneeds</b>: Identifies packages that directly or recursively depend on the specified package.<br><b>history</b>: Shows historical changes and versions available for a particular package in the repository.


title: HISTORY
content:
<i>conda-repoquery</i> emerged as a specialized tool within the Conda ecosystem to address the need for more granular and direct repository introspection. While <i>conda search</i> provides similar functionality, <i>conda-repoquery</i> was developed to offer a lightweight, API-driven approach to querying remote <i>repodata.json</i> files, making it ideal for automation and scenarios where a full Conda environment initialization is undesirable or unnecessary. Its development reflects the growing demand for programmatic access and efficient metadata retrieval from Conda channels, distinguishing it with a focus on raw repository data over complex solver interactions.


title: SYNOPSIS
content:
<I>dijkstra</I> [<b>-s</b> <I>source_node</I>] [<b>-d</b> <I>destination_node</I>] [<b>-f</b> <I>graph_file</I>] [<b>-o</b> <I>output_format</I>] [<b>-w</b> <I>weight_type</I>] [<b>-v</b>]


title: PARAMETERS
content:
<b><b>-s</b> <I>source_node</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the starting node for path calculations.<br>If omitted, a default or interactive prompt might be used.<br><br><b><b>-d</b> <I>destination_node</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies an optional destination node to find the shortest path to a specific target.<br>If omitted, paths to all reachable nodes are calculated.<br><br><b><b>-f</b> <I>graph_file</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reads the graph structure from the specified file.<br>Common formats could include edge lists or adjacency matrices.<br><br><b><b>-o</b> <I>output_format</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the output format (e.g., 'path', 'cost', 'json', 'csv').<br>Defaults to a human-readable list of paths and costs.<br><br><b><b>-w</b> <I>weight_type</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies how edge weights are interpreted (e.g., 'distance', 'time', 'cost').<br>Relevant if the graph file supports multiple weight attributes per edge.<br><br><b><b>-v</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables verbose output, showing intermediate steps or detailed debugging information.<br><br>


title: DESCRIPTION
content:
The "dijkstra" command, <I>hypothetically</I> if it were a standard Linux utility, would implement Dijkstra's algorithm to find the shortest paths between nodes in a graph. It would typically take a graph representation as input, which could be in various formats like adjacency lists or matrices, often from a file or standard input. Users would specify a source node, and the command would output the shortest path (and optionally its cost) from that source to all other reachable nodes in the graph. This algorithm is fundamental for solving single-source shortest path problems on graphs with non-negative edge weights. Its primary application areas include network routing protocols, geographical information systems (GIS) for optimal route finding, and general graph analysis where minimum costs or distances are critical. The output would likely be a list of paths, costs, or predecessor nodes.


title: CAVEATS
content:
It is crucial to note that "dijkstra" is <B>not a standard Linux command-line utility</B> found in typical distributions. While Dijkstra's algorithm is fundamental in computer science, it is usually implemented <I>within</I> other applications or libraries, rather than provided as a standalone shell command. For example, network routing daemons (like those using OSPF or IS-IS), graph analysis libraries (e.g., NetworkX in Python, Boost Graph Library in C++), or GIS software utilize this algorithm internally. The `synopsis` and `parameters` provided above are therefore <I>hypothetical</I>, illustrating what such a command <I>would</I> entail if it were a common system utility for graph pathfinding. Users typically interact with tools that <I>employ</I> Dijkstra's algorithm, rather than directly invoking a "dijkstra" command. The algorithm is limited to graphs with non-negative edge weights; for graphs with negative weights, the Bellman-Ford algorithm or SPFA is more appropriate.


title: ALGORITHM OVERVIEW
content:
Dijkstra's algorithm operates by iteratively expanding the set of visited nodes, maintaining the shortest distance found so far from the source to every other node. It uses a priority queue to efficiently select the unvisited node with the smallest known distance. Upon visiting a node, it updates the distances of all its unvisited neighbors if a shorter path through the current node is discovered. This process continues until all reachable nodes have been visited or the target destination is reached.


title: GRAPH REPRESENTATION
content:
A hypothetical `dijkstra` command would need to accept a graph. Common representations include adjacency lists (where each node lists its neighbors and the edge weights) or adjacency matrices (a 2D array where `matrix[i][j]` holds the weight of the edge from node `i` to node `j`). The design of such a command would involve robust parsers for various graph file formats.


title: HISTORY
content:
Dijkstra's algorithm was conceived by Dutch computer scientist Edsger W. Dijkstra in 1956 and published in 1959. He reportedly designed the algorithm in about 20 minutes while thinking about a shortest path problem during a shopping trip. Its development was driven by the need for efficient routing in network topologies, and it quickly became a cornerstone algorithm in graph theory and computer science. Despite its simplicity and elegance, it remains one of the most widely taught and implemented algorithms for single-source shortest path problems on graphs with non-negative edge weights. While the algorithm itself has a rich history, a dedicated "dijkstra" command-line utility has not emerged as a standard component of Linux operating systems, with implementations typically residing within larger software frameworks or academic tools.


title: SYNOPSIS
content:
<b>dosbox</b> [<i>options</i>] [<i>program</i> [<i>program_args</i>]]<br><b>dosbox</b> [<i>options</i>] <b>-c</b> "<i>command</i>" [<i>command_args</i>]<br><b>dosbox</b> [<i>options</i>] <b>-conf</b> <i>configfile</i>


title: PARAMETERS
content:
<b><b>-fullscreen</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Start DOSBox in fullscreen mode.<br><br><b><b>-nofullscreen</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Start DOSBox in windowed mode (opposite of <b>-fullscreen</b>).<br><br><b><b>-startwindowed</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Same as <b>-nofullscreen</b>. Starts DOSBox in a window.<br><br><b><b>-exit</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Exit DOSBox automatically when the emulated program terminates.<br><br><b><b>-c</b> "<i>command</i>"</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Executes the specified command directly within DOSBox before starting any program or entering the DOS prompt. Can be used multiple times.<br><br><b><b>-conf</b> <i>configfile</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Load an alternative configuration file instead of the default <i>dosbox.conf</i>.<br><br><b><b>-lang</b> <i>languagefile</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Load an alternative language file for messages.<br><br><b><b>-machine</b> <i>type</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the emulated machine type (e.g., <i>svga_s3</i>, <i>hercules</i>, <i>cga</i>). Default is <i>svga_s3</i>.<br><br><b><b>-cycles</b> <i>amount</i> | <b>-autocycles</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the CPU cycles DOSBox uses. <i>amount</i> can be a number or 'max' or 'auto'. <b>-autocycles</b> attempts to adjust cycles automatically.<br><br><b><b>-memsize</b> <i>megabytes</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the emulated DOS memory size in megabytes.<br><br><b><b>-cpu</b> <i>type</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the emulated CPU type (e.g., <i>pentium</i>, <i>386</i>, <i>486</i>).<br><br><b><b>-core</b> <i>type</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the CPU core to use (e.g., <i>auto</i>, <i>dynamic</i>, <i>normal</i>, <i>simple</i>). <i>dynamic</i> is usually fastest.<br><br><b><b>-output</b> <i>surface</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the output surface for video (e.g., <i>overlay</i>, <i>opengl</i>, <i>surface</i>). Default is platform-dependent.<br><br><b><b>-scaler</b> <i>scaler</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the scaler to use for stretching the screen (e.g., <i>normal2x</i>, <i>hq2x</i>, <i>advmame3x</i>).<br><br><b><b>-priority</b> <i>priority</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the priority of the DOSBox process (e.g., <i>higher</i>, <i>highest</i>, <i>normal</i>, <i>low</i>, <i>lowest</i>).<br><br><b><b>-title</b> <i>title</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set a custom window title for DOSBox.<br><br><b><b>-captures</b> <i>dir</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the directory for screenshots and video captures.<br><br><b><b>-mapper</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Start the keymapper program to configure key bindings.<br><br><b><b>-log</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable logging to a file for debugging purposes.<br><br><b><b>-debugger</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Start DOSBox with its built-in debugger.<br><br><b><b>-nogui</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disable the GUI (if available), primarily used for automated scripts.<br><br>


title: DESCRIPTION
content:
<b>DOSBox</b> is an open-source, multi-platform emulator that creates a complete IBM PC compatible environment, including a DOS operating system. Its primary purpose is to run classic MS-DOS games and applications on modern operating systems (like Linux, Windows, macOS) that no longer natively support the DOS environment or its direct hardware access methods.<br><br><b>DOSBox</b> handles the emulation of the CPU, graphics, sound cards (Sound Blaster, AdLib, Tandy, GUS), and input devices, ensuring that even very old software can run with correct timing and hardware approximations. It's an invaluable tool for retro gaming enthusiasts, software archivists, and anyone needing to experience vintage DOS programs without requiring actual legacy hardware. Users can configure virtual drives, memory, and various hardware settings to tailor the emulation to specific software requirements.


title: CAVEATS
content:
<ul><li>Performance can vary greatly depending on the host system's hardware and the complexity of the emulated software. CPU-intensive DOS applications might require significant host resources.</li><li>Optimal performance and compatibility often necessitate careful tuning of the <i>dosbox.conf</i> configuration file. Default settings might not be ideal for all programs.</li><li><b>DOSBox</b> is an emulator for the DOS environment, not a full operating system virtualization tool. It is not designed to install and run full versions of Windows 95/98/ME, though it might support some lightweight Windows 3.1 installations.</li><li>Users might need to press <b>Ctrl+F10</b> to release the mouse cursor from <b>DOSBox</b>'s capture, especially when running in fullscreen mode.</li></ul>


title: THE CONFIGURATION FILE
content:
<i>DOSBox</i> relies heavily on its configuration file (typically `dosbox.conf`) for setup. This file controls almost every aspect of the emulator, from CPU speed and memory to graphics, sound, and mounted drives. Users can edit this file to optimize performance or resolve compatibility issues for specific games and applications. It is often located in the user's home directory under a `.dosbox` subdirectory or alongside the DOSBox executable.


title: MOUNTING DRIVES
content:
Before running most DOS programs, users must 'mount' directories on their host system as virtual drives within <i>DOSBox</i>. For example, the command <code>MOUNT C /home/user/dosgames</code> (or `Z:\> mount c c:\dosgames` if using the `-c` option) would make the `/home/user/dosgames` directory on the host system available as drive <code>C:</code> inside <i>DOSBox</i>. This step is crucial for accessing programs and data stored on the host machine.


title: KEYBOARD SHORTCUTS
content:
<i>DOSBox</i> has several useful built-in keyboard shortcuts:<br><b>Alt+Enter</b>: Toggle fullscreen mode.<br><b>Ctrl+F10</b>: Release/capture the mouse cursor.<br><b>Ctrl+F11</b> / <b>Ctrl+F12</b>: Decrease / Increase emulated CPU cycles.<br><b>Ctrl+F9</b>: Shut down DOSBox.


title: HISTORY
content:
<b>DOSBox</b> development began in 2002 by a team of programmers seeking to run classic DOS games on modern operating systems. As operating systems like Windows XP and subsequent versions increasingly dropped native support for direct hardware access and 16-bit DOS applications, <b>DOSBox</b> emerged as a critical solution. Its open-source nature fostered a strong community, leading to continuous improvements and broad compatibility, making it the de-facto standard for preserving and running vintage DOS software on current hardware. It gained significant popularity due to its ease of use and ability to make many previously unplayable games accessible again.


title: SYNOPSIS
content:
<b>gh pr comment</b> <i>&lt;PR-number | URL | branch&gt;</i> [<i>options</i>]<br><b>gh pr comment</b> <i>&lt;ID&gt;</i> <b>--edit</b> <i>&lt;comment-id&gt;</i> [<i>options</i>]<br><b>gh pr comment</b> <i>&lt;ID&gt;</i> <b>--react</b> <i>&lt;emoji&gt;</i> [<i>options</i>]


title: PARAMETERS
content:
<b><PR-number | URL | branch></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the target Pull Request by its number, a full URL, or the associated branch name. If omitted, the command attempts to determine the PR from the current Git branch.<br><br><b>-b, --body <string></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Provides the text content of the comment directly on the command line. Cannot be used with <code>--body-file</code> or <code>--editor</code>.<br><br><b>-F, --body-file <file></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reads the comment body from a specified file. Use '-' to read from standard input (stdin). Cannot be used with <code>--body</code> or <code>--editor</code>.<br><br><b>-e, --editor</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Opens the system's default text editor to compose the comment. Cannot be used with <code>--body</code> or <code>--body-file</code>.<br><br><b>-R, --repo <[HOST/]OWNER/REPO></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies a GitHub repository other than the current directory's repository. Useful for scripting across multiple repos or when not in a Git repository.<br><br><b>--web</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Opens the pull request in the default web browser to add the comment via the GitHub web interface.<br><br><b>--edit <comment-id></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Edits an existing comment specified by its ID on the pull request. The comment body is then provided via <code>--body</code>, <code>--body-file</code>, or <code>--editor</code>.<br><br><b>--react <emoji></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adds a reaction (e.g., '<code>:+1:</code>', '<code>:heart:</code>', '<code>:eyes:</code>') to the specified comment ID or the PR description if no comment ID is given.<br><br>


title: DESCRIPTION
content:
The <b>gh pr comment</b> command, part of the official GitHub CLI, provides a powerful and convenient way to interact with GitHub Pull Requests (PRs) without leaving your command-line interface. It enables users to post new comments, edit existing ones, or add reactions to specific comments on a pull request. This functionality is invaluable for developers who prefer a terminal-centric workflow, as well as for automating interactions within continuous integration and continuous delivery (CI/CD) pipelines. <br><br>Users can specify a pull request by its number, a direct URL, or an associated branch name. The comment body can be provided directly via a flag, read from a file, or entered interactively using a text editor. This flexibility makes <b>gh pr comment</b> an essential tool for providing quick feedback, reviewing code, or managing discussions on GitHub PRs efficiently and programmatically.


title: CAVEATS
content:
The command explicitly requested, <code>gh-pr-comment</code>, is not a standard, officially distributed command within the GitHub CLI (<code>gh</code>). Users typically interact with this functionality via the core command <b><code>gh pr comment</code></b>. If <code>gh-pr-comment</code> is encountered, it is most likely a custom shell script, an alias, or a third-party extension. The analysis provided here pertains to the official <b><code>gh pr comment</code></b> command, which offers the functionality to comment on GitHub Pull Requests.


title: INTERACTIVE COMMENTING
content:
When no <code>--body</code> or <code>--body-file</code> options are provided, and <code>--editor</code> is not explicitly used, <b><code>gh pr comment</code></b> will open your default text editor (as defined by <code>GIT_EDITOR</code>, <code>EDITOR</code>, or <code>VISUAL</code> environment variables) to compose the comment. This allows for rich, multi-line comment creation, similar to how Git commit messages are written.


title: SCRIPTING AND AUTOMATION
content:
The ability to read comment bodies from files (<code>-F</code>) or standard input makes <b><code>gh pr comment</code></b> highly suitable for scripting and automation in CI/CD environments. For example, a build script could automatically post a comment with build logs or test results to a PR, or a linting tool could add code review comments.


title: HISTORY
content:
The <b><code>gh</code></b> command-line interface was developed by GitHub to bring GitHub's functionality to the terminal. It was first officially released in 2020, providing a unified tool for interacting with repositories, issues, pull requests, and more. The <b><code>pr comment</code></b> subcommand has been a fundamental part of the <b><code>gh</code></b> CLI since its early versions, reflecting the importance of interactive discussion and feedback within the pull request workflow. Its design emphasizes ease of use, scriptability, and integration with standard Unix tools like text editors and pipelines.


title: SYNOPSIS
content:
<b>ghq</b> [<i>global_options</i>] <<i>subcommand</i>> [<i>subcommand_options</i>] [<i>arguments</i>]


title: PARAMETERS
content:
<b><i>global_options</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Options that can be applied before any subcommand.<br><br><b><b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display help information for <b>ghq</b> or a specific subcommand.<br><br><b><b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the <b>ghq</b> version number.<br><br><b><b>--debug</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable verbose debug output.<br><br><b><i>subcommand</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The action to perform, such as <b>get</b>, <b>list</b>, <b>look</b>, or <b>root</b>.<br><br><b><i>arguments</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Additional arguments required by the subcommand (e.g., a repository URL for <b>get</b>).<br><br><b><b>get</b> <i><repository_url_or_path></i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Clones a repository into the <b>ghq</b> root directory, following its structured hierarchy. Accepts a URL (e.g., <br><i>https://github.com/user/repo</i>) or a partial path (e.g., <br><i>github.com/user/repo</i>).<br><br><b><b>get --update</b> | <b>-u</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;When using <b>get</b>, update the repository if it already exists locally.<br><br><b><b>get --shallow</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;When using <b>get</b>, perform a shallow clone (depth 1) of the repository.<br><br><b><b>list</b> [<i>pattern</i>]</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists all managed repositories. An optional <i>pattern</i> can filter the results.<br><br><b><b>list --full-path</b> | <b>-f</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;When using <b>list</b>, display the full path to each repository.<br><br><b><b>look</b> <i><repository_path></i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Changes the current directory to the specified repository. Accepts a partial path (e.g., <br><i>user/repo</i>).<br><br><b><b>look --ghq-path</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;When using <b>look</b>, print the repository's path instead of changing directory.<br><br><b><b>root</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prints the path to the <b>ghq</b> root directory where repositories are stored.<br><br>


title: DESCRIPTION
content:
<b>ghq</b> is a command-line tool designed to simplify the management and organization of Git repositories on your local machine. Unlike simply cloning repositories anywhere, <b>ghq</b> establishes a structured directory hierarchy, typically under a base path like <br><i>~/ghq/<hostname>/<user>/<repo></i>. This systematic approach makes it effortless to locate, navigate, and manage your projects, especially when dealing with numerous repositories from various sources (e.g., GitHub, GitLab, Bitbucket). <br><br>The primary function, <b>ghq get</b>, clones a repository into this predefined structure, automatically inferring the host and user from the provided URL or path. Other crucial subcommands include <b>ghq list</b> to display all locally managed repositories, <b>ghq look</b> to quickly change into a repository's directory, and <b>ghq root</b> to show the base directory where repositories are stored. <br><br><b>ghq</b> promotes a consistent development environment, reducing the cognitive load of remembering where each project is located. It is widely adopted by developers who frequently work on multiple projects or contribute to open source, offering a clean and predictable way to organize their code.


title: CAVEATS
content:
<b>ghq</b> is not a standard Linux utility; it must be installed separately, typically via a package manager (like <br><i>Homebrew</i> on macOS or a custom <br><i>Go</i> installation on Linux). It relies on <br><i>Git</i> being installed and configured on the system. While highly structured, manually moving or modifying repositories within the <br><i>ghq</i> root directory without using <b>ghq</b> commands can lead to inconsistencies. Its primary benefit comes from consistent usage.


title: INSTALLATION
content:
<b>ghq</b> is typically installed via package managers like <br><i>Homebrew</i> on macOS, or through <br><i>Go's</i> own tooling (e.g., <br><i>go install github.com/x-motemen/ghq@latest</i>) on Linux and other systems. It is not part of standard Linux distributions by default and requires a working Go environment for `go install`.


title: CONFIGURATION
content:
The base directory for <b>ghq</b> repositories can be configured using the <br><i>GHQ_ROOT</i> environment variable. By default, it's <br><i>~/.ghq</i> or <br><i>~/ghq</i>. Multiple roots can be defined by separating paths with <br><i>:</i> (colon). This allows for even more flexible organization across different storage locations, e.g., <br><i>GHQ_ROOT="~/ghq:~/work/ghq"</i>.


title: HISTORY
content:
<b>ghq</b> was created by Motohiko Kubota (motemen) as a tool to organize Git repositories in a standardized, language-agnostic way. Its design principles are heavily influenced by the structured repository management seen in <br><i>Go</i> workspaces (specifically, how <br><i>go get</i> used to place repositories). While not exclusively for <br><i>Go</i>, it gained significant traction within that community due to its consistency with <br><i>Go</i>'s workspace philosophy. It aims to solve the common developer problem of having scattered projects by imposing a predictable hierarchy.


title: SYNOPSIS
content:
<b>git sparse-checkout</b> [<i>options</i>] <i>subcommand</i> [<i>arguments</i>]<br>Common subcommands and options include:<br><b>git sparse-checkout init</b><br><b>git sparse-checkout set</b> [--cone | --no-cone] [<i><paths></i>...]<br><b>git sparse-checkout add</b> [<i><paths></i>...]<br><b>git sparse-checkout list</b><br><b>git sparse-checkout disable</b><br><b>git sparse-checkout status</b><br><b>git sparse-checkout reapply</b>


title: PARAMETERS
content:
<b>init</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Initializes sparse-checkout for the current repository, enabling it.<br><br><b>set <patterns>...</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Replaces the current set of sparse-checkout patterns with new ones. This will also enable sparse-checkout if it's disabled.<br><br><b>add <patterns>...</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adds specified patterns to the existing set of sparse-checkout patterns.<br><br><b>list</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays all currently active sparse-checkout patterns.<br><br><b>disable</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disables sparse-checkout, populating the entire working directory with all files.<br><br><b>status</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Shows whether sparse-checkout is enabled, its current mode (cone or path-based), and other relevant information.<br><br><b>reapply</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Reapplies the current sparse-checkout patterns to the working directory. Useful after merges or rebases.<br><br><b>--cone</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Forces cone mode for the operation, even if not the default. Cone mode is the recommended and default pattern matching strategy.<br><br><b>--no-cone</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disables cone mode, reverting to the older path-based sparse-checkout mode which allows arbitrary patterns.<br><br><b>--set-indexes</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Ensures that the index contains entries for files excluded by sparse-checkout, allowing them to be tracked. This is usually the default.<br><br><b>--no-set-indexes</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prevents the index from being populated with entries for files excluded by sparse-checkout, making the index also 'sparse'.<br><br>


title: DESCRIPTION
content:
<i>git sparse-checkout</i> allows users to reduce the size of their working directory to a manageable subset of files, making it highly beneficial for large repositories or monorepos. Instead of checking out the entire repository history, it only populates the working tree with files matching specified patterns. This significantly improves performance for operations like <i>git status</i>, <i>git add</i>, and <i>git commit</i>, and reduces disk space usage.<br>The command manages these sparse-checkout patterns, which dictate which files are present in your local copy. It primarily operates in two modes: the older path-based mode, which uses arbitrary patterns, and the modern, recommended <i>cone mode</i>. Cone mode is the default and includes only files residing within specified directories and their immediate ancestors. Files outside these patterns are still part of the repository history but are simply not checked out into the working directory.


title: CAVEATS
content:
While <i>git sparse-checkout</i> is powerful, using non-<i>cone mode</i> patterns can be less performant and harder to manage; <i>cone mode</i> is highly recommended. It's important to note that not all Git commands fully respect sparse-checkout patterns in all scenarios. After complex history rewriting operations like <i>git merge</i> or <i>git rebase</i>, running <b>git sparse-checkout reapply</b> is often necessary to ensure the working directory correctly reflects the updated patterns and the sparse-checkout configuration.


title: SPARSE CHECKOUT PATTERNS
content:
Patterns define which files from the repository are materialized in your working directory. In <i>cone mode</i>, patterns are typically directory paths (e.g., 'src/projectA/'). Git then automatically includes all files within these specified directories. It also implicitly includes files in ancestor directories that contain other specified directories (e.g., if 'src/projectA/' is specified, files directly in 'src/' might be included if 'src/' also contains 'src/projectB/'). The older <i>path-based mode</i>, by contrast, allows more arbitrary glob patterns (e.g., 'src/projectA/*.c', 'docs/*.md'), which can be less efficient and harder to maintain consistently.


title: HISTORY
content:
The fundamental concept of sparse checkout has existed in Git for a long time, initially managed by manually editing the <i>.git/info/sparse-checkout</i> file with path-based patterns. This older method often led to complexities and performance issues for very large repositories. The <b>git sparse-checkout</b> command itself was introduced with Git 2.25, alongside the highly significant '<i>cone mode</i>' sparse checkout feature. Cone mode dramatically simplified pattern management and improved performance, eventually becoming the default and recommended sparse-checkout strategy in later Git versions.


title: SYNOPSIS
content:
<i>npm completion [shell]</i><br><i>npm completion --shell=&lt;shell&gt;</i><br>This command outputs the completion script to standard output.


title: PARAMETERS
content:
<b>shell</b><br>&nbsp;&nbsp;&nbsp;&nbsp;A positional argument specifying the target shell for which to generate the completion script. Currently supports <b>bash</b> and <b>zsh</b>.<br><br><b>--shell=&lt;shell&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;An option explicitly defining the shell type for completion. Equivalent to the positional <code>shell</code> argument, useful for clarity or when other arguments might conflict. Use <b>bash</b> or <b>zsh</b>.<br><br>


title: DESCRIPTION
content:
The <i>npm completion</i> command generates shell completion scripts for <i>npm</i> commands. When sourced by your shell (like <b>bash</b> or <b>zsh</b>), these scripts enable tab-completion, allowing users to quickly autocomplete <i>npm</i> commands, subcommands, and options by pressing the Tab key. This significantly enhances the command-line experience by reducing typing and preventing errors.<br><br>The script dynamically queries the current <i>npm</i> installation, ensuring that the completion suggestions are always up-to-date with the installed <i>npm</i> version and its available commands and options. It supports common shells like Bash and Zsh. Users typically redirect the output of this command into their shell's configuration file (e.g., <i>.bashrc</i>, <i>.zshrc</i>) to enable it persistently.


title: CAVEATS
content:
The <i>npm completion</i> command is not meant for direct interactive use; its output is a shell script intended to be sourced by a shell's configuration. Users must manually add the generated script to their shell's startup file (e.g., <i>~/.bashrc</i>, <i>~/.zshrc</i>) and then reload their shell or source the file for changes to take effect.<br><br>While the script is designed for dynamic updates, if the underlying <i>npm</i> CLI's completion mechanism changes drastically, a re-generation might be necessary, though this is rare.


title: ENABLING COMPLETION
content:
To enable <i>npm</i> completion for <b>bash</b>, typically run: <i>npm completion >> ~/.bashrc</i>. For <b>zsh</b>, run: <i>npm completion --shell=zsh >> ~/.zshrc</i>. After adding, reload your shell (e.g., <i>exec bash</i> or <i>exec zsh</i>) or source the file (e.g., <i>source ~/.bashrc</i>).


title: DYNAMIC UPDATES
content:
The generated completion script doesn't just provide static suggestions. It dynamically queries your current <i>npm</i> installation to get a real-time list of commands, subcommands, and options, ensuring that new features or changed syntax in <i>npm</i> are immediately reflected in your shell's auto-completion without requiring you to re-run <i>npm completion</i>.


title: HISTORY
content:
Shell completion for <i>npm</i> has been a core feature aimed at improving developer experience since early versions of the <i>npm</i> CLI. It was introduced to simplify the usage of <i>npm</i>'s growing number of commands and options, allowing users to discover functionalities more easily and reduce common typing errors.<br><br>Its dynamic nature, querying <i>npm</i> directly for commands, ensures it remains relevant and up-to-date with new <i>npm</i> releases without requiring manual updates of the completion script itself, only a re-generation if the <i>npm</i> CLI structure fundamentally changes how completion is handled.


title: PARAMETERS
content:
<b><b>-b</b> <i>old-bindir</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the absolute path to the <i>old</i> PostgreSQL cluster's <b>bin</b> directory (e.g., <b>/usr/local/pg9.6/bin</b>).<br><br><b><b>-B</b> <i>new-bindir</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the absolute path to the <i>new</i> PostgreSQL cluster's <b>bin</b> directory (e.g., <b>/usr/local/pg14/bin</b>).<br><br><b><b>-d</b> <i>old-datadir</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the absolute path to the data directory of the <i>old</i> PostgreSQL cluster.<br><br><b><b>-D</b> <i>new-datadir</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the absolute path to the data directory of the <i>new</i> PostgreSQL cluster. This directory must be empty, except possibly for <b>pg_wal</b> if <b>initdb -X</b> was used.<br><br><b><b>-j</b> <i>num-jobs</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Runs tasks in parallel using the specified number of concurrent jobs. This can significantly speed up file copy or link operations.<br><br><b><b>-k</b>, <b>--link</b>, <b>--hard-link</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Uses hard links instead of copying files. This is the default, fastest method, but requires old and new clusters to be on the same filesystem.<br><br><b><b>-m</b>, <b>--copy</b>, <b>--clone</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Copies files instead of using hard links. Slower than linking but allows relocating data directories to a different filesystem.<br><br><b><b>-r</b>, <b>--retain</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Retains the old cluster's data directory after a successful upgrade when using hard links (<b>--link</b> mode). Useful for backup or potential rollback.<br><br><b><b>-U</b> <i>username</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the database superuser name to use for connecting to both old and new clusters. Defaults to the operating system user.<br><br><b><b>-v</b>, <b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables verbose output, providing more detailed information during the upgrade process.<br><br><b><b>--check</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Performs all compatibility checks but does not modify any files or perform the actual upgrade. Highly recommended for a dry run before a real upgrade.<br><br><b><b>--progress</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a progress bar during the file copy/link phase.<br><br><b><b>--old-options</b> <i>options</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Additional command-line options passed directly to the <i>old</i> <b>postgres</b> server when it starts (e.g., <b>-c shared_buffers=128MB</b>).<br><br><b><b>--new-options</b> <i>options</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Additional command-line options passed directly to the <i>new</i> <b>postgres</b> server when it starts.<br><br><b><b>--old-port</b> <i>port</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the port number the old cluster should listen on during the upgrade process. Defaults to 50432.<br><br><b><b>--new-port</b> <i>port</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the port number the new cluster should listen on during the upgrade process. Defaults to 50433.<br><br><b><b>--discard-old-cluster</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Removes the old cluster's data directory after a successful upgrade. Use with extreme caution and only after verifying the new cluster's integrity.<br><br><b><b>--locale</b> <i>locale</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the locale for the new cluster, overriding the <b>initdb</b> default. Must match the old cluster's locale for compatibility.<br><br>


title: DESCRIPTION
content:
<b>pg_upgrade</b> is a powerful utility designed to facilitate in-place upgrades of PostgreSQL database clusters to a new major version. It efficiently transfers data files from an older PostgreSQL instance to a newly initialized, empty data directory of a newer version. Unlike the traditional <b>pg_dumpall</b> method, <b>pg_upgrade</b> avoids dumping and reloading all data, significantly reducing downtime and disk space requirements.<br><br>It achieves this by either creating hard links to existing data files (the default and fastest method) or by copying them. This process preserves the original data and configuration files, making it a robust and preferred method for many production environments. <b>pg_upgrade</b> performs extensive compatibility checks before initiating the upgrade, ensuring a smoother transition and providing guidance on any necessary pre- or post-upgrade steps.


title: CAVEATS
content:
<ul><li><i>Environment Consistency</i>: Both old and new PostgreSQL <b>bin</b> directories must be accessible and correctly specify the major versions being upgraded. The <b>pg_upgrade</b> binary itself must come from the <i>new</i> PostgreSQL version.</li><li><i>New Data Directory</i>: The <i>new</i> cluster's data directory specified by <b>-D</b> must be empty, except for a potential <b>pg_wal</b> subdirectory if <b>initdb</b> was run with <b>-X</b>.</li><li><i>Custom C Extensions</i>: Custom C functions, types, or aggregates defined in shared libraries (e.g., from <b>CREATE EXTENSION</b> modules) may need to be recompiled against the new PostgreSQL version and potentially re-created in the database.</li><li><i>Locale and Encoding</i>: The locale (specifically <b>LC_CTYPE</b> and <b>LC_COLLATE</b>) and database encoding must match between the old and new clusters for a smooth upgrade.</li><li><i><b>contrib</b> Modules</i>: Some <b>contrib</b> modules might require reinstallation or specific upgrade steps. Always check documentation for particular extensions.</li><li><i>Post-Upgrade <b>ANALYZE</b></i>: It is <i>critical</i> to run <b>ANALYZE</b> on all databases after a successful <b>pg_upgrade</b> to update optimizer statistics for the new cluster. A script (<b>analyze_new_cluster.sh</b>) is generated for this purpose.</li><li><i>Cluster Shutdown</i>: Both old and new clusters must be completely shut down before running <b>pg_upgrade</b>. The utility will attempt to start them briefly during checks.</li><li><i>Superuser Access</i>: The operating system user running <b>pg_upgrade</b> must be able to connect as a superuser to both the old and new clusters without requiring a password (e.g., via <b>peer</b> authentication or <b>.pgpass</b>).</li></ul>


title: UPGRADE MODES
content:
<b>pg_upgrade</b> supports two primary methods for transferring data:<br><i>Hard Links (<b>--link</b>)</i>: This is the default and fastest method. It creates hard links from the new cluster's data directory to the old cluster's data files. This means no actual data copying occurs, making it very quick, but requires the old and new data directories to reside on the <i>same filesystem</i>. The old cluster directories are retained by default unless <b>--discard-old-cluster</b> is specified.<br><i>File Copy (<b>--copy</b>)</i>: This method copies all data files from the old cluster to the new one. While slower and requiring more disk space, it allows the new cluster to reside on a <i>different filesystem</i> or partition than the old one. This mode is useful for migrating data to new storage or hardware.


title: POST-UPGRADE SCRIPTS
content:
After a successful <b>pg_upgrade</b> operation, two or three scripts are generated in the new cluster's data directory:<br><i><b>analyze_new_cluster.sh</b></i>: This script contains <b>VACUUM ANALYZE</b> commands for all databases in the new cluster. It is crucial to run this script to update optimizer statistics, ensuring optimal query performance.<br><i><b>delete_old_cluster.sh</b></i>: This script helps remove the old cluster's data directory and related files, freeing up disk space. It should only be run <i>after</i> you have thoroughly tested the new cluster and are confident the upgrade was successful and you no longer need the old data.<br><i><b>relink_old_cluster.sh</b></i>: (Only for <b>--link</b> mode) This script is generated if you used hard links and chose to retain the old cluster. It allows you to revert the hard links, making the old cluster runnable again if needed (e.g., for troubleshooting or if the upgrade failed after data modification in the new cluster).


title: HISTORY
content:
The <b>pg_upgrade</b> utility was introduced in PostgreSQL 8.4 as a robust and efficient alternative to the traditional <b>pg_dumpall</b> method for major version upgrades. Prior to its existence, administrators often faced extended downtime and significant disk space requirements when migrating to a new PostgreSQL release. <b>pg_upgrade</b> dramatically reduced these burdens by leveraging file system links or copies, allowing for in-place upgrades with minimal data re-processing. Its development addressed a long-standing need for a faster, more reliable upgrade path in production environments, making major version migrations considerably less daunting.


title: PARAMETERS
content:
<b>--all, -a</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Reindex all databases.</i><br><br><b>--dbname=<U>dbname</U>, -d <U>dbname</U></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specify the name of the database to connect to and reindex.</i><br><br><b>--table=<U>table</U>, -t <U>table</U></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Reindex a specific table. Can be specified multiple times.</i><br><br><b>--index=<U>index</U>, -i <U>index</U></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Reindex a specific index. Can be specified multiple times.</i><br><br><b>--schema=<U>schema</U>, -s <U>schema</U></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Reindex a specific schema. Can be specified multiple times.</i><br><br><b>--jobs=<U>N</U>, -j <U>N</U></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Use <U>N</U> concurrent jobs for reindexing.</i><br><br><b>--concurrently</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Reindex tables and indexes concurrently, minimizing downtime.</i><br><br><b>--full, -F</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Perform a full rebuild of the index by scanning the entire table.</i><br><br><b>--echo-queries, -e</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Show the SQL commands being executed by reindexdb.</i><br><br><b>--quiet, -q</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Suppress progress messages.</i><br><br><b>--verbose, -v</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Enable verbose output, including detailed progress.</i><br><br><b>--dry-run</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Print the commands that would be executed without actually running them.</i><br><br><b>--if-exists</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Do not error if the specified database, table, or index does not exist.</i><br><br><b>--host=<U>hostname</U>, -h <U>hostname</U></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Database server host name or IP address.</i><br><br><b>--port=<U>port</U>, -p <U>port</U></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Database server port number.</i><br><br><b>--username=<U>username</U>, -U <U>username</U></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>User name to connect as.</i><br><br><b>--no-password, -w</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Never prompt for password.</i><br><br><b>--password, -W</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Force password prompt.</i><br><br>


title: DESCRIPTION
content:
reindexdb is a utility for rebuilding indexes in a PostgreSQL database. It's a wrapper around the SQL command <B>REINDEX</B>. This command is crucial for maintaining the health and performance of your database. Over time, indexes can become corrupted, inefficient due to data churn, or bloat, leading to slower query performance. reindexdb addresses these issues by rebuilding one or more indexes. It can operate on an entire database, a specific schema, a table, or even a single index.<br><br>Reindexing helps to:<br><i><b>Fix corrupted indexes:</b></i> Although rare, indexes can sometimes become corrupted, leading to incorrect query results or errors.<br><i><b>Improve query performance:</b></i> After significant data changes (insertions, updates, deletions), index structures can become unbalanced or fragmented. Rebuilding them restores their optimal B-tree structure.<br><i><b>Reclaim disk space:</b></i> In some cases, especially with B-tree indexes, reindexing can reclaim space used by "dead" tuples, although VACUUM is primarily for table bloat.<br><br>When run without the <B>--concurrently</B> option, reindexing an object requires an exclusive lock, blocking write operations (and sometimes reads) on that object. Using <B>--concurrently</B> (available since PostgreSQL 9.4) allows reindexing with minimal impact on concurrent operations, making it suitable for production environments.


title: CAVEATS
content:
reindexdb requires appropriate PostgreSQL privileges. For <B>REINDEX DATABASE</B> or <B>REINDEX SYSTEM</B>, you typically need <B>SUPERUSER</B> privileges. For individual tables or indexes, ownership or <B>CREATE</B> privilege on the schema might suffice.<br><br>Without the <B>--concurrently</B> option, reindexing an object (table or index) will acquire an exclusive lock, blocking all concurrent writes (and sometimes reads) on that object until the operation completes. <B>--concurrently</B> greatly reduces the locking impact.<br><br>Reindexing an entire database (<B>-a</B> or <B>-d</B> without <B>-t</B>/<B>-i</B>/<B>-s</B>) or using <B>REINDEX SYSTEM</B> (<B>-s pg_catalog</B>) will block all other connections to that database for the duration of the reindex.<br><br>While reindexdb can help reclaim some space, particularly in <B>B-tree</B> indexes, its primary purpose is structural optimization and corruption repair, not general table bloat reclamation (which is handled by <B>VACUUM FULL</B> or <B>CLUSTER</B>).<br><br>The <B>--full</B> option ensures a complete rebuild of the index from scratch by scanning the table, which is the default behavior for <B>REINDEX DATABASE</B> and <B>REINDEX SYSTEM</B>. For individual indexes, <B>--concurrently</B> is often a safer choice in production.


title: CONCURRENT VS. FULL REINDEX
content:
When reindexing tables or individual indexes, <B>--concurrently</B> is generally preferred in production environments because it allows other database operations to continue while the index is being rebuilt. It takes longer but avoids blocking. The <B>--full</B> option performs a full rebuild, which is the default for entire databases or system catalogs, but for individual objects, <B>--concurrently</B> is usually the better choice to avoid exclusive locks.


title: INDEX TYPE IMPACT
content:
The benefits of reindexing are most pronounced for <B>B-tree</B> indexes, which are the most common type. Other index types, like <B>GIN</B> or <B>GiST</B>, have different internal structures and might benefit from reindexing in different ways, or less frequently, depending on their specific usage patterns and PostgreSQL version. Always consult PostgreSQL documentation for specific index types.


title: HISTORY
content:
The reindexdb utility has been a part of the PostgreSQL client application suite for many years, acting as a convenient command-line wrapper for the <B>REINDEX</B> SQL command. Its functionality has evolved alongside PostgreSQL itself, notably with the introduction of concurrent index rebuilds. The <B>--concurrently</B> option was added to reindexdb in PostgreSQL 9.4, mirroring the <B>REINDEX CONCURRENTLY</B> feature, which significantly improved its usability in high-availability production environments by allowing indexes to be rebuilt with minimal impact on database operations. Subsequent versions have seen refinements and additional options to enhance control and flexibility.


title: SYNOPSIS
content:
<code>systemctl-bind &lt;<i>command</i>&gt; [<i>OPTIONS</i>] &lt;<i>UNIT_NAME</i>&gt; [<i>ARGS</i>]</code><br>Example: <code>systemctl-bind create socket --port 8080 --service myapp --enable --now</code>


title: PARAMETERS
content:
<b><b>command</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the action to perform.<br><i>Possible values:</i><br><b>create</b>: Create a new binding configuration.<br><b>remove</b>: Remove an existing binding configuration.<br><b>list</b>: List active or configured bindings.<br><br><b><b>UNIT_NAME</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;The base name for the systemd unit (e.g., <code>myapp</code> will hypothetically create <code>myapp.socket</code> and <code>myapp.service</code>).<br><br><b><b>--type &lt;socket|mount&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the type of binding to manage. <i>Defaults to <code>socket</code>.</i><br><br><b><b>--port &lt;number&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;For socket units, specifies the TCP/UDP port to bind.<br><br><b><b>--address &lt;IP_address&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;For socket units, specifies the IP address to bind to. <i>Defaults to all available interfaces.</i><br><br><b><b>--path &lt;file_path&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;For socket units, specifies a Unix domain socket path; for mount, specifies the target mount point.<br><br><b><b>--service &lt;service_name&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the associated service unit name that the socket should activate. <i>If not provided, defaults to <code>UNIT_NAME.service</code>.</i><br><br><b><b>--exec-start &lt;command&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;For service units, the command to execute when the service starts.<br><br><b><b>--user &lt;username&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Run the associated service under this user.<br><br><b><b>--group &lt;groupname&gt;</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Run the associated service under this group.<br><br><b><b>--enable</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable the generated systemd unit(s) to start on boot.<br><br><b><b>--now</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Start the generated systemd unit(s) immediately after creation/enabling.<br><br><b><b>--force</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Force overwrite existing units when creating.<br><br>


title: DESCRIPTION
content:
<code>systemctl-bind</code> is a <i>hypothetical</i> command designed to simplify the configuration and management of systemd units related to 'binding' resources. Its primary purpose would be to abstract the complexity of creating and managing <b>socket units</b> (<code>.socket</code>) for network activation, allowing services to be started on demand when a connection arrives on a specific port or Unix socket. It could also potentially facilitate the creation of <b>bind mounts</b> for specific services or environments. This command would aim to streamline the process of linking services to network interfaces, file paths, or other resources, enabling users to quickly set up services that leverage systemd's advanced activation features without directly editing complex unit files. It would likely interact with <code>systemctl</code> to enable, start, or stop the generated units.


title: CAVEATS
content:
This command, <code>systemctl-bind</code>, is <b>not a standard utility</b> found in typical Linux distributions. The information provided is based on an interpretation of its name and a hypothetical design for such a tool. Its actual existence and functionality would depend on a specific custom implementation or a third-party project. Users should not expect to find this command pre-installed on their systems.


title: SOCKET ACTIVATION
content:
<i>Socket activation</i> is a core systemd feature that allows services to be started only when a connection arrives on a specific network socket or FIFO. <code>systemctl-bind</code> would aim to simplify the creation of the necessary <code>.socket</code> unit (which listens for connections) and <code>.service</code> unit (which starts the actual application) and link them together, providing a resource-efficient way to run services. The socket unit would bind to the port/path, and systemd would pass the open file descriptor to the service when it starts.


title: BIND MOUNTS
content:
While primarily focused on sockets, a <code>systemctl-bind</code> utility could also theoretically manage <i>bind mounts</i>. A bind mount allows a directory or file to be mounted on a different location in the file system, effectively making it accessible from two places. This can be useful for chroot environments, sharing configuration across containers, or isolating parts of the file system. If implemented, <code>systemctl-bind</code> could help automate the creation of systemd mount units (<code>.mount</code>) for such purposes.


title: HISTORY
content:
As a hypothetical command, <code>systemctl-bind</code> has no official history. If it were to exist, its development would likely stem from a desire to simplify common systemd configuration patterns, similar to how other wrapper scripts or higher-level tools are developed to make complex systemd features more accessible to developers or system administrators, abstracting away the direct manipulation of <code>.socket</code> and <code>.service</code> unit files. It would likely be a community-driven script or part of a larger application framework that integrates tightly with systemd.


title: SYNOPSIS
content:
<b>kubectl debug</b> [<i>options</i>] (<i>POD</i> | <i>TYPE/NAME</i>) [<i>flags</i>] [-- <i>COMMAND</i> [<i>args...</i>]]


title: PARAMETERS
content:
<b>-c, --container <name></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the container within the pod to debug. If omitted, the first container is chosen.<br><br><b>-i, --image <image-name></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the container image to use for the debug container. Defaults vary (e.g., <b>busybox</b>, <b>nicolaka/netshoot</b>).<br><br><b>--profile <profile-name></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use a predefined debug profile which sets a specific image and pre-installs common debugging tools (e.g., <b>netshoot</b>, <b>golang</b>).<br><br><b>--ephemeral</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use an ephemeral container for debugging. Requires Kubernetes 1.25+ for stable support.<br><br><b>--target <container-name></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the target container whose process namespace will be shared with the debug container (typically used with <b>--ephemeral</b>).<br><br><b>--share-process-namespace</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Enable sharing of the process namespace with other containers in the pod, allowing visibility into their processes.<br><br><b>-p, --port-forward</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Automatically set up port forwarding from your local machine to the debug container.<br><br><b>--attach</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Attach to the debug container immediately after creation (default behavior).<br><br><b>--shell <command></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the shell command to run in the debug container (e.g., <b>bash</b>). Defaults to <b>sh -l</b> or <b>bash -l</b>.<br><br><b>--tty</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Allocate a pseudo-TTY for the debug container (default is true).<br><br><b>--stdin</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Pass stdin to the container (default is true).<br><br><b>--wait</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Wait for the debug container to be ready before attaching.<br><br>


title: DESCRIPTION
content:
The <i>kubectl-debug</i> plugin allows users to attach a new, temporary container to an existing running pod for in-depth debugging. This enables the use of specialized debugging tools (like <b>strace</b>, <b>tcpdump</b>, <b>gdb</b>) directly within the pod's environment without modifying the original container images or restarting the application.<br><br>It can operate by creating either an <I>ephemeral container</I> (for Kubernetes 1.25+ clusters, mirroring the native <I>kubectl debug</I> command's functionality) or a regular sidecar container within the pod for older Kubernetes versions. By often sharing the process namespace, the debug container can observe and interact with processes running in the target container, providing powerful insights into application behavior and system calls.


title: CAVEATS
content:
Requires appropriate Kubernetes RBAC permissions to create debug or ephemeral containers. Full functionality, especially with <I>ephemeral containers</I> and process namespace sharing, depends on the Kubernetes cluster version (1.25+ for stable ephemeral containers). The chosen debug image must contain the necessary debugging utilities.


title: EPHEMERAL CONTAINERS VS. SIDECARS
content:
This plugin can create either an <I>ephemeral container</I> or a regular sidecar container. Ephemeral containers are temporary, non-persisted containers ideal for debugging, which are not part of the pod's permanent specification. Sidecars, while effective, become part of the pod's definition and may require manual cleanup.


title: KREW PLUGIN
content:
<i>kubectl-debug</i> is widely available and easily installed via <I>Krew</I>, the package manager for Kubernetes CLI plugins. This simplifies its deployment and maintenance for users.


title: HISTORY
content:
The <I>kubectl-debug</I> plugin was developed to address limitations in debugging running Kubernetes pods, particularly before the native <I>kubectl debug</I> command with <I>ephemeral container</I> support became mature (stable in Kubernetes 1.25). It provided a flexible way to inject a temporary, feature-rich debugging environment into a pod without modifying its definition or restarting it, enabling deeper analysis than simple <I>kubectl exec</I> could offer.


title: SEE ALSO
content:
kubectl exec(1), kubectl attach(1), kubectl logs(1), kubectl debug(1) (native command), strace(1), tcpdump(8)


title: DESCRIPTION
content:
<i>pacrepairdb</i> is a utility script designed to repair or rebuild the Arch Linux Pacman package database. It's particularly useful when the local package database becomes corrupted, inconsistent, or desynchronized with the actual installed packages. The script works by scanning the <i>/var/lib/pacman/local</i> directory, which contains information about installed packages, and reconstructing the database entries based on the files found on the system. This process ensures that Pacman's understanding of installed software aligns with the system's reality. While Pacman itself is robust, database corruption can occur due to sudden system shutdowns, disk errors, or other unforeseen events, leading to issues like being unable to install, remove, or upgrade packages. Running <i>pacrepairdb</i> can often resolve these critical database inconsistencies, allowing normal package management operations to resume. It is part of the <b>pacman-contrib</b> package.


title: CAVEATS
content:
<ul><li><b>Root Privileges</b>:<br>This command <b>must</b> be run with root privileges (e.g., using <i>sudo</i>).<br></li><li><b>Time Consuming</b>:<br>Depending on the number of installed packages and system performance, the process can take a significant amount of time.<br></li><li><b>Last Resort</b>:<br>It should generally be used as a diagnostic or recovery tool when direct Pacman operations are failing due to database issues, rather than routine maintenance.<br></li><li><b>Data Loss Risk</b>:<br>While designed to fix, any operation that modifies the package database carries a minor risk. It's always advisable to ensure critical data is backed up, though this command primarily affects package metadata.<br></li><li><b>File Integrity</b>:<br><i>pacrepairdb</i> only repairs the database <b>metadata</b>. It does not repair or verify the integrity of the actual package files installed on your system. For file integrity checks, use <i>paccheck -qmk</i>.</li></ul>


title: LOCATION
content:
The <i>pacrepairdb</i> script is typically located at <i>/usr/bin/pacrepairdb</i> and is usually a shell script, allowing users to inspect its logic if needed.


title: BACKUP RECOMMENDATION
content:
Before performing significant database operations like <i>pacrepairdb</i>, it's a good practice to back up your existing Pacman database (e.g., <i>cp -a /var/lib/pacman /var/lib/pacman.bak</i>) to allow for rollbacks if unintended issues arise, although this is less critical for <i>pacrepairdb</i> which reconstructs rather than modifies existing data in a complex way.


title: HISTORY
content:
<i>pacrepairdb</i> has been a long-standing component of the <b>pacman-contrib</b> package, which provides a collection of useful helper scripts for Arch Linux's <i>pacman</i> package manager. Its inclusion reflects the need for robust recovery mechanisms within the Arch ecosystem, addressing potential database corruption that can arise in dynamic operating environments. While <i>pacman</i> itself is continuously developed, <i>pacrepairdb</i> has served its specialized role as a database repair utility for many years, helping users maintain the integrity of their package management system.


title: SYNOPSIS
content:
<br><b><I>For searching packages:</I></b><br><b>pip index search</b> [<I>options</I>] &lt;<i>query</i>&gt;<br><br><b><I>For listing package versions:</I></b><br><b>pip index versions</b> [<I>options</I>] &lt;<i>package-name</i>&gt;


title: PARAMETERS
content:
<b>&lt;<i>query</i>&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;The keyword or partial name used to search for packages with <b>pip index search</b>.<br><br><b>&lt;<i>package-name</i>&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;The exact name of the package for which to list all available versions using <b>pip index versions</b>.<br><br><b><b>-i</b>, <b>--index-url</b> &lt;<i>url</i>&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Base URL of the Python Package Index to use (defaults to https://pypi.org/simple). Can be overridden.<br><br><b><b>--extra-index-url</b> &lt;<i>url</i>&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Add an additional index URL to search for packages, besides the primary <b>--index-url</b>.<br><br><b><b>--pre</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Include pre-release and development versions when searching or listing package versions.<br><br><b><b>--trusted-host</b> &lt;<i>hostname</i>&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Mark this host as trusted, even if it does not have valid HTTPS certificates. Use with caution.<br><br><b><b>--timeout</b> &lt;<i>seconds</i>&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Set the socket timeout in seconds for network operations (default is 15 seconds).<br><br><b><b>--no-color</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppress colored output from the command.<br><br><b><b>-v</b>, <b>--verbose</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Give more output. Can be specified multiple times to increase verbosity.<br><br><b><b>-q</b>, <b>--quiet</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Give less output. Can be specified multiple times to decrease verbosity.<br><br>


title: DESCRIPTION
content:
The <b>pip index</b> command is a powerful utility within the <b>pip</b> ecosystem for interacting with Python package indexes, primarily PyPI (Python Package Index). It serves as the primary tool for discovering available Python packages, their descriptions, and version histories. Introduced to replace the deprecated <b>pip search</b>, <b>pip index</b> offers a more structured and robust interface. <br><br>It provides two main subcommands: <br><b><I>search</I></b>: Used to query the package index for packages matching specific keywords or names. It's invaluable for developers looking for libraries to solve particular problems or exploring the vast collection of open-source Python projects. <br><b><I>versions</I></b>: Allows users to retrieve a comprehensive list of all available versions for a given package, including pre-releases if specified. This is crucial for understanding a package's development history, compatibility, and for specifying exact versions during installation. <br><br>While <b>pip index</b> primarily queries remote indexes, it also supports specifying custom index URLs, making it flexible for corporate or private package repositories.


title: CAVEATS
content:
The <b>pip index</b> command requires an active internet connection to query remote package indexes like PyPI. The accuracy and comprehensiveness of search results are dependent on the capabilities of the queried index. While <b>pip index versions</b> provides structured output, the output of <b>pip index search</b> is primarily for human readability and is not guaranteed to be stable for programmatic parsing. It fully replaced the older, less feature-rich <b>pip search</b> command.


title: USAGE EXAMPLES
content:
<b><I>To search for packages containing 'flask':</I></b><br><code>pip index search flask</code><br><br><b><I>To list all versions of the 'requests' package, including pre-releases:</I></b><br><code>pip index versions --pre requests</code><br><br><b><I>To search for a package on a specific private index:</I></b><br><code>pip index search -i https://private.pypi.example.com/simple my-private-package</code>


title: OUTPUT FORMAT
content:
<b><I>pip index search:</I></b> Presents a list of packages matching the query, typically showing the package name, its latest version, and a brief description. The output is formatted for human readability and is designed for quick discovery.<br><br><b><I>pip index versions:</I></b> Displays a chronological list of all available versions for the specified package, often including release dates or upload times. This output is more structured and can be easier to process programmatically, for example, when scripting version checks.


title: HISTORY
content:
The functionality now encapsulated by <b>pip index</b> was originally provided by the <b>pip search</b> command. However, due to limitations and the desire for a more robust and extensible interface for interacting with package indexes, <b>pip index</b> was introduced. It first appeared as an experimental command in <b>pip</b> version 21.2 (released July 2021) and officially replaced <b>pip search</b>, with the latter being deprecated and eventually removed, in <b>pip</b> 22.0 (released January 2022). This evolution aimed to provide distinct subcommands (<b>search</b> and <b>versions</b>) for clearer and more targeted interactions with PyPI and other package indexes.


title: PARAMETERS
content:
<b>-u, --url &lt;URL&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Download music from a specific YouTube URL.<br><br><b>-p, --playlist &lt;URL&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Download all songs from a given YouTube playlist URL.<br><br><b>--artist &lt;ARTIST_NAME&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the artist name for better search results and metadata accuracy.<br><br><b>--album &lt;ALBUM_NAME&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the album name for better search results and metadata accuracy.<br><br><b>--title &lt;TITLE_NAME&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the song title for better search results and metadata accuracy.<br><br><b>--format &lt;FORMAT&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the output audio format (e.g., <b>mp3</b>, <b>flac</b>, <b>m4a</b>, <b>opus</b>).<br><br><b>-o, --output &lt;DIRECTORY&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specify the directory where the downloaded music files will be saved.<br><br><b>-m, --disable-metadata</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Disable embedding of metadata (tags and album art) into the downloaded audio file.<br><br><b>--disable-album-art</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prevent embedding album art into the downloaded file, even if metadata is enabled.<br><br><b>--lyrics</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Embed lyrics into the downloaded audio file if available from metadata sources.<br><br><b>--choice</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Present a list of search results and allow the user to choose the desired song interactively.<br><br><b>--add-args &lt;ARGS&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Pass additional arguments directly to the underlying <b>yt-dlp</b> command.<br><br><b>--download-archive &lt;FILE&gt;</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Use a file to record downloaded video IDs, preventing re-downloading of already processed videos.<br><br><b>-v, --version</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Display the <b>ytmdl</b> version and exit.<br><br><b>-h, --help</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Show the help message and exit.<br><br>


title: DESCRIPTION
content:
<b>ytmdl</b> is a powerful command-line utility for Linux, designed to download music from YouTube with comprehensive metadata and high-quality album art. It serves as a frontend to the robust <b>yt-dlp</b> (or <b>youtube-dl</b>) project, leveraging its ability to extract audio from YouTube videos. Beyond simple downloading, <b>ytmdl</b> intelligently fetches and embeds crucial metadata such as song title, artist, album, and genre from various online sources like Last.fm, Spotify, and MusicBrainz. It also automatically searches for and embeds album artwork, providing a complete and organized music file.<br><br>Users can specify search queries, YouTube URLs, or even entire playlists. It offers extensive customization options, including output format, bitrate, proxy support, and the ability to embed lyrics. The tool aims to provide a seamless experience for curating a local music library directly from YouTube, ensuring downloaded tracks are well-tagged and ready for any music player.


title: CAVEATS
content:
<b>ytmdl</b> relies heavily on external dependencies like <b>yt-dlp</b> (or <b>youtube-dl</b>), <b>ffmpeg</b>, and <b>ffprobe</b>. Breakages can occur if YouTube's website changes or if these dependencies are not installed or are outdated. Users should be aware of YouTube's terms of service regarding content downloading. Metadata fetching relies on third-party services, and occasional inconsistencies or rate limits may occur. It also requires a Python environment to run.


title: DEPENDENCIES
content:
<b>ytmdl</b> requires several external tools to function correctly:<br><ul><li><b>Python</b>: For the script itself.</li><li><b>yt-dlp</b> (or <b>youtube-dl</b>): For video extraction and downloading.</li><li><b>ffmpeg</b>/<b>ffprobe</b>: For audio conversion, trimming, and metadata embedding.</li></ul>


title: CONFIGURATION FILE
content:
For persistent settings, <b>ytmdl</b> supports a configuration file, typically located at <b>~/.config/ytmdl/config.json</b> or <b>~/.ytmdl/config.json</b>. This file allows users to define default values for options like output directory, preferred format, bitrate, and metadata preferences, avoiding the need to specify them with every command.


title: HISTORY
content:
<b>ytmdl</b> originated as a Python-based command-line tool, initially designed to simplify downloading YouTube music with embedded metadata. It gained traction for its user-friendly interface and robust metadata capabilities. Over time, it transitioned its primary backend from <b>youtube-dl</b> to <b>yt-dlp</b> to benefit from <b>yt-dlp</b>'s more active development and better handling of YouTube changes. The project continues to be maintained, with ongoing improvements in metadata accuracy, download reliability, and feature additions like playlist support and interactive selection.


title: TLDR
content:
<b>Get GRUB filesystem module for a path</b>`sudo grub-probe [[-t|--target]] fs [/boot/grub]`<br><b>Get the system device containing a path</b>`sudo grub-probe [[-t|--target]] device [/boot/grub]`<br><b>Get GRUB disk name for a system device</b>`sudo grub-probe [[-t|--target]] drive [/dev/sdX] [[-d|--device]]`<br><b>Get filesystem UUID</b>`sudo grub-probe [[-t|--target]] fs_uuid [/boot/grub]`<br><b>Get filesystem label</b>`sudo grub-probe [[-t|--target]] fs_label [/boot/grub]`<br><b>Get MBR partition type code(two hexadecimal digits)</b>`sudo grub-probe [[-t|--target]] msdos_parttype [/dev/sdX]`<br><b>Probe using a custom device map</b>`sudo grub-probe [[-t|--target]] drive [/boot/grub] [[-m|--device-map]] [path/to/custom_device.map]`


title: SYNOPSIS
content:
`installpkg` [<i>options</i>] <i>package_file</i> [<i>package_file ...</i>]<br>`installpkg` [<i>options</i>] <b>--checkonly</b> <i>package_file</i> [<i>package_file ...</i>]<br>`installpkg` [<i>options</i>] <b>--remove</b> <i>package_name</i> [<i>package_name ...</i>]


title: PARAMETERS
content:
<b><b>--root</b> <i>&lt;path&gt;</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specify an alternate installation root directory.</i><br><br><b><b>--upgrade</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Force an upgrade of an already installed package.</i><br><br><b><b>--keep</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>When upgrading, keep existing configuration files (do not install new ones).</i><br><br><b><b>--warn</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Warn if a package is already installed but do not upgrade it.</i><br><br><b><b>--checkonly</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Do not install or remove; only check package integrity.</i><br><br><b><b>--remove</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Remove the specified package(s) instead of installing.</i><br><br><b><b>--md5sum</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Verify MD5 checksums of files during installation (if available in the package).</i><br><br><b><b>--info</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Display detailed package information without installing or removing.</i><br><br><b><b>--skip-scripts</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Do not execute package installation scripts (e.g., install.sh, doinst.sh).</i><br><br><b><b>--preserve</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Preserve permissions and ownership of files inside the package during installation.</i><br><br>


title: DESCRIPTION
content:
`installpkg` is a fundamental command in <i>Slackware Linux</i>, designed for the installation, upgrading, and removal of software packages. Unlike package managers in other distributions, `installpkg` operates on individual package files (typically <i>.tgz</i>, <i>.txz</i>, <i>.tbz</i>, <i>.tlz</i>, <i>.tzo</i> formats) and does <i>not</i> automatically resolve dependencies. This aligns with <i>Slackware's</i> philosophy of simplicity and user control. <br><br>When installing, it unpacks the package contents into the filesystem, places setup scripts, and updates the package database. For upgrades, it intelligently handles configuration files, often moving existing ones to <i>.orig</i> or <i>.new</i> extensions to prevent accidental overwrites. It can also be used to remove installed packages. `installpkg` provides a straightforward, script-driven approach to maintaining a <i>Slackware</i> system, empowering users with explicit control over their installed software.


title: CAVEATS
content:
`installpkg` does <i>not</i> perform automatic dependency resolution. Users are responsible for ensuring all necessary dependencies are met before installing a package. <br>It requires superuser (root) privileges to install or remove packages in the system's root directory. <br>This command is specific to <i>Slackware Linux</i> and its derivatives; it will not work on other distributions like <i>Debian</i>, <i>Red Hat</i>, or <i>Arch Linux</i> systems.


title: <I>PACKAGE NAMING CONVENTION</I>
content:
<i>Slackware</i> packages follow a strict naming convention: <i>name-version-architecture-build.pkg.extension</i>. For example, `firefox-125.0.2-x86_64-1.txz`. Understanding this format is crucial for identifying and managing packages.


title: <I>CONFIGURATION FILE HANDLING DURING UPGRADES</I>
content:
During an upgrade, if a file in the new package would overwrite an existing modified configuration file, `installpkg` typically moves the old file to a <i>.orig</i> or <i>.new</i> extension (e.g., `myconfig.conf` becomes `myconfig.conf.orig`), allowing the new version to be installed. Users are then expected to manually merge changes if desired.


title: HISTORY
content:
The `installpkg` command has been a core component of the <i>Slackware Linux</i> package management system since its inception in the early 1990s. Its design reflects <i>Slackware's</i> long-standing philosophy of simplicity, transparency, and user control. Unlike more complex, dependency-resolving package managers that emerged later, `installpkg` remains a straightforward script, allowing users to understand and manage their system's software directly without hidden abstractions. This stability in design has been a hallmark of <i>Slackware's</i> development, focusing on robust, script-based tools.


title: TLDR
content:
<b>Install a package</b>`sudo installpkg [path/to/package.tgz]`<br><b>Generate a report of a simulated installation to stdout</b>`installpkg -warn [path/to/package.tgz]`<br><b>Create a package from current directory and its subdirectories</b>`installpkg -m [package_name.tgz]`<br><b>Install the contents of the current directory and subdirectories as a package with a specified name</b>`sudo installpkg -r [package_name.tgz]`


title: TLDR
content:
<b>Show network configuration for all interfaces</b>`ip [[netc|netconf]]`<br><b>Show network configuration for a specific interface</b>`ip [[netc|netconf]] [[s|show]] dev [network_interface]`<br><b>Show only IPv4 network configuration</b>`ip -4 [[netc|netconf]]`<br><b>Show only IPv6 network configuration</b>`ip -6 [[netc|netconf]]`


title: TLDR
content:
<b>Show all interface statistics across all network devices</b>`ip [[st|stats]]`<br><b>Show statistics for a specific network interface</b>`ip [[st|stats]] show dev [network_interface]`<br><b>Show link-layer statistics (same as ip -statistics link show)</b>`ip [[st|stats]] show group link`<br><b>Show hardware offload statistics for all devices</b>`ip [[st|stats]] show group offload`<br><b>Show offload statistics for a specific interface</b>`ip [[st|stats]] show dev [network_interface] group offload`<br><b>Show a specific offload subgroup</b>`ip [[st|stats]] show dev [network_interface] group offload subgroup [l3_stats|cpu_hit|hw_stats_info]`<br><b>Show address-family specific statistics (e.g. MPLS)</b>`ip [[st|stats]] show group afstats subgroup [mpls]`<br><b>Enable Layer 3 hardware statistics collection on a device</b>`ip [[st|stats]] set dev [network_interface] l3_stats on`


title: SYNOPSIS
content:
<b>ip [ OPTIONS ] tuntap { COMMAND | help }</b><br><br><b>ip tuntap add [ dev <i>NAME</i> ] mode { tun | tap } [ user <i>USER</i> ] [ group <i>GROUP</i> ] [ persist ] [ pi { on | off } ]</b><br><br><b>ip tuntap del dev <i>NAME</i> [ mode { tun | tap } ]</b><br><br><b>ip tuntap show [ mode { tun | tap } ]</b>


title: PARAMETERS
content:
<b>dev <i>NAME</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies the name of the TUN/TAP device to create, delete, or show. If creating and no name is provided, the kernel assigns a default (e.g., tun0, tap1).<br><br><b>mode { tun | tap }</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Defines the type of virtual network device. <b>tun</b> for Layer 3 (IP packets), or <b>tap</b> for Layer 2 (Ethernet frames). This option is mandatory for creation.<br><br><b>user <i>USER</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the owner (username or UID) of the device file (<i>/dev/net/tun</i>). This allows non-root processes to open and use the device.<br><br><b>group <i>GROUP</i></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the group owner (group name or GID) of the device file (<i>/dev/net/tun</i>). This allows processes in a specific group to open and use the device.<br><br><b>persist</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Makes the TUN/TAP device persistent. A persistent device is not destroyed when the last process closes it, remaining active until explicitly deleted. Requires <b>user</b> or <b>group</b> to be set.<br><br><b>pi { on | off }</b><br>&nbsp;&nbsp;&nbsp;&nbsp;Controls the Packet Information (PI) header. When <b>on</b> (default), a 4-byte header (flags + protocol) is prepended to each packet read. When <b>off</b>, raw IP packets or Ethernet frames are read directly.<br><br>


title: DESCRIPTION
content:
<i>ip-tuntap</i> is a sub-command of the <i>ip</i> utility, part of the <i>iproute2</i> suite, used for managing virtual network devices known as TUN (<i>Tunnel</i>) and TAP (<i>Terminal Access Point</i>) interfaces. These virtual devices are crucial for various networking applications, including Virtual Private Networks (VPNs), virtualization environments, and network emulation.<br><br>A TUN device operates at Layer 3 (the network layer), encapsulating IP packets. When data is written to a TUN device, it's typically an IP packet that the kernel then routes. Conversely, when the kernel sends an IP packet to a TUN device, it can be read by a user-space program. This makes TUN devices ideal for point-to-point connections like those used by VPN clients.<br><br>A TAP device, on the other hand, operates at Layer 2 (the data link layer), encapsulating Ethernet frames. It behaves like a real Ethernet network adapter, allowing user-space programs to send and receive raw Ethernet frames. This functionality is essential for bridging, where a virtual machine might need to appear as a physical host on the network, or for creating virtual network segments.<br><br>The <i>ip-tuntap</i> command allows administrators to create, delete, and inspect these virtual interfaces, configure their ownership, and control persistence, providing a flexible and powerful tool for building complex network setups.


title: CAVEATS
content:
Using <i>ip-tuntap</i> generally requires root privileges or appropriate capabilities (e.g., CAP_NET_ADMIN). Ensure the 'tun' kernel module is loaded (e.g., via <b>modprobe tun</b>) before attempting to create TUN/TAP devices. If the module is not loaded, device creation will fail. Device names must be unique and adhere to standard network interface naming conventions.


title: TUN VS. TAP DEVICES
content:
<b>TUN (Tunnel)</b> devices operate at the network layer (Layer 3) and handle IP packets. They are typically used for point-to-point connections where an application wants to send or receive IP packets directly, such as in VPNs. The kernel treats data from a TUN device as regular IP traffic. <br><br><b>TAP (Terminal Access Point)</b> devices operate at the data link layer (Layer 2) and handle Ethernet frames. They emulate an Ethernet adapter, allowing user-space applications to send and receive raw Ethernet frames. This makes them suitable for virtualization and bridging scenarios where a virtual machine or process needs to appear as a physical device on an Ethernet segment.


title: PERMISSIONS AND OWNERSHIP
content:
When creating a TUN/TAP device, by default, only root can interact with its associated character device file (<i>/dev/net/tun</i>). Using the <b>user</b> and <b>group</b> options allows specifying a non-root user or group that can open and operate the device. This is crucial for security and least-privilege principles, enabling applications like VPN clients to manage their own virtual interfaces without requiring global root access.


title: HISTORY
content:
The TUN/TAP driver has been a fundamental part of the Linux kernel for many years, providing the core functionality for virtual network interfaces. Initially, tools like <i>tunctl</i> were used to manage these devices. However, with the development of the <i>iproute2</i> suite, the management of TUN/TAP devices was integrated into the versatile <i>ip</i> command as the <i>ip-tuntap</i> sub-command. This integration streamlined network configuration, allowing administrators to manage most aspects of networking from a single, consistent command-line interface, aligning with the broader philosophy of <i>iproute2</i> to replace older, less flexible tools like <i>ifconfig</i> and <i>route</i>.


title: TLDR
content:
<b>Show all existing TUN/TAP devices</b>`ip [[tunt|tuntap]]`<br><b>Create a TUN device with a specific name</b>`sudo ip [[tunt|tuntap]] [[a|add]] [[d|dev]] [tun0] [[m|mode]] [[t|tun]]`<br><b>Create a TAP device with a specific name</b>`sudo ip [[tunt|tuntap]] [[a|add]] [[d|dev]] [tap0] [[m|mode]] [[ta|tap]]`<br><b>Delete a TUN or TAP device</b>`sudo ip [[tunt|tuntap]] [[d|delete]] [[d|dev]] [tun0|tap0] [[m|mode]] [tun|tap]`<br><b>Set the owner (UID) of a TUN/TAP device</b>`sudo ip [[tunt|tuntap]] [[a|add]] [[d|dev]] [tun0|tap0] [[m|mode]] [tun|tap] [[u|user]] [username]`<br><b>Set both owner (UID) and group (GID) for a TUN/TAP device</b>`sudo ip [[tunt|tuntap]] [[a|add]] [[d|dev]] [tun0|tap0] [[m|mode]] [tun|tap] [[u|user]] [username] [[g|group]] [group_name]`


title: SYNOPSIS
content:
<br><b>mhwd-kernel</b> <I>[OPTION]</I><br><b>mhwd-kernel</b> <I>-i</I>|--install <I>&lt;version&gt;</I><br><b>mhwd-kernel</b> <I>-r</I>|--remove <I>&lt;version&gt;</I><br><b>mhwd-kernel</b> <I>-l</I>|--list<br><b>mhwd-kernel</b> <I>-p</I>|--prefer <I>&lt;version&gt;</I><br><b>mhwd-kernel</b> <I>-h</I>|--help


title: PARAMETERS
content:
<b><I>-i</I>, <I>--install</I> <I>&lt;version&gt;</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Installs the specified kernel version (e.g., <I>linux515</I>). This will also install associated headers and modules.<br><br><b><I>-r</I>, <I>--remove</I> <I>&lt;version&gt;</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Removes the specified kernel version (e.g., <I>linux510</I>) and its associated packages from the system.<br><br><b><I>-l</I>, <I>--list</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Lists all installed kernel versions and indicates other available kernels that can be installed.<br><br><b><I>-p</I>, <I>--prefer</I> <I>&lt;version&gt;</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Sets the given kernel version as the preferred one for booting, ensuring it appears as the default option in the GRUB boot menu.<br><br><b><I>-h</I>, <I>--help</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays the help message, showing usage instructions and available options, then exits.<br><br>


title: DESCRIPTION
content:
<I>mhwd-kernel</I> is a command-line utility specific to Manjaro Linux for simplified management of various Linux kernel versions. It allows users to easily install, remove, and list available kernels, as well as set a preferred kernel for booting. This tool is part of the Manjaro Hardware Detection (MHWD) suite, which aims to provide an intuitive way to handle hardware drivers and kernel installations, particularly beneficial for users who need to switch between different kernel series (e.g., LTS, real-time, or bleeding-edge) for compatibility, performance, or stability reasons. It abstracts the underlying package management (<I>pacman</I>) commands, ensuring all necessary kernel components (headers, modules, etc.) are installed or removed correctly.


title: CAVEATS
content:
<ul><li><b>Manjaro Specific</b>: This command is exclusive to Manjaro Linux and its derivatives; it will not work on other distributions.</li><li><b>Root Privileges</b>: Most operations (<I>install</I>, <I>remove</I>, <I>prefer</I>) require root privileges (e.g., using <I>sudo</I>).</li><li><b>Kernel Version Format</b>: The kernel version must be specified in the <I>linuxXXX</I> format (e.g., <I>linux515</I>, <I>linux61</I>). Using incorrect formats will lead to errors.</li><li><b>System Stability</b>: Removing the currently running or the only installed kernel can render the system unbootable. Always ensure at least one stable kernel is present, preferably an LTS version.</li></ul>


title: WHY USE MHWD-KERNEL?
content:
Manjaro often provides multiple kernel series (e.g., LTS, stable, real-time) to offer users flexibility. <I>mhwd-kernel</I> simplifies switching between these for better hardware compatibility, performance tuning, or troubleshooting. For instance, an older LTS kernel might offer better stability for legacy hardware, while a newer kernel might be required for the latest hardware.


title: BOOTLOADER UPDATE
content:
After installing or removing kernels, <I>mhwd-kernel</I> usually triggers an update to the GRUB bootloader configuration automatically. However, in some rare cases, users might need to manually run <I>sudo update-grub</I> or <I>sudo grub-mkconfig -o /boot/grub/grub.cfg</I> to ensure the new kernel entries appear correctly in the boot menu.


title: HISTORY
content:
Manjaro Linux, a distribution based on Arch Linux, was founded in 2011. The <I>mhwd</I> (Manjaro Hardware Detection) suite, including <I>mhwd-kernel</I>, was developed early in Manjaro's history to simplify hardware and kernel management. It addresses a common pain point for users who found Arch's manual approach to be too complex. It provides a user-friendly abstraction layer over <I>pacman</I> and <I>mkinitcpio</I>, making it easier for Manjaro users to manage proprietary drivers and multiple kernel versions without deep knowledge of the underlying Arch Linux system. Its development has focused on enhancing user experience and system stability through automated dependency handling for kernels and graphics drivers.


title: TLDR
content:
<b>List all available kernels</b>`mhwd-kernel [[-l|--list]]`<br><b>List all installed kernels</b>`mhwd-kernel [[-li|--listinstalled]]`<br><b>Install a kernel</b>`sudo mhwd-kernel [[-i|--install]] [kernel]`<br><b>Remove a kernel</b>`sudo mhwd-kernel [[-r|--remove]] [kernel]`<br><b>Install a kernel, replacing the currently running kernel</b>`sudo mhwd-kernel [[-i|--install]] [kernel] rmc`


title: SYNOPSIS
content:
<b>oma</b> [<I>OPTIONS</I>] [<I>COMMAND</I> [<I>ARG</I>...]]<br><b>oma</b> [<I>OPTIONS</I>] (when piping input)


title: PARAMETERS
content:
<b><b>-o</b>, <b>--output</b> <I>file</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Specifies an output file to write the processed content to. If not specified, output goes to standard output.<br><br><b><b>-a</b>, <b>--append</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;When used with <b>-o</b>, appends the output to the specified file instead of overwriting it.<br><br><b><b>-p</b>, <b>--prefix</b> <I>string</I></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Adds the given <i>string</i> as a prefix to each line of the command's output.<br><br><b><b>-t</b>, <b>--timestamp</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Prepends a standard timestamp (e.g., YYYY-MM-DD HH:MM:SS) to each line of output. Cannot be used with <b>-p</b>.<br><br><b><b>-s</b>, <b>--strip-ansi</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Removes ANSI escape sequences (color codes, formatting, etc.) from the output, producing plain text.<br><br><b><b>-q</b>, <b>--quiet</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Suppresses non-error messages, showing only critical errors.<br><br><b><b>-h</b>, <b>--help</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays a concise help message and exits.<br><br><b><b>-v</b>, <b>--version</b></b><br>&nbsp;&nbsp;&nbsp;&nbsp;Displays version information and exits.<br><br>


