@punkcode/cli 0.1.0 → 0.1.1
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/README.md +5 -0
- package/dist/cli.js +10 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Control Claude Code from your phone with [punk](https://punkcode.dev).
|
|
4
4
|
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- Node 18+
|
|
8
|
+
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI installed
|
|
9
|
+
|
|
5
10
|
## Getting started
|
|
6
11
|
|
|
7
12
|
1. Download the punk app on your phone and create an account
|
package/dist/cli.js
CHANGED
|
@@ -8,6 +8,7 @@ var version = "0.1.0";
|
|
|
8
8
|
|
|
9
9
|
// src/commands/connect.ts
|
|
10
10
|
import { io } from "socket.io-client";
|
|
11
|
+
import { execaSync as execaSync2 } from "execa";
|
|
11
12
|
|
|
12
13
|
// src/lib/claude-sdk.ts
|
|
13
14
|
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
@@ -741,6 +742,15 @@ async function refreshIdToken() {
|
|
|
741
742
|
|
|
742
743
|
// src/commands/connect.ts
|
|
743
744
|
async function connect(server, options) {
|
|
745
|
+
logger.info("Checking prerequisites...");
|
|
746
|
+
try {
|
|
747
|
+
execaSync2("claude", ["--version"], { timeout: 5e3 });
|
|
748
|
+
logger.info(" \u2713 Claude Code is installed");
|
|
749
|
+
} catch {
|
|
750
|
+
logger.error(" \u2717 Claude Code is not installed. Install it from https://docs.anthropic.com/en/docs/claude-code");
|
|
751
|
+
process.exit(1);
|
|
752
|
+
}
|
|
753
|
+
logger.info("All checks passed");
|
|
744
754
|
const deviceId = options.deviceId || getOrCreateDeviceId();
|
|
745
755
|
const url = buildUrl(server);
|
|
746
756
|
let idToken;
|