git-push-time 1.1.0 → 1.1.2

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/bin/index.js CHANGED
@@ -1,291 +1,339 @@
1
- #!/usr/bin/env node
2
-
3
- import { Command } from 'commander';
4
- import { select } from '@inquirer/prompts';
5
- import { checkGitInstalled, getCurrentBranch } from '../lib/git.js';
6
- import { getCurrentGitHubUser } from '../lib/github.js';
7
- import { runPushWizard } from '../lib/commands/push.js';
8
- import { runPullCommand } from '../lib/commands/pull.js';
9
- import { runEditCommitTimeCommand } from '../lib/commands/edit-time.js';
10
- import { runFixCommand } from '../lib/commands/fix.js';
11
- import {
12
- runGitHubMenu,
13
- showGitHubStatus,
14
- promptCreateRepo,
15
- showUserRepos,
16
- promptGitHubLogin,
17
- logoutGitHub
18
- } from '../lib/commands/github.js';
19
- import { promptContinueOrBack } from '../lib/prompt-helpers.js';
20
- import {
21
- printBanner,
22
- printDashboardStatus,
23
- printSection,
24
- printGitMissing,
25
- printCancelled,
26
- styleCliHelp
27
- } from '../lib/ui.js';
28
-
29
- const VERSION = '1.1.0';
30
-
31
- /**
32
- * Kiểm tra xem lệnh có được gọi "trần" (không flag/subcommand nào) hay không.
33
- */
34
- function isBareInvocation(options = {}) {
35
- return (
36
- !options.repo &&
37
- !options.message &&
38
- !options.date &&
39
- !options.branch &&
40
- !options.dir &&
41
- !options.force &&
42
- !options.fix
43
- );
44
- }
45
-
46
- /**
47
- * Menu chính khi chạy `git-push-time` không truyền flag
48
- */
49
- async function promptMainMenu() {
50
- printSection('BẢNG ĐIỀU KHIỂN CHÍNH');
51
- return await select({
52
- message: 'Bạn muốn thực hiện thao tác nào?',
53
- pageSize: 10,
54
- choices: [
55
- {
56
- name: '» [PUSH] | Đẩy code lên Git (kèm chọn folder, backdate & chống lộ secret)',
57
- value: 'push',
58
- description: 'Đẩy dự án lên remote repository hiện tại hoặc mới'
59
- },
60
- {
61
- name: '» [GITHUB] | Quản lý GitHub & Tạo repository mới',
62
- value: 'github',
63
- description: 'Tạo repo mới trên GitHub, xem profile, chọn repo nhanh'
64
- },
65
- {
66
- name: '» [PULL] | Cập nhật code mới về máy',
67
- value: 'pull',
68
- description: 'git pull --ff-only hoặc --rebase từ remote'
69
- },
70
- {
71
- name: '» [TIME] | Sửa thời gian commit lịch sử',
72
- value: 'edit-time',
73
- description: 'Đổi Author/Committer Date của commit trong quá khứ'
74
- },
75
- {
76
- name: '» [FIX] | Quét & gỡ sạch secret khỏi repo',
77
- value: 'fix',
78
- description: 'Quét file nhạy cảm, gỡ khỏi stage và squash commit'
79
- },
80
- {
81
- name: 'x [THOÁT] | Kết thúc chương trình',
82
- value: 'exit',
83
- description: 'Thoát ứng dụng'
84
- }
85
- ]
86
- });
87
- }
88
-
89
- /**
90
- * Vòng lặp Menu chính
91
- */
92
- async function runMainMenuLoop(initialOptions = {}) {
93
- while (true) {
94
- const cwd = process.cwd();
95
- const branch = getCurrentBranch(cwd);
96
- const ghStatus = await getCurrentGitHubUser();
97
-
98
- printDashboardStatus({
99
- targetDir: cwd,
100
- currentBranch: branch,
101
- githubUser: ghStatus.authenticated ? ghStatus.user : null
102
- });
103
-
104
- const action = await promptMainMenu();
105
-
106
- if (action === 'exit') {
107
- printCancelled();
108
- process.exit(0);
109
- }
110
-
111
- if (action === 'push') {
112
- await runPushWizard(initialOptions, async () => {
113
- // Callback quay lại menu chính
114
- return await runMainMenuLoop(initialOptions);
115
- });
116
- return;
117
- }
118
-
119
- if (action === 'github') {
120
- const ghResult = await runGitHubMenu({ defaultDir: cwd });
121
- if (ghResult && ghResult.autoPush && ghResult.repoUrl) {
122
- // Sau khi tạo repo mới, chuyển tiếp thẳng vào luồng push
123
- await runPushWizard({ ...initialOptions, repo: ghResult.repoUrl });
124
- return;
125
- }
126
- } else if (action === 'pull') {
127
- await runPullCommand('origin', undefined, { fromMenu: true });
128
- } else if (action === 'edit-time') {
129
- await runEditCommitTimeCommand({ fromMenu: true });
130
- } else if (action === 'fix') {
131
- await runFixCommand({ fromMenu: true });
132
- }
133
-
134
- const next = await promptContinueOrBack('Hoàn tất! Bạn muốn tiếp tục hay quay lại bảng điều khiển?');
135
- if (next === 'exit') {
136
- process.exit(0);
137
- }
138
- }
139
- }
140
-
141
- async function main(options = {}) {
142
- printBanner(VERSION);
143
-
144
- if (!checkGitInstalled()) {
145
- printGitMissing();
146
- process.exit(1);
147
- }
148
-
149
- const isInteractive = !options.yes;
150
-
151
- if (isInteractive && isBareInvocation(options)) {
152
- await runMainMenuLoop(options);
153
- return;
154
- }
155
-
156
- // Chạy trực tiếp push wizard với các options được cung cấp
157
- await runPushWizard(options);
158
- }
159
-
160
- /* ==========================================================================
161
- COMMANDER CLI CONFIGURATION
162
- ========================================================================== */
163
-
164
- const program = new Command();
165
- styleCliHelp(program);
166
-
167
- program
168
- .name('git-push-time')
169
- .description('Bộ công cụ Git & GitHub CLI: Đẩy code siêu tốc, kết nối GitHub tạo repo, chỉnh thời gian commit và bảo vệ secret')
170
- .version(VERSION)
171
- .option('-r, --repo <url>', 'Đường dẫn Git repository (URL hoặc để trống để chọn/tạo mới)')
172
- .option('-d, --date <datetime>', 'Thời gian commit (VD: "2024-01-15 14:30:00", "-2d", "-5h", "now")')
173
- .option('-m, --message <msg>', 'Thông điệp commit (Commit message)')
174
- .option('-b, --branch <branch>', 'Tên branch trên remote (Mặc định: main)')
175
- .option('-C, --dir <path>', 'Thư mục nguồn cần push (Mặc định: thư mục hiện tại)')
176
- .option('-f, --force', 'Thực hiện push đè (--force)', false)
177
- .option('-y, --yes', 'Bỏ qua giao diện hỏi, tự động dùng tham số hoặc giá trị mặc định', false)
178
- .option('--fix', 'Tự động gỡ file secret khỏi stage & thêm .gitignore (an toàn, không xóa file thật)', false)
179
- .action(async (opts) => {
180
- await main(opts);
181
- });
182
-
183
- // LỆNH GITHUB
184
- const ghCmd = program
185
- .command('github')
186
- .description('Quản lý tài khoản GitHub và tạo repository mới trực tiếp')
187
- .action(async () => {
188
- printBanner(VERSION);
189
- await runGitHubMenu();
190
- });
191
-
192
- ghCmd
193
- .command('create')
194
- .description('Tạo repository mới trên GitHub (Public hoặc Private)')
195
- .option('-C, --dir <path>', 'Thư mục nguồn cần liên kết')
196
- .action(async (opts) => {
197
- printBanner(VERSION);
198
- const res = await promptCreateRepo({ targetDir: opts.dir || process.cwd() });
199
- if (res.ok && res.repo) {
200
- console.log(`\n » Repo URL: ${res.repo.cloneUrl}\n`);
201
- }
202
- });
203
-
204
- ghCmd
205
- .command('whoami')
206
- .description('Xem thông tin tài khoản GitHub đang kết nối')
207
- .action(async () => {
208
- printBanner(VERSION);
209
- await showGitHubStatus();
210
- });
211
-
212
- ghCmd
213
- .command('repos')
214
- .description('Liệt kê danh sách repository trên GitHub của bạn')
215
- .action(async () => {
216
- printBanner(VERSION);
217
- await showUserRepos();
218
- });
219
-
220
- ghCmd
221
- .command('login')
222
- .description('Đăng nhập tài khoản GitHub bằng OAuth Device Flow hoặc Token')
223
- .action(async () => {
224
- printBanner(VERSION);
225
- await promptGitHubLogin();
226
- });
227
-
228
- ghCmd
229
- .command('logout')
230
- .description('Đăng xuất tài khoản GitHub khỏi máy')
231
- .action(async () => {
232
- printBanner(VERSION);
233
- logoutGitHub();
234
- });
235
-
236
- // LỆNH LOGIN / LOGOUT / WHOAMI TRỰC TIẾP
237
- program
238
- .command('login')
239
- .description('Đăng nhập GitHub qua OAuth Device Flow (mở trình duyệt) hoặc Token')
240
- .action(async () => {
241
- printBanner(VERSION);
242
- await promptGitHubLogin();
243
- });
244
-
245
- program
246
- .command('whoami')
247
- .description('Xem thông tin tài khoản GitHub đang kết nối')
248
- .action(async () => {
249
- printBanner(VERSION);
250
- await showGitHubStatus();
251
- });
252
-
253
- program
254
- .command('logout')
255
- .description('Đăng xuất tài khoản GitHub khỏi máy')
256
- .action(async () => {
257
- printBanner(VERSION);
258
- logoutGitHub();
259
- });
260
-
261
- // LỆNH FIX
262
- program
263
- .command('fix')
264
- .description('Quét & tự động gỡ file secret khỏi stage, cập nhật .gitignore và làm sạch commit unpushed')
265
- .option('-C, --dir <path>', 'Thư mục cần quét fix (Mặc định: thư mục hiện tại)')
266
- .action(async (opts) => {
267
- printBanner(VERSION);
268
- await runFixCommand(opts);
269
- });
270
-
271
- // LỆNH PULL
272
- program
273
- .command('pull [remote] [branch]')
274
- .description('Cập nhật code từ remote bằng fast-forward --ff-only hoặc --rebase')
275
- .option('-C, --dir <path>', 'Thư mục repo cần pull (Mặc định: thư mục hiện tại)')
276
- .action(async (remote, branch, opts) => {
277
- printBanner(VERSION);
278
- await runPullCommand(remote || 'origin', branch, opts || {});
279
- });
280
-
281
- // LỆNH EDIT-TIME
282
- program
283
- .command('edit-time')
284
- .description('Sửa thời gian của commit lịch sử (Backdate commit hash)')
285
- .option('-C, --dir <path>', 'Thư mục repo (Mặc định: thư mục hiện tại)')
286
- .action(async (opts) => {
287
- printBanner(VERSION);
288
- await runEditCommitTimeCommand(opts);
289
- });
290
-
291
- program.parse(process.argv);
1
+ #!/usr/bin/env node
2
+
3
+ import { Command } from 'commander';
4
+ import chalk from 'chalk';
5
+ import fs from 'fs';
6
+ import path from 'path';
7
+ import { fileURLToPath } from 'url';
8
+ import { checkGitInstalled, getCurrentBranch, getDashboardGitStatus } from '../lib/git.js';
9
+ import { getCurrentGitHubUser } from '../lib/github.js';
10
+ import { runPushWizard } from '../lib/commands/push.js';
11
+ import { runPullCommand } from '../lib/commands/pull.js';
12
+ import { runEditCommitTimeCommand } from '../lib/commands/edit-time.js';
13
+ import { runFixCommand } from '../lib/commands/fix.js';
14
+ import {
15
+ runGitHubMenu,
16
+ promptCreateRepo,
17
+ showUserRepos,
18
+ } from '../lib/commands/github.js';
19
+ import { promptContinueOrBack, selectBox } from '../lib/prompt-helpers.js';
20
+ import {
21
+ printBanner,
22
+ printDashboardStatus,
23
+ printGitMissing,
24
+ printCancelled,
25
+ styleCliHelp
26
+ } from '../lib/ui.js';
27
+
28
+ const __filename = fileURLToPath(import.meta.url);
29
+ const __dirname = path.dirname(__filename);
30
+
31
+ function getPackageVersion() {
32
+ try {
33
+ const raw = fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf-8');
34
+ return JSON.parse(raw).version || '1.1.0';
35
+ } catch {
36
+ return '1.1.0';
37
+ }
38
+ }
39
+
40
+ const VERSION = getPackageVersion();
41
+
42
+ function isExitPromptError(err) {
43
+ const msg = String(err?.message || '');
44
+ return (
45
+ err?.name === 'ExitPromptError' ||
46
+ msg.includes('User force closed the prompt') ||
47
+ msg.includes('SIGINT')
48
+ );
49
+ }
50
+
51
+ /**
52
+ * Kiểm tra xem lệnh có được gọi "trần" (không flag/subcommand nào) hay không.
53
+ */
54
+ function isBareInvocation(options = {}) {
55
+ return (
56
+ !options.repo &&
57
+ !options.message &&
58
+ !options.date &&
59
+ !options.branch &&
60
+ !options.dir &&
61
+ !options.force &&
62
+ !options.fix
63
+ );
64
+ }
65
+
66
+ /**
67
+ * Menu chính khi chạy `git-push-time` không truyền flag
68
+ */
69
+ async function promptMainMenu() {
70
+ return await selectBox({
71
+ message: 'Bảng điều khiển tác vụ chính',
72
+ hint: '↑↓ di chuyển · Enter chọn thao tác · Esc thoát',
73
+ pageSize: 10,
74
+ choices: [
75
+ {
76
+ name: `${chalk.hex('#38BDF8').bold('→ PUSH ')} ${chalk.hex('#334155')('│')} ${chalk.hex('#F1F5F9')('Đẩy code lên Git với giờ tùy chỉnh')}`,
77
+ value: 'push',
78
+ description: 'Đẩy code lên Git với tùy chỉnh thời gian commit, kiểm tra secret và branch',
79
+ },
80
+ {
81
+ name: `${chalk.hex('#A78BFA').bold('→ GITHUB ')} ${chalk.hex('#334155')('│')} ${chalk.hex('#CBD5E1')('Quản lý tài khoản & tạo repository')}`,
82
+ value: 'github',
83
+ description: 'Tạo nhanh repo GitHub public/private, liên kết remote tự động',
84
+ },
85
+ {
86
+ name: `${chalk.hex('#34D399').bold('→ PULL ')} ${chalk.hex('#334155')('│')} ${chalk.hex('#CBD5E1')('Cập nhật code mới nhất từ remote')}`,
87
+ value: 'pull',
88
+ description: 'Pull an toàn với fast-forward hoặc rebase, tránh conflict',
89
+ },
90
+ {
91
+ name: `${chalk.hex('#FBBF24').bold('→ EDIT-TIME ')} ${chalk.hex('#334155')('│')} ${chalk.hex('#CBD5E1')('Đổi timestamp commit lịch sử bất kỳ')}`,
92
+ value: 'edit-time',
93
+ description: 'Viết lại ngày giờ cho các commit đã tạo (Backdate commit)',
94
+ },
95
+ {
96
+ name: `${chalk.hex('#F43F5E').bold('→ FIX ')} ${chalk.hex('#334155')('│')} ${chalk.hex('#CBD5E1')('Quét & gỡ key bí mật, bảo vệ GH013')}`,
97
+ value: 'fix',
98
+ description: 'Quét file .env/secrets, gỡ khỏi commit và cập nhật .gitignore',
99
+ },
100
+ {
101
+ name: `${chalk.hex('#64748B').bold('x THOÁT ')} ${chalk.hex('#334155')('│')} ${chalk.hex('#64748B')('Đóng chương trình')}`,
102
+ value: 'exit',
103
+ },
104
+ ],
105
+ });
106
+ }
107
+
108
+ /**
109
+ * Vòng lặp Menu chính (không đệ quy — callback back chỉ trả sentinel)
110
+ */
111
+ async function runMainMenuLoop(initialOptions = {}) {
112
+ while (true) {
113
+ const cwd = process.cwd();
114
+ let branch = 'main';
115
+ try {
116
+ branch = getCurrentBranch(cwd);
117
+ } catch {}
118
+ let ghStatus = { authenticated: false };
119
+ try {
120
+ ghStatus = await getCurrentGitHubUser();
121
+ } catch {
122
+ ghStatus = { authenticated: false };
123
+ }
124
+
125
+ const gitStatus = getDashboardGitStatus(cwd);
126
+ printDashboardStatus({
127
+ targetDir: cwd,
128
+ currentBranch: branch,
129
+ githubUser: ghStatus.authenticated ? ghStatus.user : null,
130
+ remoteUrl: gitStatus.remoteUrl,
131
+ changes: gitStatus.changes,
132
+ lastCommit: gitStatus.lastCommit,
133
+ version: VERSION,
134
+ });
135
+ let action;
136
+ try {
137
+ action = await promptMainMenu();
138
+ } catch (err) {
139
+ if (isExitPromptError(err)) {
140
+ printCancelled();
141
+ process.exit(0);
142
+ }
143
+ throw err;
144
+ }
145
+
146
+ if (action === 'exit') {
147
+ printCancelled();
148
+ process.exit(0);
149
+ }
150
+
151
+ try {
152
+ if (action === 'push') {
153
+ const res = await runPushWizard(initialOptions, async () => 'back');
154
+ // 'back' = user muốn về menu → tiếp tục loop; ngược lại push xong thì thoát
155
+ if (res === 'back') continue;
156
+ return;
157
+ }
158
+
159
+ if (action === 'github') {
160
+ const ghResult = await runGitHubMenu({ defaultDir: cwd });
161
+ if (ghResult && ghResult.autoPush && ghResult.repoUrl) {
162
+ // Sau khi tạo repo mới, chuyển tiếp thẳng vào luồng push
163
+ const res = await runPushWizard({ ...initialOptions, repo: ghResult.repoUrl }, async () => 'back');
164
+ if (res === 'back') continue;
165
+ return;
166
+ }
167
+ } else if (action === 'pull') {
168
+ await runPullCommand('origin', undefined, { fromMenu: true });
169
+ } else if (action === 'edit-time') {
170
+ await runEditCommitTimeCommand({ fromMenu: true });
171
+ } else if (action === 'fix') {
172
+ await runFixCommand({ fromMenu: true });
173
+ }
174
+ } catch (err) {
175
+ if (isExitPromptError(err)) {
176
+ printCancelled();
177
+ process.exit(0);
178
+ }
179
+ throw err;
180
+ }
181
+
182
+ let next;
183
+ try {
184
+ next = await promptContinueOrBack('Hoàn tất! Bạn muốn tiếp tục hay quay lại bảng điều khiển?');
185
+ } catch (err) {
186
+ if (isExitPromptError(err)) {
187
+ printCancelled();
188
+ process.exit(0);
189
+ }
190
+ throw err;
191
+ }
192
+ if (next === 'exit') {
193
+ process.exit(0);
194
+ }
195
+ }
196
+ }
197
+
198
+ async function main(options = {}) {
199
+ printBanner(VERSION);
200
+
201
+ if (!checkGitInstalled()) {
202
+ printGitMissing();
203
+ process.exit(1);
204
+ }
205
+
206
+ const isInteractive = !options.yes;
207
+
208
+ if (isInteractive && isBareInvocation(options)) {
209
+ try {
210
+ await runMainMenuLoop(options);
211
+ } catch (err) {
212
+ if (isExitPromptError(err)) {
213
+ printCancelled();
214
+ process.exit(0);
215
+ }
216
+ throw err;
217
+ }
218
+ return;
219
+ }
220
+
221
+ // Chạy trực tiếp push wizard với các options được cung cấp
222
+ try {
223
+ await runPushWizard(options);
224
+ } catch (err) {
225
+ if (isExitPromptError(err)) {
226
+ printCancelled();
227
+ process.exit(0);
228
+ }
229
+ throw err;
230
+ }
231
+ }
232
+
233
+ /* ==========================================================================
234
+ COMMANDER CLI CONFIGURATION
235
+ ========================================================================== */
236
+
237
+ const program = new Command();
238
+ styleCliHelp(program);
239
+
240
+ program
241
+ .name('git-push-time')
242
+ .description('Bộ công cụ Git & GitHub CLI: Đẩy code siêu tốc, kết nối GitHub tạo repo, chỉnh thời gian commit và bảo vệ secret')
243
+ .version(VERSION)
244
+ .option('-r, --repo <url>', 'Đường dẫn Git repository (URL hoặc để trống để chọn/tạo mới)')
245
+ .option('-d, --date <datetime>', 'Thời gian commit (VD: "2024-01-15 14:30:00", "-2d", "-5h", "now")')
246
+ .option('-m, --message <msg>', 'Thông điệp commit (Commit message)')
247
+ .option('-b, --branch <branch>', 'Tên branch trên remote (Mặc định: main)')
248
+ .option('-C, --dir <path>', 'Thư mục nguồn cần push (Mặc định: thư mục hiện tại)')
249
+ .option('-f, --force', 'Thực hiện push đè (--force)', false)
250
+ .option('-y, --yes', 'Bỏ qua giao diện hỏi, tự động dùng tham số hoặc giá trị mặc định', false)
251
+ .option('--fix', 'Tự động gỡ file secret khỏi stage & thêm .gitignore (an toàn, không xóa file thật)', false)
252
+ .action(async (opts) => {
253
+ await main(opts);
254
+ });
255
+
256
+ // LỆNH GITHUB
257
+ const ghCmd = program
258
+ .command('github')
259
+ .description('Quản lý tài khoản GitHub và tạo repository mới trực tiếp')
260
+ .action(async () => {
261
+ printBanner(VERSION);
262
+ await runGitHubMenu();
263
+ });
264
+
265
+ ghCmd
266
+ .command('create')
267
+ .description('Tạo repository mới trên GitHub (Public hoặc Private)')
268
+ .option('-C, --dir <path>', 'Thư mục nguồn cần liên kết')
269
+ .action(async (opts) => {
270
+ printBanner(VERSION);
271
+ const res = await promptCreateRepo({ targetDir: opts.dir || process.cwd() });
272
+ if (res.ok && res.repo) {
273
+ console.log(`\n » Repo URL: ${res.repo.cloneUrl}\n`);
274
+ }
275
+ });
276
+
277
+ ghCmd
278
+ .command('whoami')
279
+ .description('Xem thông tin tài khoản GitHub đang kết nối')
280
+ .action(async () => {
281
+ printBanner(VERSION);
282
+ await showGitHubStatus();
283
+ });
284
+
285
+ ghCmd
286
+ .command('repos')
287
+ .description('Liệt kê danh sách repository trên GitHub của bạn')
288
+ .action(async () => {
289
+ printBanner(VERSION);
290
+ await showUserRepos();
291
+ });
292
+
293
+ ghCmd
294
+ .command('login')
295
+ .description('Đăng nhập tài khoản GitHub bằng OAuth Device Flow hoặc Token')
296
+ .action(async () => {
297
+ printBanner(VERSION);
298
+ await promptGitHubLogin();
299
+ });
300
+
301
+ ghCmd
302
+ .command('logout')
303
+ .description('Đăng xuất tài khoản GitHub khỏi máy')
304
+ .action(async () => {
305
+ printBanner(VERSION);
306
+ logoutGitHub();
307
+ });
308
+
309
+ // LỆNH FIX
310
+ program
311
+ .command('fix')
312
+ .description('Quét & tự động gỡ file secret khỏi stage, cập nhật .gitignore và làm sạch commit unpushed')
313
+ .option('-C, --dir <path>', 'Thư mục cần quét fix (Mặc định: thư mục hiện tại)')
314
+ .action(async (opts) => {
315
+ printBanner(VERSION);
316
+ await runFixCommand(opts);
317
+ });
318
+
319
+ // LỆNH PULL
320
+ program
321
+ .command('pull [remote] [branch]')
322
+ .description('Cập nhật code từ remote bằng fast-forward --ff-only hoặc --rebase')
323
+ .option('-C, --dir <path>', 'Thư mục repo cần pull (Mặc định: thư mục hiện tại)')
324
+ .action(async (remote, branch, opts) => {
325
+ printBanner(VERSION);
326
+ await runPullCommand(remote || 'origin', branch, opts || {});
327
+ });
328
+
329
+ // LỆNH EDIT-TIME
330
+ program
331
+ .command('edit-time')
332
+ .description('Sửa thời gian của commit lịch sử (Backdate commit hash)')
333
+ .option('-C, --dir <path>', 'Thư mục repo (Mặc định: thư mục hiện tại)')
334
+ .action(async (opts) => {
335
+ printBanner(VERSION);
336
+ await runEditCommitTimeCommand(opts);
337
+ });
338
+
339
+ program.parse(process.argv);