## Stripe CLI Documentation

This documentation outlines the various commands and functionalities of the Stripe Command Line Interface (CLI). The Stripe CLI is a powerful tool that allows developers to interact with the Stripe API directly from their terminal, streamlining the process of building, testing, and managing Stripe integrations.

### Core Commands

*   **`stripe login`**: Connects the CLI to your Stripe account, persisting your secret key locally for easier command execution. It supports interactive login and project-specific configurations.
*   **`stripe logout`**: Removes credentials that connect the CLI to your Stripe account, with options to log out of specific projects or all projects.
*   **`stripe config`**: Manages CLI configuration options, allowing you to set, unset, list, and edit configuration settings, including project-specific configurations.
*   **`stripe api-keys`**: (Referenced indirectly through `stripe login` and `stripe config`) Discusses different methods for using Stripe API keys with the CLI, including `stripe login`, `stripe config`, the `--api-key` flag, and environment variables.
*   **`stripe fixtures`**: Enables the use of JSON files to issue a series of API requests, useful for generating sample data, executing flows, and testing API behavior.
*   **`stripe completion`**: Sets up shell autocompletion for Bash and ZSH on macOS and Linux, simplifying command usage.
*   **`stripe help`**: Provides help documentation for any command in the CLI, including supported flags and arguments.
*   **`stripe version`**: Displays the current version of the Stripe CLI and checks for available software updates.
*   **`stripe feedback`**: Provides information on how to submit feedback for the Stripe CLI through GitHub issues and a dedicated feedback form.

### Resources and API Interaction

*   **`stripe resources`**: (Also referred to as "Resources & HTTP commands") Allows interaction with Stripe API resources through resource commands and HTTP commands.
    *   **Resource Commands**: Directly manage API resources with specific arguments and flags.
    *   **HTTP Commands**: Provide shorthand for HTTP requests to the Stripe API.
*   **`stripe {resource command}`**: The general syntax for interacting with specific API resources (e.g., `stripe customers create`). Supports operations like `create`, `delete`, `list`, and `retrieve`, along with flags for parameters and data.

### Samples and Development Tools

*   **`stripe samples`**: Facilitates the use of Stripe Samples, which are complete examples for new Stripe integrations.
    *   **`stripe samples create`**: Downloads and creates a local copy of a sample, allowing you to choose the integration pattern and programming language.
    *   **`stripe samples list`**: Lists available Stripe Samples that can be created and bootstrapped by the CLI.
*   **`stripe serve`**: Starts an HTTP server to serve static files, useful for working with Stripe Samples locally.
*   **`stripe terminal quickstart`**: Guides you through setting up Stripe Terminal with the Verifone P400 reader.

### Advanced Information

*   **Global Flags**: Details common flags applicable to most Stripe CLI commands, such as `--api-key`, `--color`, `--config`, `--device-name`, `--help`, `--log-level`, `--project-name`, and `--version`.
*   **Using with Docker**: Explains how to run the Stripe CLI within a Docker container, including environment variable configurations and the use of the `--api-key` flag.
*   **Telemetry**: Describes the CLI's telemetry feature, which collects usage data to improve the developer experience. It details what data is collected, what is not, why it's collected, and how to opt out.
*   **License**: Provides information about the Stripe CLI's license (Apache License 2.0) and its ownership on GitHub.