# Awareful, by hand

For an agent on a Mac without Node 24 (or with a newer Node, which the package does not run on yet), or whose host will not run `npx`. The one command is on https://awareful.com/install; this page runs the same command from the copy of Node and of the package that Awareful Desk carries.

It needs macOS 26 or later on Apple silicon. Everything below is plain macOS tools, and, from block 4 on, Awareful Desk's own Node once Apple has vouched for it. Until the person agrees on their phone, what is written on this Mac stays in `~/Library/Caches/me.awareful.connect/`: the download below, in its `by-hand` folder, and the command's own notes while it waits.

Each block is its own shell run: it starts by naming the folder again.

## 1. Check the Mac

```sh
sw_vers -productVersion   # 26.0 or later
uname -m                  # arm64
```

If either is wrong, stop and tell the person Awareful Desk cannot run on this Mac.

## 2. Download Awareful Desk

```sh
dir="$HOME/Library/Caches/me.awareful.connect/by-hand"
base=https://downloads.awareful.com/release
mkdir -p "$dir" && cd "$dir" || exit 1
curl -fsS "$base/latest.json" -o latest.json
v=$(plutil -extract version raw -o - latest.json)
curl -fsS "$base/$v/manifest.json" -o manifest.json
curl -fsS "$base/$v/manifest.json.sig" -o manifest.json.sig
plutil -extract artifacts.desk.team_id raw -o - manifest.json || exit 1
curl -fSL -C - "$base/$v/Awareful-Desk.zip" -o "Awareful-Desk-$v.zip"
```

The `plutil` line prints `PFYT4RQFC6`. If it fails, this release has no Awareful Desk in it: stop and tell the person. The zip is about 70 MB; if your shell times out, run the block again and the download goes on where it stopped.

## 3. Check it before running anything from it

```sh
dir="$HOME/Library/Caches/me.awareful.connect/by-hand"
cd "$dir" || exit 1
v=$(plutil -extract version raw -o - latest.json)
[ "$(shasum -a 256 "Awareful-Desk-$v.zip" | cut -d' ' -f1)" = "$(plutil -extract artifacts.desk.sha256 raw -o - manifest.json)" ] || { echo "checksum differs"; exit 1; }
rm -rf desk && ditto -x -k "Awareful-Desk-$v.zip" desk
app="$dir/desk/Awareful Desk.app"
codesign --verify --deep --strict "$app" || exit 1
codesign -dv "$app" 2>&1 | grep -x 'TeamIdentifier=PFYT4RQFC6' || exit 1
spctl --assess --type execute -vv "$app" 2>&1 | grep 'source=Notarized Developer ID' || exit 1
echo "Awareful Desk checked"
```

All of it has to pass: the checksum matches the manifest, the signature is valid, the team is `PFYT4RQFC6`, and Apple has notarized it. If any line fails, delete the folder (`rm -rf "$HOME/Library/Caches/me.awareful.connect/by-hand"`), run nothing from it, and tell the person.

Those are Apple's checks and the manifest's checksum. The manifest itself, which says what the right zip is, is checked in the next block.

## 4. Check the release's own signature

Awareful signs each release's manifest. The npm package checks that signature before it runs anything; here the copy of the check that Awareful Desk carries does, run with Desk's own Node now that Apple has vouched for Desk.

```sh
dir="$HOME/Library/Caches/me.awareful.connect/by-hand"
app="$dir/desk/Awareful Desk.app"
payload="$app/Contents/Resources/payload"
chan=production
ring="$payload/npm-launcher/manifest-keyring.json"
"$app/Contents/Helpers/node" --input-type=module -e '
import fs from "node:fs";
import { execFileSync } from "node:child_process";
import { pathToFileURL } from "node:url";
const [dir, app, payload, chan, ring] = process.argv.slice(1);
const L = await import(pathToFileURL(`${payload}/npm-launcher/bin/awareful.js`).href);
const keyring = JSON.parse(fs.readFileSync(ring, "utf8"));
const { manifest } = L.verifyReleaseManifest(fs.readFileSync(`${dir}/manifest.json`), fs.readFileSync(`${dir}/manifest.json.sig`), keyring);
L.checkRelease(manifest, chan);
const have = execFileSync("/usr/bin/plutil", ["-extract", "CFBundleShortVersionString", "raw", "-o", "-", `${app}/Contents/Info.plist`], { encoding: "utf8" }).trim();
if (have !== manifest.version) throw new Error(`Awareful Desk is ${have}, the signed manifest says ${manifest.version}`);
console.log(`Awareful ${manifest.version}: signed manifest checked`);
' "$dir" "$app" "$payload" "$chan" "$ring" || exit 1
```

It passes when the manifest's Ed25519 signature is valid under Awareful's release key, the manifest is for the production channel, and the Awareful Desk in the zip is the version it names. If it fails, delete the folder as above, run nothing more from it, and tell the person.

What this does not stop: an older release that Awareful signed and Apple notarized would also pass, because this Mac has no record of the newest version it has seen (the npm package keeps one).

## 5. Run the command

```sh
app="$HOME/Library/Caches/me.awareful.connect/by-hand/desk/Awareful Desk.app"
"$app/Contents/Helpers/node" "$app/Contents/Resources/payload/agent-bridge/src/awareful.mjs" connect <the code in their sentence, if it has one>
```

This is the same command, so everything on https://awareful.com/install holds: the phone shows what will change, and when the sentence has a code the person agrees by typing the 4 digits that show on this Mac's screen (with no code, they type or scan the 8-character code that shows there), and the output is what to do next, line by line. Follow it.

If it says it could not tell which Agent runs it, run it again with `--host claude-code`, `--host codex` or `--host cursor` before the code.

Run from here there is no downloaded copy of Awareful Desk for the command to install, so the plan the phone shows is the connect-only one. Awareful Desk is not moved into Applications on this path.

Keep the folder until the last line of the output says `connected` or `stopped`. Then delete the `by-hand` folder, and only that one: `rm -rf "$HOME/Library/Caches/me.awareful.connect/by-hand"`. What the command set up in the Agent's config starts from copies in Awareful's own folder (its package and a copy of this Node), not from this download, so the Agent's Awareful tools keep working after it is gone.
