> ## Documentation Index
> Fetch the complete documentation index at: https://second.tech/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Install Bark CLI

This step-by-step tutorial will get you started with `bark`, our Ark wallet client that can be used from the command line.

Currently, `bark` only supports [signet](https://bitcoinops.org/en/topics/signet/), a bitcoin testnet.

## Installing Bark

Your wallet is called `bark` and has two installation methods:

* Download and install the binary releases
* [Compile from source](#compile-from-source)

### Binary release

Binary releases can be downloaded from
[GitLab](https://gitlab.com/ark-bitcoin/bark/-/releases).

Below are instructions to download the binary, mark it as executable, and add it to your PATH on different platforms.

<Tabs>
  <Tab title="Ubuntu/Debian">
    <Steps>
      <Step title="Download bark">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        curl -L https://gitlab.com/ark-bitcoin/bark/-/releases/bark-0.1.4/downloads/bark-0.1.4-linux-x86_64 --output bark
        ```
      </Step>

      <Step title="Mark the binary as executable">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        chmod +x bark
        ```
      </Step>

      <Step title="Add bark to your PATH">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        sudo cp bark /usr/local/bin/
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="Fedora/CentOS">
    <Steps>
      <Step title="Download bark">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        curl -L https://gitlab.com/ark-bitcoin/bark/-/releases/bark-0.1.4/downloads/bark-0.1.4-linux-x86_64 --output bark
        ```
      </Step>

      <Step title="Mark the binary as executable">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        chmod +x bark
        ```
      </Step>

      <Step title="Add bark to your PATH">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        sudo cp bark /usr/local/bin/
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="macOS">
    <Steps>
      <Step title="Download bark">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        curl -L https://gitlab.com/ark-bitcoin/bark/-/releases/bark-0.1.4/downloads/bark-0.1.4-apple-aarch64 --output bark
        ```
      </Step>

      <Step title="Mark the binary as executable">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        chmod +x bark
        ```
      </Step>

      <Step title="Add bark to your PATH">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        sudo cp bark /usr/local/bin/
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="macOS (Intel)">
    <Steps>
      <Step title="Download bark">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        curl -L https://gitlab.com/ark-bitcoin/bark/-/releases/bark-0.1.4/downloads/bark-0.1.4-apple-x86_64 --output bark
        ```
      </Step>

      <Step title="Mark the binary as executable">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        chmod +x bark
        ```
      </Step>

      <Step title="Add bark to your PATH">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        sudo cp bark /usr/local/bin/
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="Windows">
    Download bark:

    ```PowerShell theme={"theme":{"light":"github-light","dark":"github-dark"}}
    wget https://gitlab.com/ark-bitcoin/bark/-/releases/bark-0.1.4/downloads/bark-0.1.4-windows-x86_64.exe -OutFile bark.exe
    ```

    <Note>
      When using Windows, you will have to change the rest of the commands in this tutorial by replacing `bark` with `bark.exe`.
    </Note>
  </Tab>
</Tabs>

### Verify installation

Verify you have the correct version installed:

```
bark --version
```

You should see: `bark 0.1.4`

<Tip>
  **Seeing an older version?**

  If you see a different version number, you likely have an older `bark` installation from previous testing. This happens due to PATH conflicts where your system finds the old binary before the new one.

  To fix this, find where the old binary is located:

  ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
  which bark
  ```

  Then remove the outdated binary:

  ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
  sudo rm $(which bark)
  ```

  After removing the old version, verify the installation again with `bark --version`.
</Tip>

## Compile from source

<Steps>
  <Step title="Clone the repository">
    The first step is to get the code which you can clone
    from the repository.

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    git clone https://gitlab.com/ark-bitcoin/bark
    cd bark
    ```
  </Step>

  <Step title="Install Rust">
    You will also need a Rust compiler. The [rustup website](http://rustup.rs)
    offers installation instructions for almost any platform.
  </Step>

  <Step title="Install dependencies and build">
    Additional dependencies can be downloaded using your package manager.

    <Tabs>
      <Tab title="Ubuntu/Debian">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        apt update
        apt install build-essential clang protobuf-compiler
        ```
      </Tab>

      <Tab title="Fedora/CentOS">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        yum install gcc make clang protobuf-compiler
        ```
      </Tab>

      <Tab title="macOS">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        brew install gcc make llvm@14 protobuf
        ```
      </Tab>

      <Tab title="Windows">
        ```PowerShell theme={"theme":{"light":"github-light","dark":"github-dark"}}
        # TODO: Test this
        winget install protobuf ezwinports.make LLVM.LLVM
        ```
      </Tab>

      <Tab title="Nix">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        # This assumes you have enabled some experimental features in nix.
        nix develop
        ```

        You can build the code using `cargo`. The `cargo build` command will
        only build the binary. The `cargo install` command will build the
        binary and add it to your path.
      </Tab>

      <Tab title="build">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        cargo build --bin bark
        ./target/debug/bark --version
        ```
      </Tab>

      <Tab title="build and install">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        cargo install --locked --path ./bark-cli --bin bark
        bark --version
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Verify installation">
    Run `bark --version` to verify that the installation completed successfully.
  </Step>
</Steps>
