Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita2265f0

Browse files
committed
README.md(docs[cli]): Document import and fmt workflows
why: Surface the new CLI import and formatting flows introduced with scanner-and-add work.what:- add manual import example with key flags and follow-up sync guidance- describe filesystem scans using vcspull import --scan and related options- outline running vcspull fmt to normalize configuration files post-import
1 parent5628187 commita2265f0

File tree

1 file changed

+43
-6
lines changed

1 file changed

+43
-6
lines changed

‎README.md‎

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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_
9088
more [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

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp