The best way to control Claude Code, Codex and more from any computer or phone

main
sh 28 lines 930 Bytes
Raw
1 #!/bin/sh
2 printf '%s\n' "$*" >> "$FAKE_NPM_LOG"
3 prefix="${npm_config_prefix:-$FAKE_NPM_PREFIX}"
4 if [ "$1" = "root" ] && [ "$2" = "--global" ]; then
5 printf '%s\n' "$prefix/lib/node_modules"
6 exit 0
7 fi
8 if [ "$1" = "prefix" ] && [ "$2" = "--global" ]; then
9 printf '%s\n' "$prefix"
10 exit 0
11 fi
12 if [ "$1" = "install" ] && [ "$2" = "--global" ]; then
13 if [ -n "$FAKE_NPM_INSTALL_FAILURE_LINES" ]; then
14 yes 'npm notice resolving example dependency' | head -n "$FAKE_NPM_INSTALL_FAILURE_LINES" >&2
15 printf '%s\n' 'npm error see the complete log for details' >&2
16 exit 1
17 fi
18 package_root="$prefix/lib/node_modules/@example/acp"
19 executable="$prefix/bin/example-agent"
20 mkdir -p "$package_root" "$prefix/bin"
21 printf '%s' "$FAKE_NPM_MANIFEST" > "$package_root/package.json"
22 if [ "$npm_config_bin_links" != "false" ]; then
23 printf '#!/bin/sh\n' > "$executable"
24 chmod 755 "$executable"
25 fi
26 exit 0
27 fi
28 exit 64