travel-info 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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +57 -0
  3. package/cli.js +98 -0
  4. package/package.json +28 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Anthony Kroeger
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # travel-info
2
+
3
+ CLI tool that provides current travel information (apps, SIM/connectivity, visa requirements, pre-travel forms) for travelers based on citizenship, departure country, and destination.
4
+
5
+ ## Prerequisites
6
+
7
+ - [Node.js](https://nodejs.org/) (v18+)
8
+ - [Claude CLI](https://docs.anthropic.com/en/docs/claude-cli) installed and in your PATH
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ # Clone and install globally
14
+ git clone https://github.com/anthnykr/travel-info.git
15
+ cd travel-info
16
+ npm install -g .
17
+
18
+ # Or run directly
19
+ npx travel-info
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ ### Interactive mode
25
+
26
+ ```bash
27
+ travel-info
28
+ ```
29
+
30
+ You'll be prompted for:
31
+ 1. Your citizenship country
32
+ 2. Country you're departing from
33
+ 3. Destination country
34
+
35
+ ### Command-line arguments
36
+
37
+ ```bash
38
+ travel-info <citizenship> <departing-from> <destination>
39
+
40
+ # Example
41
+ travel-info "United States" "United States" "Japan"
42
+ ```
43
+
44
+ ## What it provides
45
+
46
+ - **Apps** - Maps, transit, rideshare, payment, food delivery, messaging recommendations with pros/cons
47
+ - **SIM/Connectivity** - eSIM options, physical SIM info, local number guidance
48
+ - **Visa/Entry** - Requirements based on your citizenship and departure country
49
+ - **Pre-Travel** - Required online forms, health requirements
50
+
51
+ ## Disclaimer
52
+
53
+ This tool uses AI to search for and compile travel information. Always verify with official government sources before traveling. The authors accept no liability for decisions based on this information.
54
+
55
+ ## License
56
+
57
+ MIT
package/cli.js ADDED
@@ -0,0 +1,98 @@
1
+ #!/usr/bin/env node
2
+
3
+ import readline from "readline";
4
+ import { spawn } from "child_process";
5
+
6
+ function promptInteractive(question) {
7
+ const rl = readline.createInterface({
8
+ input: process.stdin,
9
+ output: process.stdout,
10
+ });
11
+ return new Promise((resolve) => {
12
+ rl.question(question, (answer) => {
13
+ rl.close();
14
+ resolve(answer);
15
+ });
16
+ });
17
+ }
18
+
19
+ async function main() {
20
+ console.log("\nšŸŒ Travel Country Info Tool\n");
21
+
22
+ let citizenship, departingFrom, destination;
23
+
24
+ const args = process.argv.slice(2);
25
+ if (args.length >= 3) {
26
+ citizenship = args[0];
27
+ departingFrom = args[1];
28
+ destination = args[2];
29
+ console.log(`Citizenship: ${citizenship}`);
30
+ console.log(`Departing from: ${departingFrom}`);
31
+ console.log(`Destination: ${destination}`);
32
+ } else {
33
+ citizenship = await promptInteractive("Which country are you from (citizenship)? ");
34
+ departingFrom = await promptInteractive("Which country are you traveling from? ");
35
+ destination = await promptInteractive("Which country are you traveling to? ");
36
+ }
37
+
38
+ console.log(`\nšŸ” Searching for travel info: ${citizenship} citizen, ${departingFrom} → ${destination}...\n`);
39
+
40
+ const now = new Date();
41
+ const currentDate = now.toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric" });
42
+ const searchPrompt = `Today is ${currentDate}. Search the web for CURRENT travel info for a ${citizenship} citizen traveling from ${departingFrom} to ${destination}. Only use sources from the past 3 months for visa/entry info.
43
+
44
+ IMPORTANT: Output plain text only. No markdown formatting (no **, no ##, no |pipes|). Use simple indentation and dashes for structure.
45
+
46
+ 1. APPS - For each category, list 2-3 options as:
47
+ AppName: pros / cons (3-5 words each)
48
+
49
+ Categories: Maps/navigation, Public transport, Rideshare/taxis, Payment/wallet, Food delivery, Communication/messaging
50
+
51
+ 2. SIM/CONNECTIVITY
52
+ - eSIM options and providers with prices
53
+ - Physical SIM cards: where to buy, cost
54
+ - Getting a local number if needed
55
+
56
+ 3. VISA/ENTRY (${citizenship} passport, departing from ${departingFrom})
57
+ - Visa requirement (yes/no, duration)
58
+ - Key restrictions
59
+ - Any special rules based on departure country
60
+ - Source: [include URL where you found this info]
61
+
62
+ 4. PRE-TRAVEL
63
+ - Online forms/declarations (only if CONFIRMED required - say "none required" if not found)
64
+ - Health requirements (only if CONFIRMED required - say "none required" if not found)
65
+ - Source: [include URL where you found this info]
66
+
67
+ Be concise. Only include pre-travel requirements you can confirm from official sources - do not guess or assume forms exist.`;
68
+
69
+ const claudePath = "claude";
70
+ const claude = spawn(claudePath, ["-p", "--model", "sonnet", "--dangerously-skip-permissions", searchPrompt], {
71
+ stdio: ["inherit", "pipe", "pipe"],
72
+ });
73
+
74
+ claude.stdout.on("data", (data) => {
75
+ process.stdout.write(data.toString());
76
+ });
77
+
78
+ claude.stderr.on("data", (data) => {
79
+ process.stderr.write(data.toString());
80
+ });
81
+
82
+ claude.on("close", (code) => {
83
+ console.log("\n" + "─".repeat(50));
84
+ console.log("āš ļø DISCLAIMER: This info is AI-generated and may be");
85
+ console.log("outdated or inaccurate. Always verify with official");
86
+ console.log("government sources before traveling. The authors accept");
87
+ console.log("no liability for decisions based on this information.");
88
+ console.log("─".repeat(50) + "\n");
89
+ process.exit(code);
90
+ });
91
+
92
+ claude.on("error", (err) => {
93
+ console.error("Failed to start Claude:", err);
94
+ process.exit(1);
95
+ });
96
+ }
97
+
98
+ main();
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "travel-info",
3
+ "version": "1.0.0",
4
+ "description": "CLI tool providing current travel info (apps, SIM, visa, pre-travel forms) based on citizenship and destination",
5
+ "type": "module",
6
+ "bin": {
7
+ "travel-info": "./cli.js"
8
+ },
9
+ "scripts": {
10
+ "start": "node cli.js"
11
+ },
12
+ "keywords": [
13
+ "travel",
14
+ "visa",
15
+ "esim",
16
+ "cli",
17
+ "destination"
18
+ ],
19
+ "author": "anthnykr",
20
+ "license": "MIT",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/anthnykr/travel-info.git"
24
+ },
25
+ "engines": {
26
+ "node": ">=18"
27
+ }
28
+ }