อ่านก่อนติดตั้ง: Mac คือเครื่องเดียวที่อ่านค่าได้ อุปกรณ์อื่นแสดงสิ่งที่ Mac อ่านมา ฉะนั้น Mac ต้องตื่นอยู่ตัวเลขถึงจะเป็นปัจจุบัน และถ้าจะดูจากนอกบ้าน Mac กับอุปกรณ์ต้องลงชื่อ iCloud ด้วย Apple ID เดียวกัน
ต้องใช้อะไรบ้าง
- macOS 14 ขึ้นไป ทั้ง Apple Silicon และ Intel
- ติดตั้ง Claude Code หรือ Codex CLI และลงชื่อเข้าใช้แล้วอย่างน้อยหนึ่งตัว
- สำหรับซิงก์ข้ามที่: บัญชี iCloud เดียวกันบนทุกเครื่อง
ติดตั้งบน Mac
ดาวน์โหลดไฟล์ DMG จากหน้าแรก เปิดแล้วลาก TokenAgents ไปที่โฟลเดอร์ Applications ไฟล์นี้ผ่านการรับรองจาก Apple แล้ว จึงเปิดได้ทันทีโดยไม่มีคำเตือน
ครั้งแรกที่เปิด macOS จะขอสิทธิ์เข้าถึง Keychain เพื่ออ่านการลงชื่อเข้าใช้ที่ Claude Code เขียนไว้ เลือก Always Allow ครั้งเดียวจบ ถ้าเผลอกดปฏิเสธไป ไม่เป็นไร มันไม่ถูกจดจำ — กดรีเฟรชในเมนูแล้วหน้าต่างจะกลับมาถามใหม่
จับคู่ iPhone, iPad หรือ Apple Watch
เปิดเมนู TokenAgents บน Mac แล้วเลือก ซิงก์ไปยังอุปกรณ์ของคุณ จะได้รหัสสิบตัวอักษรเช่น K4M7Q-2XRBH พร้อม QR
บนอุปกรณ์ปลายทาง เปิดแอปแล้วสแกน QR หรือพิมพ์รหัสก็ได้ ไม่ต้องใส่ขีด และพิมพ์เล็กใหญ่ก็ได้
- รหัสมีอายุ หนึ่งนาที และใช้จับคู่ได้ อุปกรณ์เดียว
- ใส่รหัสผิดครั้งเดียว รหัสนั้นถูกยกเลิกทันที ต้องกลับไปสร้างใหม่ที่ Mac — ตั้งใจให้เป็นแบบนี้เพื่อกันการเดา
- Apple Watch ไม่มีกล้อง มันจะขอผ่าน iCloud แล้วคุณอนุมัติที่ Mac
ดูรายชื่อและถอนสิทธิ์อุปกรณ์
เมนู TokenAgents → Synced Devices จะเห็นทุกเครื่องที่ถือกุญแจอยู่ พร้อมชื่อ ชนิดเครื่อง และเวลาที่เห็นล่าสุด กดถอนสิทธิ์เมื่อไหร่ กุญแจถูกลบทันทีและอุปกรณ์นั้นต้องจับคู่ใหม่
ทำไมตัวเลขบนโทรศัพท์ไม่อัปเดต
เพราะ Mac หลับอยู่ครับ อุปกรณ์อื่นไม่ได้อ่านค่าเอง — Claude Code เก็บการลงชื่อเข้าใช้ไว้บน Mac และ Codex ต้องรัน app-server ในเครื่อง ไม่มีทางอ่านจากที่อื่นได้
แอปจะบอกอายุของค่าเสมอ และจะขึ้นเครื่องหมายเมื่อค่าเก่าเกินกว่าจะเชื่อได้ ส่วนหน้าต่างที่เลยเวลารีเซ็ตไปแล้วจะแสดง ↻ แทนตัวเลข เพราะเรารู้ว่าตัวเลขเดิมไม่จริงแล้ว แต่ยังไม่รู้ว่าตัวใหม่คือเท่าไหร่
ถ้าอยากให้สดตลอด ตั้ง Mac ไม่ให้หลับตอนเสียบไฟ หรือใช้เครื่องที่เปิดไว้ตลอดเป็นตัวอ่าน
จับคู่ไม่สำเร็จ
- "ไม่พบ Mac เครื่องนั้นในเครือข่ายนี้" — ตรวจว่าทั้งสองเครื่องอยู่ Wi-Fi วงเดียวกัน และ TokenAgents เปิดอยู่บน Mac เครือข่ายสาธารณะบางที่ปิดกั้นการค้นหาอุปกรณ์กันเอง
- "รหัสนี้ใช้ไม่ได้แล้ว" — หมดอายุหรือถูกใช้ไปแล้ว กด รหัสใหม่ ที่ Mac
- "รหัสไม่ถูกต้อง" — Mac ยกเลิกรหัสนั้นไปแล้ว สร้างใหม่ ตัว
I L O U ไม่มีอยู่ในชุดอักษร ถ้าเห็นคล้าย ๆ ให้พิมพ์ 1 หรือ 0
- ล้มเหลวแล้วกดซ้ำไม่ได้ — ลองใหม่ได้เลยจากหน้าเดิม ไม่ต้องปิดแล้วเปิดใหม่
ซิงก์ผ่าน iCloud ไม่ทำงาน
- ทั้ง Mac และอุปกรณ์ต้องลงชื่อ Apple ID เดียวกัน ถ้าคนละบัญชี เหลือแค่เส้นทางเครือข่ายในบ้าน
- พื้นที่ iCloud ต้องไม่เต็ม ข้อมูลของเราใหญ่ไม่กี่ KB แต่ถ้าพื้นที่เต็มก็เขียนอะไรไม่ได้เลย
- รัน
tokenagents --diagnose ในเทอร์มินัลเพื่อดูว่าเส้นทางไหนใช้ได้บ้าง
บรรทัดคำสั่ง
tokenagents --print — ค่าปัจจุบันเป็นข้อความ เหมาะกับ statusline
tokenagents --json — ครบทุกหน้าต่างรวมลิมิตต่อโมเดล สำหรับสคริปต์
tokenagents --diagnose — ตรวจว่าอะไรอ่านได้ อะไรไม่ได้ และเพราะอะไร
ยังแก้ไม่ได้
ส่งผลลัพธ์ของ tokenagents --diagnose มาที่ support@tokenagents.app จะช่วยได้เร็วที่สุด — มันไม่มีข้อมูลส่วนตัวของคุณอยู่ในนั้น
Read this before installing: the Mac is the only machine that can read a provider. Everything else displays what it read, so the Mac has to be awake for the numbers to be current — and to see them away from home, the Mac and your device must be signed into the same Apple ID.
What you need
- macOS 14 or later, Apple Silicon or Intel
- Claude Code or the Codex CLI installed and signed in — at least one of them
- For syncing away from home: the same iCloud account on every device
Installing on the Mac
Download the disk image from the front page, open it, and drag TokenAgents to Applications. It is notarized by Apple, so it opens without a warning.
The first time it runs, macOS asks for Keychain access so it can read the sign-in Claude Code left behind. Choose Always Allow. If you decline by accident, nothing is lost — declining is not remembered. Press Refresh in the menu and the prompt comes back.
Pairing an iPhone, iPad or Apple Watch
Open the TokenAgents menu and choose Sync to Your Devices. You get a ten-character code such as K4M7Q-2XRBH and a QR beside it.
On the other device, scan the QR or type the code. Dashes are optional and case does not matter.
- A code lives one minute and pairs one device
- One wrong code cancels it immediately — make a new one on the Mac. That is deliberate: it is what makes a short code safe
- An Apple Watch has no camera, so it asks through iCloud and you approve it on the Mac
Seeing and revoking paired devices
TokenAgents menu → Synced Devices lists everything holding a key, with its name, kind, and when it was last seen. Revoking drops the key immediately and that device has to pair again.
Why the numbers on my phone are not updating
Because the Mac is asleep. No other device reads a provider itself — Claude Code keeps its sign-in on the Mac and Codex needs its app-server running there.
The app always shows how old a reading is, and marks it once it is too old to trust. A window whose reset time has passed shows ↻ instead of a figure, because the old number is known to be wrong and the new one is not known yet.
To keep it current, stop the Mac sleeping while it is plugged in, or use a machine that stays on.
Pairing fails
- "Could not find that Mac" — check both devices are on the same Wi-Fi and TokenAgents is running. Some public networks block devices from finding each other.
- "That code is no longer valid" — it expired or already paired a device. Press New code on the Mac.
- "That code is not right" — the Mac cancelled it; make a new one.
I L O U are not in the alphabet, so type 1 or 0 if a character looks like one.
- It failed and the button does nothing — it does; you can retry from the same screen without closing it.
iCloud syncing does not work
- Both machines must be signed into the same Apple ID. Different accounts leave only the local network route.
- Your iCloud storage must not be full. Our records are a few KB, but a full account accepts nothing at all.
- Run
tokenagents --diagnose in a Terminal to see which routes are working.
Command line
tokenagents --print — the current readings as a line of text, for a statusline
tokenagents --json — every window including per-model limits, for scripts
tokenagents --diagnose — what can and cannot be read, and why
Still stuck
Send the output of tokenagents --diagnose to support@tokenagents.app — it is the fastest way to get help, and it contains none of your data.