@snapcommit/cli 1.0.4 → 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/dist/lib/auth.js CHANGED
@@ -133,6 +133,14 @@ async function promptAuth() {
133
133
  console.log(chalk_1.default.gray(' • ') + chalk_1.default.cyan('snap quick') + chalk_1.default.gray(' - AI commit in any repo'));
134
134
  console.log(chalk_1.default.gray(' • ') + chalk_1.default.cyan('snap') + chalk_1.default.gray(' - Natural language Git commands'));
135
135
  console.log(chalk_1.default.gray(' • Type ') + chalk_1.default.cyan('exit') + chalk_1.default.gray(' to leave SnapCommit\n'));
136
+ console.log(chalk_1.default.yellow('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
137
+ console.log(chalk_1.default.bold('💡 Want GitHub features too?\n'));
138
+ console.log(chalk_1.default.gray(' Create PRs, check CI, and more with natural language!'));
139
+ console.log(chalk_1.default.gray(' Run: ') + chalk_1.default.cyan('snap github connect'));
140
+ console.log(chalk_1.default.gray(' (You\'ll need a GitHub Personal Access Token - Classic)\n'));
141
+ console.log(chalk_1.default.gray(' Get one at: ') + chalk_1.default.cyan('https://github.com/settings/tokens'));
142
+ console.log(chalk_1.default.gray(' Scopes needed: ') + chalk_1.default.white('repo, workflow, read:user'));
143
+ console.log(chalk_1.default.gray(' 💡 Tip: Set no expiration or remember to renew!\n'));
136
144
  return true;
137
145
  }
138
146
  else {
package/dist/repl.js CHANGED
@@ -10,6 +10,7 @@ const auth_1 = require("./lib/auth");
10
10
  const natural_1 = require("./commands/natural");
11
11
  const quick_1 = require("./commands/quick");
12
12
  const stats_1 = require("./commands/stats");
13
+ const github_connect_1 = require("./commands/github-connect");
13
14
  /**
14
15
  * Start SnapCommit REPL (Read-Eval-Print-Loop)
15
16
  * Interactive mode for natural language Git commands
@@ -27,12 +28,29 @@ async function startREPL() {
27
28
  process.exit(1);
28
29
  }
29
30
  console.log(chalk_1.default.green(`✅ Logged in as ${chalk_1.default.bold(authConfig.email)}\n`));
31
+ // Check GitHub connection status
32
+ const githubConnected = (0, github_connect_1.isGitHubConnected)();
33
+ if (githubConnected) {
34
+ const githubConfig = (0, github_connect_1.getGitHubConfig)();
35
+ console.log(chalk_1.default.green(`✅ GitHub connected as ${chalk_1.default.bold('@' + githubConfig?.username)}\n`));
36
+ }
30
37
  console.log(chalk_1.default.gray('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
31
38
  console.log(chalk_1.default.bold('💡 What can SnapCommit do?\n'));
32
39
  console.log(chalk_1.default.gray(' • ') + chalk_1.default.white('Natural language Git: ') + chalk_1.default.cyan('"undo my last commit"'));
33
40
  console.log(chalk_1.default.gray(' • ') + chalk_1.default.white('Quick AI commits: ') + chalk_1.default.cyan('quick'));
34
- console.log(chalk_1.default.gray(' • ') + chalk_1.default.white('Show your stats: ') + chalk_1.default.cyan('stats'));
41
+ if (githubConnected) {
42
+ console.log(chalk_1.default.gray(' • ') + chalk_1.default.white('GitHub operations: ') + chalk_1.default.cyan('"create a PR", "check CI"'));
43
+ }
35
44
  console.log(chalk_1.default.gray(' • ') + chalk_1.default.white('Exit SnapCommit: ') + chalk_1.default.cyan('exit') + chalk_1.default.gray(' or ') + chalk_1.default.cyan('quit\n'));
45
+ // Show GitHub setup reminder if not connected
46
+ if (!githubConnected) {
47
+ console.log(chalk_1.default.yellow('💡 Want GitHub features? (Create PRs, check CI, etc.)\n'));
48
+ console.log(chalk_1.default.gray(' Run: ') + chalk_1.default.cyan('snap github connect'));
49
+ console.log(chalk_1.default.gray(' You\'ll need a GitHub Personal Access Token (Classic)'));
50
+ console.log(chalk_1.default.gray(' Get one at: ') + chalk_1.default.cyan('https://github.com/settings/tokens'));
51
+ console.log(chalk_1.default.gray(' Scopes: ') + chalk_1.default.white('repo, workflow, read:user'));
52
+ console.log(chalk_1.default.gray(' 💡 Set no expiration or remember to renew!\n'));
53
+ }
36
54
  console.log(chalk_1.default.gray('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
37
55
  console.log(chalk_1.default.bold.yellow('🎯 Try it now! Type what you want to do:\n'));
38
56
  const rl = readline_1.default.createInterface({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapcommit/cli",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Instant AI commits. Beautiful progress tracking. Never write commit messages again.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {