1 {/* AUTO-GENERATED — do not edit. Synced by scripts/sync-developer-docs.mjs from docs/cli-install.md (smbcloud-cli, main). */}
2
3 # Native Installation
4
5 import { Callout } from 'nextra/components'
6
7 <Callout type="info">
8 Synced from [`docs/cli-install.md`](https://github.com/smbcloudXYZ/smbcloud-cli/blob/main/docs/cli-install.md) on the `main` branch of
9 [smbcloud-cli](https://github.com/smbcloudXYZ/smbcloud-cli). Edit it there.
10 </Callout>
11
12 Install directly from [crates.io](https://crates.io/crates/smbcloud-cli) using Cargo.
13
14 ## Prerequisites
15
16 - [Rust](https://rustup.rs) (stable toolchain)
17 - `CLI_CLIENT_SECRET` — required at compile time
18
19 The `CLI_CLIENT_SECRET` value is baked into the binary at compile time. Contact [hej@setoelkahfi.se](mailto:hej@setoelkahfi.se) or check your smbCloud account dashboard to obtain it.
20
21 ## Install
22
23 Export the secret, then install:
24
25 ```bash
26 export CLI_CLIENT_SECRET=your_secret_here
27 cargo install smbcloud-cli
28 ```
29
30 ## Verify
31
32 ```bash
33 smb --version
34 ```
35
36 ## Upgrade
37
38 ```bash
39 export CLI_CLIENT_SECRET=your_secret_here
40 cargo install smbcloud-cli --force
41 ```
42
43 ## Uninstall
44
45 ```bash
46 cargo uninstall smbcloud-cli
47 ```
48
49 ## Troubleshooting
50
51 **`error: proc-macro derive panicked … Error loading .env file`**
52
53 This error appears on older versions of `smbcloud-cli` (before `0.3.37`). Upgrade to the latest version — it reads `CLI_CLIENT_SECRET` directly from the environment at compile time and no longer requires a `.env` file.
54
55 **`error[E0463]: can't find crate for std`**
56
57 Your Rust toolchain is missing the target. Run:
58
59 ```bash
60 rustup target add <target>
61 ```