# 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 Functionality

### Authentication and Configuration

*   **`stripe login`**: Connects the CLI to your Stripe account, persisting your secret key locally. 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, including setting, unsetting, listing, and editing configuration files.
*   **API Keys**: Explains the different ways to use Stripe API keys with the CLI, including `stripe login`, `stripe config`, the `--api-key` flag, and environment variables.

### General Commands

*   **`stripe version`**: Displays the current version of the Stripe CLI and checks for available updates.
*   **`stripe help`**: Provides help documentation for any command in the CLI, including supported flags and arguments.
*   **`stripe completion`**: Enables shell autocompletion for Bash and ZSH on macOS and Linux to enhance command-line usability.
*   **`stripe feedback`**: Provides information on how to offer feedback for the Stripe CLI through GitHub issues and a dedicated feedback form.

### Resources and API Interaction

*   **`stripe resources`**: Allows interaction with Stripe API resources using resource commands. It supports operations like create, delete, list, and retrieve, with examples for managing resources.
*   **`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 Samples

*   **`stripe samples create`**: Downloads and creates a local copy of Stripe Samples, which are complete examples for various integration patterns and languages.
*   **`stripe samples list`**: Lists all 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.

## Advanced Features

### Global Flags

*   The Stripe CLI supports several global flags that can be used with most commands, including `--api-key`, `--color`, `--config`, `--device-name`, `-h`/`--help`, `--log-level`, `-p`/`--project-name`, and `-v`/`--version`.

### Stripe Terminal

*   **`stripe terminal quickstart`**: Guides users through setting up Stripe Terminal with the Verifone P400 reader.

### Docker Integration

*   **`stripe docker`**: Provides instructions on how to use the Stripe CLI within a Docker container, including environment variable configurations and alternatives to `stripe login`.

### Telemetry

*   **`stripe telemetry`**: Explains 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

*   **`stripe license`**: Provides information about the Stripe CLI's license (Apache License 2.0) and its ownership on GitHub.