Skip to content

Commit 4eafcd6

Browse files
committed
update docs
1 parent 760f0f9 commit 4eafcd6

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Remote Config & Sync
2+
3+
cutler features a simple built-in remote sync logic. For example, if you want to apply a config from a given URL without placing it manually on your machine, simply use the following command:
4+
5+
```sh
6+
cutler apply --url https://example.com/config.toml
7+
```
8+
9+
cutler will then download and validate the config file, and if all looks good, it will be loaded to be applied.
10+
11+
You can also use this functionality on your "existing" configurations, by utilizing the `[remote]` table:
12+
13+
```toml
14+
[remote]
15+
url = "https://example.com/config.toml"
16+
autosync = true
17+
```
18+
19+
Here, the `autosync` flag will ensure that the next time you run any command except the [disabled commands](#disabled-commands), it will automatically fetch the config file beforehand from the provided remote.
20+
21+
Or, you can simply fetch from the config URL written in `[remote]` manually using the `fetch` command:
22+
23+
```sh
24+
cutler fetch
25+
```
26+
27+
In order to disable remote sync behavior while running any command, use the `--no-sync` global flag:
28+
29+
```sh
30+
cutler status --no-sync
31+
```
32+
33+
## Disabled Commands
34+
35+
Some commands will not respect `autosync = true` and therefore NOT synchronize the config automatically:
36+
37+
- `fetch`
38+
- `brew backup`
39+
- `self-update`
40+
- `check-update`
41+
- `cookbook`
42+
- `completion`
43+
- `init`
44+
- `reset`
45+
- `config`

0 commit comments

Comments
 (0)