pkg-track 1.0.0 → 1.0.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.
Files changed (3) hide show
  1. package/README.md +62 -36
  2. package/bin/cli.js +2 -2
  3. package/package.json +10 -9
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # šŸ“¦ pkg-tracker
1
+ # šŸ“¦ pkg-track
2
2
 
3
3
  **Track all your packages in one place.** No more digging through emails!
4
4
 
@@ -29,50 +29,65 @@ Interactive CLI that scans your Gmail for shipping confirmations and lets you tr
29
29
 
30
30
  ## šŸ“‹ Prerequisites
31
31
 
32
- Before installing, you'll need:
33
-
34
32
  - **Node.js 14 or higher** ([Download](https://nodejs.org/))
35
- - **Gmail account** - For scanning shipping emails
36
- - **Google Cloud Project** - Free tier (for OAuth credentials)
37
- - See [Setup](#setup) for detailed instructions
33
+ - **Gmail account**
38
34
 
39
35
  **Supported Platforms:**
40
36
  - āœ… macOS (10.15+)
41
37
  - āœ… Linux (Ubuntu, Debian, Fedora, etc.)
42
38
  - āœ… Windows 10/11 (with Node.js)
43
39
 
44
- ## šŸš€ Installation
40
+ ## šŸš€ Quick Start
41
+
42
+ ### 1. Install
45
43
 
46
- **Option 1: NPM (Recommended)**
44
+ **From npm (recommended):**
47
45
  ```bash
48
- npm install -g pkg-tracker
46
+ npm install -g pkg-track
49
47
  ```
50
48
 
51
- **Option 2: From Source**
49
+ **From git (for development):**
52
50
  ```bash
53
- git clone https://github.com/vvanessaww/pkg-tracker.git
54
- cd pkg-tracker
55
- npm install
56
- npm link
51
+ # Requires build tools (python, make, gcc/clang)
52
+ npm install -g git+https://github.com/vvanessaww/pkg-track.git
57
53
  ```
58
54
 
59
- **Verify installation:**
55
+ > āš ļø **Installing from git requires build tools** for compiling native modules (better-sqlite3). On macOS, install Xcode Command Line Tools: `xcode-select --install`. On Ubuntu/Debian: `sudo apt-get install build-essential python3`
56
+
57
+ ### 2. One-Time Gmail Setup (~5 minutes)
58
+
59
+ **Quick Google Cloud setup** (sounds scary, but it's just clicking through):
60
+
60
61
  ```bash
61
- pkg --version
62
- ```
62
+ # 1. Create the config directory
63
+ mkdir -p ~/.pkg-tracker
63
64
 
64
- ## Setup
65
+ # 2. Follow these steps to get your credentials:
66
+ ```
65
67
 
66
- ### 1. Get Gmail API Credentials
68
+ **Google Cloud Console** (one-time):
69
+ 1. Go to https://console.cloud.google.com/apis/credentials
70
+ 2. **Create Project** → Name: `pkg-track` (or anything) → **Create**
71
+ 3. **Enable APIs** → Search **"Gmail API"** → **Enable**
72
+ 4. **Configure Consent Screen**:
73
+ - User Type: **External** → **Create**
74
+ - App name: `pkg-track`
75
+ - User support email: (your email)
76
+ - Developer contact: (your email)
77
+ - **Save and Continue** (skip scopes/test users)
78
+ 5. **Credentials** → **Create Credentials** → **OAuth client ID**:
79
+ - Application type: **Desktop app**
80
+ - Name: `pkg-track`
81
+ - **Create**
82
+ 6. **Download JSON** (click the download icon ā¬‡ļø)
83
+ 7. **Move the file**:
84
+ ```bash
85
+ mv ~/Downloads/client_secret_*.json ~/.pkg-tracker/credentials.json
86
+ ```
67
87
 
68
- 1. Go to [Google Cloud Console](https://console.cloud.google.com/apis/credentials)
69
- 2. Create a new project (or select existing)
70
- 3. Enable **Gmail API**
71
- 4. Create **OAuth 2.0 Client ID** (Application type: Desktop app)
72
- 5. Download the credentials JSON file
73
- 6. Save it as `~/.pkg-tracker/credentials.json`
88
+ **Why this setup?** Google requires each user to create their own OAuth app for Gmail access. This ensures your data stays private and you control the permissions. Your credentials never leave your computer.
74
89
 
75
- ### 2. Initialize
90
+ ### 3. Initialize
76
91
 
77
92
  ```bash
78
93
  pkg init
@@ -80,9 +95,11 @@ pkg init
80
95
 
81
96
  This will:
82
97
  - Open your browser for Gmail authorization
83
- - Save access token for future use
98
+ - Save access token locally
84
99
  - Create local database
85
100
 
101
+ **That's it!** You only need to do this once.
102
+
86
103
  ## Usage
87
104
 
88
105
  ### Scan email for packages
@@ -220,18 +237,31 @@ Perfect for cleaning up delivered packages or removing things you're no longer t
220
237
  - `~/.pkg-tracker/packages.db` - SQLite database of your packages
221
238
 
222
239
  **Revoking access:**
223
- If you want to stop using pkg-tracker:
240
+ If you want to stop using pkg-track:
224
241
  1. Revoke OAuth access: https://myaccount.google.com/permissions
225
242
  2. Delete local data: `rm -rf ~/.pkg-tracker`
226
243
 
227
244
  ## šŸ”§ Troubleshooting
228
245
 
246
+ ### "This app isn't verified" warning during OAuth
247
+
248
+ **What you'll see:** When authorizing Gmail access, Google shows a warning: "Google hasn't verified this app"
249
+
250
+ **This is normal!** You created the app yourself, so Google hasn't verified it. This is expected and safe.
251
+
252
+ **To continue:**
253
+ 1. Click **"Advanced"**
254
+ 2. Click **"Go to [your-app-name] (unsafe)"**
255
+ 3. Click **"Allow"**
256
+
257
+ **Why it's safe:** You created the OAuth credentials yourself - it's YOUR app accessing YOUR Gmail. No one else has access.
258
+
229
259
  ### "Gmail credentials not found"
230
260
 
231
261
  **Problem:** You see `āš ļø Gmail OAuth credentials not found.`
232
262
 
233
263
  **Solution:**
234
- 1. Make sure you've created OAuth credentials in Google Cloud Console
264
+ 1. Make sure you've created OAuth credentials in Google Cloud Console (see [Quick Start](#-quick-start))
235
265
  2. Download the credentials JSON file
236
266
  3. Save it to the correct location:
237
267
  ```bash
@@ -276,13 +306,9 @@ If you want to stop using pkg-tracker:
276
306
 
277
307
  **Solution:**
278
308
  ```bash
279
- # Reinstall dependencies
280
- cd /path/to/pkg-tracker
281
- npm install
282
-
283
309
  # If installed globally, reinstall
284
- npm uninstall -g pkg-tracker
285
- npm install -g pkg-tracker
310
+ npm uninstall -g pkg-track
311
+ npm install -g pkg-track
286
312
  ```
287
313
 
288
314
  ### "Permission denied" on macOS/Linux
@@ -355,7 +381,7 @@ pkg sync
355
381
  ```
356
382
 
357
383
  3. **Open an issue:**
358
- - Visit: https://github.com/vvanessaww/pkg-tracker/issues
384
+ - Visit: https://github.com/vvanessaww/pkg-track/issues
359
385
  - Include: OS, Node.js version, error message, steps to reproduce
360
386
 
361
387
  ## Roadmap
package/bin/cli.js CHANGED
@@ -13,7 +13,7 @@ process.on('unhandledRejection', (reason, promise) => {
13
13
  console.error(chalk.red('\nāœ— Unexpected error occurred:'));
14
14
  console.error(chalk.gray(reason.message || reason));
15
15
  console.error(chalk.yellow('\nIf this persists, please report it:'));
16
- console.error(chalk.cyan('https://github.com/vvanessaww/pkg-tracker/issues\n'));
16
+ console.error(chalk.cyan('https://github.com/vvanessaww/pkg-track/issues\n'));
17
17
  process.exit(1);
18
18
  });
19
19
 
@@ -21,7 +21,7 @@ process.on('uncaughtException', (error) => {
21
21
  console.error(chalk.red('\nāœ— Fatal error:'));
22
22
  console.error(chalk.gray(error.message));
23
23
  console.error(chalk.yellow('\nIf this persists, please report it:'));
24
- console.error(chalk.cyan('https://github.com/vvanessaww/pkg-tracker/issues\n'));
24
+ console.error(chalk.cyan('https://github.com/vvanessaww/pkg-track/issues\n'));
25
25
  process.exit(1);
26
26
  });
27
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pkg-track",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Track all your packages in one place - UPS, FedEx, USPS, Amazon. Interactive CLI with Gmail integration.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -8,7 +8,8 @@
8
8
  },
9
9
  "scripts": {
10
10
  "start": "node bin/cli.js",
11
- "test": "node test/parser.test.js"
11
+ "test": "node test/parser.test.js",
12
+ "install": "node -e \"console.log('Installing pkg-track...')\" || true"
12
13
  },
13
14
  "keywords": [
14
15
  "package",
@@ -32,22 +33,22 @@
32
33
  "license": "MIT",
33
34
  "repository": {
34
35
  "type": "git",
35
- "url": "https://github.com/vvanessaww/pkg-tracker.git"
36
+ "url": "https://github.com/vvanessaww/pkg-track.git"
36
37
  },
37
- "homepage": "https://github.com/vvanessaww/pkg-tracker#readme",
38
+ "homepage": "https://github.com/vvanessaww/pkg-track#readme",
38
39
  "bugs": {
39
- "url": "https://github.com/vvanessaww/pkg-tracker/issues"
40
+ "url": "https://github.com/vvanessaww/pkg-track/issues"
40
41
  },
41
42
  "engines": {
42
43
  "node": ">=14.0.0"
43
44
  },
44
45
  "dependencies": {
46
+ "better-sqlite3": "^12.6.2",
47
+ "chalk": "^4.1.2",
45
48
  "commander": "^11.1.0",
46
49
  "googleapis": "^128.0.0",
47
- "better-sqlite3": "^9.2.2",
48
- "chalk": "^4.1.2",
49
- "ora": "^5.4.1",
50
50
  "inquirer": "^8.2.6",
51
- "open": "^8.4.2"
51
+ "open": "^8.4.2",
52
+ "ora": "^5.4.1"
52
53
  }
53
54
  }