| `--src-token` | `$SRC_TOKEN` | GitLab source token (_optional_ if source GitLab group and sub projects have `public` visibility) |
| `--src-sync-path` | `$SRC_SYNC_PATH` | GitLab source root group path to synchronize (**mandatory**) |
@@ -58,16 +74,32 @@ options:
| `--dest-token` | `$DEST_TOKEN` | GitLab destination token with at least scopes `api,read_repository,write_repository` and `Owner` role (**mandatory**) |
| `--dest-sync-path` | `$DEST_SYNC_PATH` | GitLab destination root group path to synchronize (defaults to `--src-sync-path`) |
| `--max-visibility` | `$MAX_VISIBILITY` | maximum visibility of projects in destination group (defaults to `public`) |
| `--exclude` | `$EXCLUDE` | project/group path(s) to exclude (multiple CLI option; env. variable is a coma separated list) |
| `--skip-visibility` | `$SKIP_VISIBILITY` | skip updating the destination group or project visibility (when it exists already) |
| `--exclude` | `$EXCLUDE` | project/group path(s) to exclude (multiple CLI option; env. variable is a coma separated list; wins over `--include`) |
| `--exclude-from` | `$EXCLUDE_FROM` | a file which lists paths to exclude (one per line); incompatible with `--exclude` / `$EXCLUDE` |
| `--include` | `$INCLUDE` | project/group path(s) to include (multiple CLI option; env. var. is coma separated; all paths included by default) |
| `--include-from` | `$INCLUDE_FROM` | a file which lists paths to include (one per line); incompatible with `--include` / `$INCLUDE` |
| `--dry-run` | _none_ | dry run (don't execute any write action) |
| `--halt-on-error` | _none_ | halt synchronizing when an error occurs |
| `--new-group-options` | `$NEW_GROUP_OPTIONS` | a JSON string with extra options for groups creation (no default value) |
| `--new-group-options-from` | `$NEW_GROUP_OPTIONS_FROM` | a JSON file with extra options for groups creation; incompatible with --new-group-options |
| `--new-project-options` | `$NEW_PROJECT_OPTIONS` | a JSON string with extra options for projects creation (default value disables issues and MR, *see below*) |
| `--new-project-options-from` | `$NEW_PROJECT_OPTIONS_FROM` | a JSON file with extra options for projects creation; incompatible with --new-project-options |
| `--dry-run` | `$DRY_RUN` | dry run (don't execute any write action) |
| `--halt-on-error` | `$HALT_ON_ERROR` | halt synchronizing when an error occurs |
| `--cache-dir` | `$CACHE_DIR` | cache directory (used to download resources such as images and Git repositories) (defaults to `.work`) |
Default options for creating new projects:
```json
{
"issues_access_level":"disabled",
"merge_requests_access_level":"disabled"
}
```
## Developers
`gitlab-cp` is implemented in Python and relies on [Poetry](https://python-poetry.org/) for its packaging and dependency management.