github.com/igoogolx/clash@v1.19.8/docs/introduction/getting-started.md (about)

     1  ---
     2  sidebarTitle: Getting Started
     3  sidebarOrder: 2
     4  ---
     5  
     6  # Getting Started
     7  
     8  To get started with Clash, you can either build it from source or download pre-built binaries.
     9  
    10  ## Using pre-built binaries
    11  
    12  You can download Clash core binaries here: [https://github.com/Dreamacro/clash/releases](https://github.com/Dreamacro/clash/releases)
    13  
    14  ## Install from source
    15  
    16  You can build Clash on your own device with Golang 1.19+:
    17  
    18  ```shell
    19  $ go install github.com/Dreamacro/clash@latest
    20  go: downloading github.com/Dreamacro/clash v1.15.1
    21  ```
    22  
    23  The binary is built under `$GOPATH/bin`:
    24  
    25  ```shell
    26  $ $GOPATH/bin/clash -v
    27  Clash unknown version darwin arm64 with go1.20.3 unknown time
    28  ```
    29  
    30  ## Build for a different arch/os
    31  
    32  Golang supports cross-compilation, so you can build for a device on a different architecture or operating system. You can use _make_ to build them easily - for example:
    33  
    34  ```shell
    35  $ git clone --depth 1 https://github.com/Dreamacro/clash
    36  Cloning into 'clash'...
    37  remote: Enumerating objects: 359, done.
    38  remote: Counting objects: 100% (359/359), done.
    39  remote: Compressing objects: 100% (325/325), done.
    40  remote: Total 359 (delta 25), reused 232 (delta 17), pack-reused 0
    41  Receiving objects: 100% (359/359), 248.99 KiB | 1.63 MiB/s, done.
    42  Resolving deltas: 100% (25/25), done.
    43  $ cd clash && make darwin-arm64
    44  fatal: No names found, cannot describe anything.
    45  GOARCH=arm64 GOOS=darwin CGO_ENABLED=0 go build -trimpath -ldflags '-X "github.com/Dreamacro/clash/constant.Version=unknown version" -X "github.com/Dreamacro/clash/constant.BuildTime=Mon May  8 16:47:10 UTC 2023" -w -s -buildid=' -o bin/clash-darwin-arm64
    46  $ file bin/clash-darwin-arm64
    47  bin/clash-darwin-arm64: Mach-O 64-bit executable arm64
    48  ```
    49  
    50  For other build targets, check out the [Makefile](https://github.com/Dreamacro/clash/blob/master/Makefile).