|
| 1 | +--- |
| 2 | +title: "CLI Install" |
| 3 | +permalink: /getting-started/cli-install/ |
| 4 | +sidebar: |
| 5 | + nav: "docs" |
| 6 | +--- |
| 7 | + |
| 8 | +# Install Chronos CLI |
| 9 | + |
| 10 | +Pre-built binaries are published to [GitHub Releases](https://github.com/spawn08/chronos/releases) for every tagged version. |
| 11 | + |
| 12 | +## Quick Install (Linux / macOS) |
| 13 | + |
| 14 | +```bash |
| 15 | +curl -fsSL https://raw.githubusercontent.com/spawn08/chronos/main/install.sh | bash |
| 16 | +``` |
| 17 | + |
| 18 | +This auto-detects your OS and architecture, downloads the latest release, verifies the SHA-256 checksum, and installs to `/usr/local/bin`. |
| 19 | + |
| 20 | +### Install a specific version |
| 21 | + |
| 22 | +```bash |
| 23 | +curl -fsSL https://raw.githubusercontent.com/spawn08/chronos/main/install.sh | bash -s -- v1.0.0 |
| 24 | +``` |
| 25 | + |
| 26 | +### Install to a custom directory |
| 27 | + |
| 28 | +```bash |
| 29 | +curl -fsSL https://raw.githubusercontent.com/spawn08/chronos/main/install.sh | bash -s -- --dir ~/bin |
| 30 | +``` |
| 31 | + |
| 32 | +Or set the `INSTALL_DIR` environment variable: |
| 33 | + |
| 34 | +```bash |
| 35 | +INSTALL_DIR=~/bin curl -fsSL https://raw.githubusercontent.com/spawn08/chronos/main/install.sh | bash |
| 36 | +``` |
| 37 | + |
| 38 | +## Supported Platforms |
| 39 | + |
| 40 | +| Platform | Architecture | Binary | |
| 41 | +|----------|-------------|--------| |
| 42 | +| **Linux** | x86_64 (amd64) | `chronos-linux-amd64` | |
| 43 | +| **Linux** | ARM64 | `chronos-linux-arm64` | |
| 44 | +| **macOS** | Intel (x86_64) | `chronos-darwin-amd64` | |
| 45 | +| **macOS** | Apple Silicon (M1/M2/M3/M4) | `chronos-darwin-arm64` | |
| 46 | +| **Windows** | x86_64 | `chronos-windows-amd64.exe` | |
| 47 | +| **Windows** | ARM64 | `chronos-windows-arm64.exe` | |
| 48 | + |
| 49 | +All binaries are statically linked (`CGO_ENABLED=0`) and require no external dependencies. |
| 50 | + |
| 51 | +## Manual Download |
| 52 | + |
| 53 | +Download the binary for your platform from the [latest release](https://github.com/spawn08/chronos/releases/latest): |
| 54 | + |
| 55 | +### Linux / macOS |
| 56 | + |
| 57 | +```bash |
| 58 | +# Download (replace OS and ARCH as needed) |
| 59 | +curl -fSL -o chronos.tar.gz \ |
| 60 | + https://github.com/spawn08/chronos/releases/latest/download/chronos-v0.1.0-linux-amd64.tar.gz |
| 61 | + |
| 62 | +# Extract |
| 63 | +tar xzf chronos.tar.gz |
| 64 | + |
| 65 | +# Install |
| 66 | +sudo mv chronos-linux-amd64 /usr/local/bin/chronos |
| 67 | +chmod +x /usr/local/bin/chronos |
| 68 | +``` |
| 69 | + |
| 70 | +### Windows |
| 71 | + |
| 72 | +1. Download the `.zip` from [Releases](https://github.com/spawn08/chronos/releases/latest) |
| 73 | +2. Extract `chronos-windows-amd64.exe` |
| 74 | +3. Move it to a directory in your `PATH` or add its location to `PATH` |
| 75 | + |
| 76 | +## Verify Installation |
| 77 | + |
| 78 | +```bash |
| 79 | +chronos version |
| 80 | +``` |
| 81 | + |
| 82 | +Expected output: |
| 83 | + |
| 84 | +``` |
| 85 | +chronos v0.1.0 |
| 86 | + commit: abc1234 |
| 87 | + built: 2026-03-23T00:00:00Z |
| 88 | + go: go1.24.11 |
| 89 | + os/arch: linux/amd64 |
| 90 | +``` |
| 91 | + |
| 92 | +## Verify Checksum |
| 93 | + |
| 94 | +Each release includes a `checksums-sha256.txt` file: |
| 95 | + |
| 96 | +```bash |
| 97 | +# Download checksums |
| 98 | +curl -fSL -o checksums.txt \ |
| 99 | + https://github.com/spawn08/chronos/releases/latest/download/checksums-sha256.txt |
| 100 | + |
| 101 | +# Verify |
| 102 | +sha256sum -c checksums.txt |
| 103 | +``` |
| 104 | + |
| 105 | +## Using as a Go Library |
| 106 | + |
| 107 | +If you want to use Chronos as a Go library rather than a CLI tool: |
| 108 | + |
| 109 | +```bash |
| 110 | +go get github.com/spawn08/chronos |
| 111 | +``` |
| 112 | + |
| 113 | +See the [Quickstart]({{ '/getting-started/quickstart/' | relative_url }}) for usage examples. |
| 114 | + |
| 115 | +## Build from Source |
| 116 | + |
| 117 | +```bash |
| 118 | +git clone https://github.com/spawn08/chronos.git |
| 119 | +cd chronos |
| 120 | +make build # outputs to bin/chronos |
| 121 | +``` |
| 122 | + |
| 123 | +Or directly: |
| 124 | + |
| 125 | +```bash |
| 126 | +go build -o chronos ./cli/main.go |
| 127 | +``` |
| 128 | + |
| 129 | +## Updating |
| 130 | + |
| 131 | +Re-run the install script to get the latest version: |
| 132 | + |
| 133 | +```bash |
| 134 | +curl -fsSL https://raw.githubusercontent.com/spawn08/chronos/main/install.sh | bash |
| 135 | +``` |
| 136 | + |
| 137 | +## Uninstall |
| 138 | + |
| 139 | +```bash |
| 140 | +sudo rm /usr/local/bin/chronos |
| 141 | +``` |
0 commit comments