Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on:
push:
pull_request:

jobs:
check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [22, 24]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run typecheck
- run: npm test
- run: npm run build
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
dist/
coverage/
*.tsbuildinfo
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

A Node.js/TypeScript CLI (`github-backup`) that backs up every repository you can reach through the GitHub CLI (`gh`): your personal repositories and those of all organizations you belong to, with wikis and Git LFS objects. Backups go to a local directory and/or any S3-compatible bucket (AWS S3, Cloudflare R2, Backblaze B2, MinIO) as git bundle snapshots, and a new snapshot is created only when refs change.

Status: in planning. See the plan (Turkish) in [plans/README.md](plans/README.md).
Status: under development. `github-backup list` works; `backup` is not implemented yet. See the plan (Turkish) in [plans/README.md](plans/README.md).
8 changes: 8 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.15/schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"files": { "includes": ["**", "!plans", "!package-lock.json"] },
"formatter": { "indentStyle": "space", "indentWidth": 2, "lineWidth": 100 },
"linter": { "enabled": true, "rules": { "preset": "recommended" } },
"assist": { "actions": { "source": { "organizeImports": "on" } } }
}
31 changes: 31 additions & 0 deletions config.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"cacheDir": "~/.cache/github-backup-cli",
"concurrency": 4,
"wiki": true,
"lfs": true,
"keep": 7,
"sources": [
{
"type": "github",
"include": ["*/*"],
"exclude": [],
"archived": true,
"forks": true
}
],
"targets": [
{ "type": "local", "name": "disk", "path": "/backups/git" },
{
"type": "s3",
"name": "r2",
"bucket": "my-backups",
"prefix": "git",
"endpoint": "https://ACCOUNT_ID.r2.cloudflarestorage.com",
"region": "auto",
"forcePathStyle": false,
"accessKeyId": "YOUR_ACCESS_KEY_ID",
"secretAccessKey": "YOUR_SECRET_ACCESS_KEY",
"keep": 14
}
]
}
Loading
Loading