Files
flow/example/README.md
2026-02-13 12:15:46 +02:00

72 lines
1.9 KiB
Markdown

# Example working scenario
This folder contains a complete dotfiles + bootstrap setup for the current `flow` schema.
## What this example shows
- Flat repo-root layout with reserved dirs:
- `_shared/` (shared configs)
- `_root/` (root-targeted configs)
- profile dirs (`linux-auto/`, `macos-dev/`)
- Unified YAML config under `_shared/flow/.config/flow/*.yaml`
- Profile package list syntax: string, type prefix, and object entries
- Binary install definition with `asset-pattern`, `platform-map`, `extract-dir`, and `install`
- Required env vars, templating, SSH keygen, runcmd, post-link, and config skip patterns
## Layout
- `dotfiles-repo/_shared/flow/.config/flow/config.yaml`
- `dotfiles-repo/_shared/flow/.config/flow/packages.yaml`
- `dotfiles-repo/_shared/flow/.config/flow/profiles.yaml`
- `dotfiles-repo/_shared/...`
- `dotfiles-repo/_root/...`
- `dotfiles-repo/linux-auto/...`
- `dotfiles-repo/macos-dev/...`
## Quick start
Use the absolute path to this local example repo:
```bash
EXAMPLE_REPO="/ABSOLUTE/PATH/TO/flow-cli/example/dotfiles-repo"
```
Initialize and link dotfiles:
```bash
flow dotfiles init --repo "$EXAMPLE_REPO"
flow dotfiles link --profile linux-auto
flow dotfiles status
```
Check repo commands:
```bash
flow dotfiles repo status
flow dotfiles repo pull --relink --profile linux-auto
flow dotfiles repo push
```
Edit package or file/path targets:
```bash
flow dotfiles edit git --no-commit
flow dotfiles edit _shared/flow/.config/flow/profiles.yaml --no-commit
```
Inspect bootstrap profiles and package resolution:
```bash
flow bootstrap list
flow bootstrap packages --resolved
flow bootstrap packages --profile linux-auto --resolved
flow bootstrap show linux-auto
```
Run bootstrap dry-run:
```bash
flow bootstrap run --profile linux-auto --var TARGET_HOSTNAME=devbox --var USER_EMAIL=you@example.com --dry-run
flow bootstrap run --profile macos-dev --dry-run
```