airterm 1.0.1 → 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.
- package/dist/cli.js +8 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -460,10 +460,14 @@ function App({ initialCode: initialCode2, initialScreen: initialScreen2 }) {
|
|
|
460
460
|
|
|
461
461
|
// src/cli.tsx
|
|
462
462
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
463
|
+
if (process.argv.includes("-h")) {
|
|
464
|
+
process.argv[process.argv.indexOf("-h")] = "--help";
|
|
465
|
+
}
|
|
466
|
+
if (process.argv.includes("-v")) {
|
|
467
|
+
process.argv[process.argv.indexOf("-v")] = "--version";
|
|
468
|
+
}
|
|
463
469
|
var cli = meow(
|
|
464
470
|
`
|
|
465
|
-
AirTerm \u2014 SSH into your AirClaw machine
|
|
466
|
-
|
|
467
471
|
Usage:
|
|
468
472
|
airterm Connect to your machine
|
|
469
473
|
airterm <code> Redeem an access code and connect
|
|
@@ -507,14 +511,14 @@ if (command === "add") {
|
|
|
507
511
|
} else {
|
|
508
512
|
initialScreen = "add";
|
|
509
513
|
}
|
|
510
|
-
} else if (command === "list") {
|
|
514
|
+
} else if (command === "list" || command === "ls") {
|
|
511
515
|
const connections = getConnections();
|
|
512
516
|
if (connections.length === 0) {
|
|
513
517
|
console.log("No saved connections. Run `airterm add` to set up.");
|
|
514
518
|
process.exit(0);
|
|
515
519
|
}
|
|
516
520
|
initialScreen = "list";
|
|
517
|
-
} else if (command && !["add", "list", "help", "reset"].includes(command)) {
|
|
521
|
+
} else if (command && !["add", "list", "ls", "help", "reset"].includes(command)) {
|
|
518
522
|
if (/^[A-Za-z0-9_-]{10,}$/.test(command)) {
|
|
519
523
|
initialCode = command;
|
|
520
524
|
} else {
|