github-archiver 1.0.2 → 1.0.5
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.
- package/.releaserc.json +9 -1
- package/CHANGELOG.md +25 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +2 -2
- package/package.json +6 -2
- package/.claude/CLAUDE.md +0 -248
- package/.claude/settings.json +0 -15
- package/.github/dependabot.yml +0 -76
- package/.github/workflows/ci.yml +0 -64
- package/.github/workflows/release.yml +0 -55
- package/AGENTS.md +0 -248
- package/CONTRIBUTING.md +0 -343
- package/QUICKSTART.md +0 -221
- package/bun.lock +0 -1380
- package/issues.txt +0 -1105
- package/notes.md +0 -0
- package/scripts/build.ts +0 -14
- package/src/commands/archive.ts +0 -344
- package/src/commands/auth.ts +0 -184
- package/src/constants/defaults.ts +0 -6
- package/src/constants/messages.ts +0 -24
- package/src/constants/paths.ts +0 -12
- package/src/index.ts +0 -42
- package/src/services/archiver.ts +0 -192
- package/src/services/auth-manager.ts +0 -79
- package/src/services/github.ts +0 -211
- package/src/types/config.ts +0 -24
- package/src/types/error.ts +0 -35
- package/src/types/github.ts +0 -34
- package/src/types/index.ts +0 -4
- package/src/utils/colors.ts +0 -79
- package/src/utils/config.ts +0 -95
- package/src/utils/errors.ts +0 -93
- package/src/utils/formatting.ts +0 -65
- package/src/utils/input-handler.ts +0 -163
- package/src/utils/logger.ts +0 -65
- package/src/utils/parser.ts +0 -125
- package/src/utils/progress.ts +0 -87
- package/tests/unit/formatting.test.ts +0 -93
- package/tests/unit/parser.test.ts +0 -140
- package/tsconfig.json +0 -36
package/QUICKSTART.md
DELETED
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
# Quick Start Guide
|
|
2
|
-
|
|
3
|
-
Get up and running with GitHub Archiver in 5 minutes.
|
|
4
|
-
|
|
5
|
-
## Step 1: Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install -g github-archiver
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Or for development:
|
|
12
|
-
```bash
|
|
13
|
-
git clone https://github.com/mynameistito/github-archiver.git
|
|
14
|
-
cd github-archiver
|
|
15
|
-
npm install
|
|
16
|
-
npm run build
|
|
17
|
-
npm run dev -- <command>
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Step 2: Get a GitHub Token
|
|
21
|
-
|
|
22
|
-
1. Go to https://github.com/settings/tokens/new
|
|
23
|
-
2. Create a new token with `repo` scope
|
|
24
|
-
3. Copy the token (you'll need it in the next step)
|
|
25
|
-
|
|
26
|
-
## Step 3: Authenticate
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
github-archiver auth login
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Paste your token when prompted. It's saved securely in `~/.github-archiver/config.json`.
|
|
33
|
-
|
|
34
|
-
## Step 4: Archive Repositories
|
|
35
|
-
|
|
36
|
-
### Option A: Interactive (Recommended)
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
github-archiver archive
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Your default text editor opens. Enter repository URLs (one per line), save, and exit.
|
|
43
|
-
|
|
44
|
-
Supported formats:
|
|
45
|
-
```
|
|
46
|
-
https://github.com/facebook/react
|
|
47
|
-
torvalds/linux
|
|
48
|
-
git@github.com:owner/repo.git
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Option B: From File
|
|
52
|
-
|
|
53
|
-
Create a file `repos.txt`:
|
|
54
|
-
```
|
|
55
|
-
facebook/react
|
|
56
|
-
torvalds/linux
|
|
57
|
-
google/go
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Run:
|
|
61
|
-
```bash
|
|
62
|
-
github-archiver archive --file repos.txt
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### Option C: From Stdin
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
cat repos.txt | github-archiver archive --stdin
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Step 5: Confirm and Watch
|
|
72
|
-
|
|
73
|
-
You'll see a preview of repositories to archive. Confirm with `y` and watch the progress:
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
[============================ ] 5/5 (100%) - microsoft/vscode
|
|
77
|
-
|
|
78
|
-
╔════════════════════════════════════╗
|
|
79
|
-
║ Archive Operation Summary ║
|
|
80
|
-
╠════════════════════════════════════╣
|
|
81
|
-
║ ✅ Successful: 5 ║
|
|
82
|
-
║ ⚠️ Skipped: 0 ║
|
|
83
|
-
║ ❌ Failed: 0 ║
|
|
84
|
-
╠════════════════════════════════════╣
|
|
85
|
-
║ Total: 5 ║
|
|
86
|
-
║ Duration: 1m 23s ║
|
|
87
|
-
╚════════════════════════════════════╝
|
|
88
|
-
|
|
89
|
-
✅ All repositories processed successfully!
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Common Tasks
|
|
93
|
-
|
|
94
|
-
### Check Your Authentication
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
github-archiver auth status
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### Dry Run (Don't Actually Archive)
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
github-archiver archive --file repos.txt --dry-run
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### Speed Up Processing (More Parallel Jobs)
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
github-archiver archive --file repos.txt --concurrency 10
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Skip Confirmation Prompt
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
github-archiver archive --file repos.txt --force
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Verbose Output
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
github-archiver archive --file repos.txt --verbose
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### Logout
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
github-archiver auth logout
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Troubleshooting
|
|
131
|
-
|
|
132
|
-
### "No GitHub token found"
|
|
133
|
-
```bash
|
|
134
|
-
github-archiver auth login
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### "Permission denied"
|
|
138
|
-
- Make sure you're the repository owner
|
|
139
|
-
- Check your token has `repo` scope at https://github.com/settings/tokens
|
|
140
|
-
|
|
141
|
-
### "Repository not found"
|
|
142
|
-
- Verify the repository URL is correct
|
|
143
|
-
- Check you have access to the repository
|
|
144
|
-
|
|
145
|
-
### "Rate limit exceeded"
|
|
146
|
-
- Wait a few minutes (GitHub rate limit resets hourly)
|
|
147
|
-
- Use lower concurrency: `--concurrency 1`
|
|
148
|
-
|
|
149
|
-
### Need help?
|
|
150
|
-
- See detailed documentation in README.md
|
|
151
|
-
- Check the troubleshooting section
|
|
152
|
-
- Open an issue at https://github.com/mynameistito/github-archiver/issues
|
|
153
|
-
|
|
154
|
-
## What's Next?
|
|
155
|
-
|
|
156
|
-
- Read the full README.md for all options
|
|
157
|
-
- Check CONTRIBUTING.md to help improve the project
|
|
158
|
-
- Review CHANGELOG.md to see what's new
|
|
159
|
-
- Explore the source code in the `src/` directory
|
|
160
|
-
|
|
161
|
-
## Examples
|
|
162
|
-
|
|
163
|
-
### Archive all repos in a file
|
|
164
|
-
```bash
|
|
165
|
-
github-archiver archive --file my-repos.txt --force
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### Validate first without archiving
|
|
169
|
-
```bash
|
|
170
|
-
github-archiver archive --file my-repos.txt --dry-run
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
### Fast mode (10 parallel jobs)
|
|
174
|
-
```bash
|
|
175
|
-
github-archiver archive --file my-repos.txt --concurrency 10 --force
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### From echo command
|
|
179
|
-
```bash
|
|
180
|
-
echo -e "facebook/react\ntorvalds/linux\nmicrosoft/vscode" | github-archiver archive --stdin --force
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
## File Format Example
|
|
184
|
-
|
|
185
|
-
`repos.txt`:
|
|
186
|
-
```
|
|
187
|
-
# Archive these repositories
|
|
188
|
-
https://github.com/facebook/react
|
|
189
|
-
https://github.com/torvalds/linux.git
|
|
190
|
-
|
|
191
|
-
# You can also use shorthand
|
|
192
|
-
google/go
|
|
193
|
-
microsoft/vscode
|
|
194
|
-
|
|
195
|
-
# SSH format works too
|
|
196
|
-
git@github.com:owner/private-repo.git
|
|
197
|
-
|
|
198
|
-
# Empty lines and comments are ignored
|
|
199
|
-
# The following has invalid format and will be skipped
|
|
200
|
-
this-is-invalid-!!!
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
## Notes
|
|
204
|
-
|
|
205
|
-
- Archived repositories are read-only
|
|
206
|
-
- Collaborators can still see archived repos (they just can't push)
|
|
207
|
-
- You can unarchive repositories anytime in GitHub
|
|
208
|
-
- The CLI doesn't delete repositories, only archives them
|
|
209
|
-
- Logs are saved to `~/.github-archiver/logs/`
|
|
210
|
-
|
|
211
|
-
## Tips
|
|
212
|
-
|
|
213
|
-
1. **Start small**: Test with 2-3 repositories first
|
|
214
|
-
2. **Use dry-run**: Always validate with `--dry-run` if you're unsure
|
|
215
|
-
3. **Save your list**: Keep your repos.txt file for reference
|
|
216
|
-
4. **Check permissions**: Verify you have push access before running
|
|
217
|
-
5. **Monitor progress**: Watch the progress bar and ETA
|
|
218
|
-
|
|
219
|
-
---
|
|
220
|
-
|
|
221
|
-
Happy archiving! 🎉
|