@@ -67,10 +67,8 @@ You can test the unpublished version of vcspull before its released.
6767
6868## Configuration
6969
70- Add your repos to ` ~/.vcspull.yaml ` .
71-
72- _ vcspull does not currently scan for repos on your system, but it may in
73- the future_
70+ Add your repos to ` ~/.vcspull.yaml ` . You can edit the file by hand or let
71+ ` vcspull import ` create entries for you.
7472
7573``` yaml
7674~/code/ :
@@ -90,8 +88,47 @@ the future_
9088more [configuration](https://vcspull.git-pull.com/configuration.html))
9189
9290` $HOME/.vcspull.yaml` and `$XDG_CONFIG_HOME/vcspull/` (`~/.config/vcspull`) can
93- be used as a declarative manifest to clone you repos consistently across
94- machines. Subsequent syncs of nitialized repos will fetch the latest commits.
91+ be used as a declarative manifest to clone your repos consistently across
92+ machines. Subsequent syncs of initialized repos will fetch the latest commits.
93+
94+ # ## Import repositories from the CLI
95+
96+ Register an existing remote without touching YAML manually :
97+
98+ ` ` ` console
99+ $ vcspull import my-lib https://github.com/example/my-lib.git --path ~/code/my-lib
100+ ` ` `
101+
102+ - Omit `--path` to default the entry under `./`.
103+ - Use `--dir` when you want to force a specific base-directory key, e.g.
104+ ` --dir ~/projects/libs` .
105+ - Pass `-c/--config` to import into an alternate YAML file.
106+ - Follow with `vcspull sync my-lib` to clone or update the working tree after registration.
107+
108+ # ## Scan local checkouts and import en masse
109+
110+ Have a directory tree full of cloned Git repositories? Scan and append them to
111+ your configuration :
112+
113+ ` ` ` console
114+ $ vcspull import --scan ~/code --recursive
115+ ` ` `
116+
117+ The scan shows each repository before import unless you opt into `--yes`. Add
118+ ` --base-dir-key ~/code/` to pin the resulting section name or `--config` to
119+ write somewhere other than the default `~/.vcspull.yaml`.
120+
121+ # ## Normalize configuration files
122+
123+ After importing or editing by hand, run the formatter to tidy up keys and keep
124+ entries sorted :
125+
126+ ` ` ` console
127+ $ vcspull fmt --config ~/.vcspull.yaml --write
128+ ` ` `
129+
130+ Use `vcspull fmt --all --write` to format every YAML file that vcspull can
131+ discover under the standard config locations.
95132
96133# # Sync your repos
97134
0 commit comments