@cj-ways/orgclone 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +69 -39
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,89 +1,119 @@
1
1
  # orgclone
2
2
 
3
- > Clone entire GitHub organizations or GitLab groups with one command.
3
+ Clone entire GitHub organizations or GitLab groups with one command.
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@cj-ways/orgclone)](https://www.npmjs.com/package/@cj-ways/orgclone)
6
6
  [![license](https://img.shields.io/github/license/cj-ways/orgclone)](https://github.com/cj-ways/orgclone/blob/master/LICENSE)
7
7
 
8
- ## Install
9
-
10
8
  ```bash
11
9
  npm install -g @cj-ways/orgclone
12
10
  ```
13
11
 
14
- ## Usage
12
+ ---
13
+
14
+ ## Quick Start
15
15
 
16
16
  ```bash
17
- # Clone all repos from a GitHub organization
17
+ # Clone a GitHub org (uses your existing git auth automatically)
18
18
  orgclone clone github my-org
19
19
 
20
- # Clone all repos from a GitLab group
21
- orgclone clone gitlab my-group --token glpat_xxx
20
+ # Clone a GitLab group
21
+ orgclone clone gitlab my-group
22
22
 
23
- # Clone private repos using a token
24
- orgclone clone github my-org --token ghp_xxx
23
+ # Preview what would be cloned
24
+ orgclone clone github my-org --dry-run
25
+ ```
25
26
 
26
- # Or use environment variables
27
- export GITHUB_TOKEN=ghp_xxx
28
- orgclone clone github my-org
27
+ Repos land in `~/Desktop/my-org/` by default. Run it again on the same folder and it `git pull`s everything — no re-cloning.
29
28
 
30
- # Preview without cloning
31
- orgclone clone github my-org --dry-run
29
+ ---
32
30
 
33
- # Skip archived repos
34
- orgclone clone github my-org --skip-archived
31
+ ## Install
35
32
 
36
- # Exclude specific repos
37
- orgclone clone github my-org --exclude old-repo,test-project
33
+ | Method | Command |
34
+ |--------|---------|
35
+ | **npm** | `npm install -g @cj-ways/orgclone` |
36
+ | **pip** | `pip install orgclone` |
37
+ | **Go** | `go install github.com/cj-ways/orgclone@latest` |
38
+ | **Binary** | [Download from Releases](https://github.com/cj-ways/orgclone/releases) |
38
39
 
39
- # Custom destination folder
40
- orgclone clone github my-org --dest ~/projects/my-org
40
+ ---
41
41
 
42
- # Self-hosted GitLab
43
- orgclone clone gitlab my-group --gitlab-url https://gitlab.mycompany.com
42
+ ## All Options
44
43
 
45
- # Force SSH URLs
46
- orgclone clone github my-org --ssh
47
44
  ```
45
+ orgclone clone <platform> <name> [options]
46
+
47
+ platform github or gitlab
48
+ name org name (GitHub) or group path (GitLab)
49
+
50
+ Options:
51
+ -t, --token API token — or set GITHUB_TOKEN / GITLAB_TOKEN env var
52
+ -d, --dest Destination folder (default: ~/Desktop/<name>)
53
+ -e, --exclude Comma-separated repo names to skip
54
+ --skip-archived Skip archived repositories
55
+ --ssh Use SSH URLs instead of HTTPS
56
+ --gitlab-url Self-hosted GitLab URL (default: https://gitlab.com)
57
+ --dry-run List repos without cloning
58
+ ```
59
+
60
+ ---
61
+
62
+ ## No token? No problem
63
+
64
+ For **public repos**, no token needed — orgclone calls `git clone` the same way you would manually. If you already have SSH keys or a credential manager set up (you can `git push` without a password), **private repos work too** with no extra config.
65
+
66
+ A token only adds value when you want auth to work automatically on a fresh machine or in CI.
48
67
 
49
- Running it again on an already-cloned folder will `git pull` all repos to keep them up to date.
68
+ ---
50
69
 
51
- ## Works without a token
70
+ ## Why orgclone over alternatives?
52
71
 
53
- For **public repos**, no token is needed — orgclone uses plain `git clone` under the hood. If you're already authenticated via SSH keys or your system credential manager, private repos work too. A token embeds auth into the URL so git never prompts you.
72
+ | Feature | orgclone | others |
73
+ |---------|----------|--------|
74
+ | GitHub support | ✓ | ✓ |
75
+ | GitLab support | ✓ | ✗ |
76
+ | Self-hosted GitLab | ✓ | ✗ |
77
+ | Auto-update on re-run | ✓ | some |
78
+ | Config file | ✓ | ✗ |
79
+ | Dry run | ✓ | ✗ |
80
+ | Skip archived | ✓ | ✗ |
81
+ | npm + pip + Go install | ✓ | ✗ |
82
+ | No runtime dependency | ✓ (single binary) | ✗ |
83
+
84
+ ---
54
85
 
55
86
  ## Config file
56
87
 
57
- Run `orgclone init` to create `~/.orgclone.yml`:
88
+ Run `orgclone init` to generate `~/.orgclone.yml`:
58
89
 
59
90
  ```yaml
60
91
  default_dest: ~/Desktop
61
92
 
62
93
  github:
63
- token: ghp_xxx # or set GITHUB_TOKEN env var
94
+ token: ghp_xxx # or: export GITHUB_TOKEN=ghp_xxx
64
95
 
65
96
  gitlab:
66
97
  token: glpat_xxx
67
- url: https://gitlab.com
98
+ url: https://gitlab.com # change for self-hosted
68
99
 
69
100
  orgs:
70
101
  my-org:
71
102
  exclude:
72
103
  - old-repo
73
- - legacy-stuff
104
+ - scratch
74
105
  ```
75
106
 
76
- ## All install methods
107
+ CLI flags always override config file values.
77
108
 
78
- | Method | Command |
79
- |--------|---------|
80
- | npm | `npm install -g @cj-ways/orgclone` |
81
- | pip | `pip install orgclone` |
82
- | go | `go install github.com/cj-ways/orgclone@latest` |
83
- | binary | [Download from Releases](https://github.com/cj-ways/orgclone/releases) |
109
+ ---
84
110
 
85
111
  ## Links
86
112
 
87
113
  - [GitHub Repository](https://github.com/cj-ways/orgclone)
88
114
  - [Report an Issue](https://github.com/cj-ways/orgclone/issues)
89
- - [Releases](https://github.com/cj-ways/orgclone/releases)
115
+ - [Releases & Binaries](https://github.com/cj-ways/orgclone/releases)
116
+
117
+ ## License
118
+
119
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cj-ways/orgclone",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Clone entire GitHub organizations or GitLab groups with one command. Supports public and private repos, SSH, token auth, and config files.",
5
5
  "license": "MIT",
6
6
  "author": "cj-ways",