gitlo 1.0.0
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/LICENSE +21 -0
- package/README.md +496 -0
- package/dist/backup.js +108 -0
- package/dist/cli.js +346 -0
- package/dist/config-manager.js +79 -0
- package/dist/cron.js +177 -0
- package/dist/github.js +88 -0
- package/dist/index.js +30 -0
- package/dist/types.js +2 -0
- package/package.json +55 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const cli_js_1 = require("./cli.js");
|
|
6
|
+
const program = new commander_1.Command();
|
|
7
|
+
program
|
|
8
|
+
.name('gitlo')
|
|
9
|
+
.description('CLI tool to backup all your GitHub repositories locally')
|
|
10
|
+
.version('1.0.0');
|
|
11
|
+
// Config subcommands
|
|
12
|
+
(0, cli_js_1.createConfigCommands)(program);
|
|
13
|
+
// Schedule subcommands
|
|
14
|
+
(0, cli_js_1.createScheduleCommands)(program);
|
|
15
|
+
// Main backup command
|
|
16
|
+
program
|
|
17
|
+
.option('-t, --token <token>', 'GitHub personal access token (or set via gitlo config)')
|
|
18
|
+
.option('-o, --output-dir <dir>', 'Output directory for backups (or set via gitlo config)')
|
|
19
|
+
.option('-m, --method <method>', 'Clone method: https or ssh', 'https')
|
|
20
|
+
.option('--include-private', 'Include private repositories', true)
|
|
21
|
+
.option('--exclude-private', 'Exclude private repositories')
|
|
22
|
+
.option('--include-forks', 'Include forked repositories', false)
|
|
23
|
+
.option('--dry-run', 'Show what would be backed up without cloning')
|
|
24
|
+
.option('--update', 'Update existing repositories (git pull)', false)
|
|
25
|
+
.option('-v, --verbose', 'Show detailed progress and filtering information', false)
|
|
26
|
+
.action(async (options) => {
|
|
27
|
+
await (0, cli_js_1.runBackup)((0, cli_js_1.parseOptions)(options));
|
|
28
|
+
});
|
|
29
|
+
// Run the program
|
|
30
|
+
program.parse();
|
package/dist/types.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gitlo",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "CLI tool to backup all your GitHub repositories locally",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"gitlo": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/**/*",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"start": "node dist/index.js",
|
|
17
|
+
"dev": "ts-node src/index.ts",
|
|
18
|
+
"clean": "rm -rf dist node_modules",
|
|
19
|
+
"prepublishOnly": "pnpm run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"github",
|
|
23
|
+
"backup",
|
|
24
|
+
"cli",
|
|
25
|
+
"git"
|
|
26
|
+
],
|
|
27
|
+
"author": "Zeeshan Khan <dropocol@gmail.com>",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"homepage": "https://github.com/dropocol/gitlo#readme",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "git+https://github.com/dropocol/gitlo.git"
|
|
33
|
+
},
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/dropocol/gitlo/issues"
|
|
36
|
+
},
|
|
37
|
+
"packageManager": "pnpm@9.10.0",
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=18.0.0"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@octokit/rest": "^20.0.2",
|
|
43
|
+
"chalk": "^4.1.2",
|
|
44
|
+
"commander": "^11.1.0",
|
|
45
|
+
"conf": "^10.2.0",
|
|
46
|
+
"ora": "^5.4.1",
|
|
47
|
+
"simple-git": "^3.20.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/conf": "^3.0.0",
|
|
51
|
+
"@types/node": "^25.6.0",
|
|
52
|
+
"ts-node": "^10.9.2",
|
|
53
|
+
"typescript": "^6.0.2"
|
|
54
|
+
}
|
|
55
|
+
}
|