## Stripe CLI: Samples and Serving

The Stripe CLI offers powerful tools for working with Stripe Samples, which are pre-built examples to help you integrate Stripe into your projects. You can download, build, and serve these samples directly from your command line.

### `samples create`

This command allows you to create a local copy of a Stripe Sample. You can choose the integration pattern and programming language for both the client and server. The CLI will automatically bootstrap the configuration where possible.

**Command:** `stripe samples create`

**Arguments:**

*   `[name]`: The name of the sample you want to create a local copy of.
*   `[destination_path]`: The path where the created sample will be placed.

**Flags:**

*   `--force-refresh`: Forces a refresh of the cached list of Stripe Samples.

**Examples:**

*   **Create a local copy of a sample:**
    ```sh
    stripe samples create accept-a-payment
    ```
*   **Specify a destination path:**
    ```sh
    stripe samples create accept-a-payment ./accept-a-payment-sample
    ```

### `samples list`

This command displays a list of all available Stripe Samples that can be created and bootstrapped by the CLI.

**Command:** `stripe samples list`

**Examples:**

*   **List available Stripe Samples:**
    ```sh
    stripe samples list
    ```
    ```
    A list of available Stripe Samples:
    accept-a-payment
        Learn how to accept a payment
        Repo: https://github.com/stripe-samples/accept-a-payment
    card-brand-choice
        Supporting Card Brand Choice with Stripe.
        Repo: https://github.com/stripe-samples/card-brand-choice
    charging-a-saved-card
        Learn how to charge a saved card
        Repo: https://github.com/stripe-samples/charging-a-saved-card
    ...
    ```

### `serve`

This command starts an HTTP server to serve static files. By default, it uses the current working directory. This command is particularly useful when working with Stripe Samples, allowing you to easily serve files from any local copy of a Sample.

**Command:** `stripe serve`

**Arguments:**

*   `[path]`: The path of the directory from which to serve files.

**Flags:**

*   `--port [port]`: The port the HTTP server should use.

**Examples:**

*   **Basic Usage:**
    ```sh
    stripe serve ./sales-tax-sample
    ```
    ```
    Starting
    ```