> ## Documentation Index
> Fetch the complete documentation index at: https://speakeasy-20cf8bdf.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Shorten and manage your links directly from your terminal

## Install

<Tabs>
  <Tab title="npm">
    ```bash theme={null}
    npm i -g dub-cli@latest
    ```
  </Tab>

  <Tab title="yarn">
    ```bash theme={null}
    yarn global add dub-cli@latest
    ```
  </Tab>

  <Tab title="pnpm">
    ```bash theme={null}
    pnpm i -g dub-cli@latest
    ```
  </Tab>
</Tabs>

<Info>To update an existing installation, run the same command.</Info>

## Version

Check your installed version of Dub CLI:

```bash theme={null}
dub --version
# => 0.0.12
```

## Commands

Below is a list of available commands in the Dub CLI:

<AccordionGroup>
  <Accordion title="dub login">
    Log into the Dub platform:

    ```bash theme={null}
    dub login
    ```
  </Accordion>

  <Accordion title="dub config">
    View your workspace credentials:

    ```bash theme={null}
    dub config
    ```
  </Accordion>

  <Accordion title="dub domains">
    Configure a domain for URL shortening:

    ```bash theme={null}
    dub domains
    ```
  </Accordion>

  <Accordion title="dub shorten">
    Create a short link:

    ```bash theme={null}
    dub shorten
    ```

    You can preemptively pass the URL and the generated short link key, or go through the CLI prompts.

    ```bash theme={null}
    dub shorten [url] [key]
    ```
  </Accordion>

  <Accordion title="dub links">
    Search for links in your Dub workspace:

    ```bash theme={null}
    dub links
    ```

    Here are the available options:

    | Option                  | Description                                 |
    | ----------------------- | ------------------------------------------- |
    | `-s, --search <search>` | Search by name                              |
    | `-l, --limit <limit>`   | Limit the number of results (default is 10) |

    ```bash theme={null}
    dub links [options]
    ```
  </Accordion>

  <Accordion title="dub help">
    Get help for a specific command:

    ```bash theme={null}
    dub help [command]
    ```
  </Accordion>
</AccordionGroup>

## Demo

Watch the Dub CLI in action:

<video src="https://github.com/user-attachments/assets/2ce9fe51-68ab-4e6d-b08d-4da09c17f90e" loop autoPlay muted playsInline />
