summaryrefslogtreecommitdiffstats
path: root/pkgs/claude-remote.nix
Commit message (Collapse)AuthorAgeFilesLines
* pkgs/claude-remote: reset and remove, for what claude.ai deletestv4 days1-10/+141
| | | | | | | | | | | | | | Deleting a remote's session on claude.ai leaves the remote a link to it (bridge-pointer.json), which it then can't resume (404). reset NAME forgets the session: moves the link aside (bridge-pointer.json.old), and the remote starts with a new one, stopped and started again if it runs. remove NAME retires a remote: stops it, and moves its directory and Claude Code project to ~claude/remotes/.removed/NAME-DATE, worktrees in it repaired; its branches and trust stay; not for static ones. Then the old session and environment can go, on claude.ai. Both ask first (y/N), but with -f, as root, not from the remote itself, all or nothing like rename, whose take-back they share (its messages generalized). .removed is not worth a backup: in the rsync filter.
* configs/claude: the remotes wait for the logintv4 days1-0/+3
| | | | | | | | | | | | | Remote Control needs a login, and the units answer its questions in ~/.claude.json, which may come before it: so the units have ConditionPathExists on ~/.claude/.credentials.json (skipped, not failed, before the login), and a path unit on it starts the restore service, which starts the static remotes now, too, and the dynamic ones: at boot, if there's a login already, or else as soon as there is. The restore service isn't multi-user.target's anymore, and remains active, once done, so the path unit starts it once. claude-remote start refuses before the login, as the unit would be skipped, and forgotten.
* configs/claude: a static remote taken out goes on, as a dynamic onetv4 days1-1/+2
| | | | | | | | | The restore service keeps the static remotes of each boot (in /home/.var/lib/claude/static-remotes); one that was static at the last boot, but isn't anymore, gets a state file, i.e. becomes dynamic, and starts again, as long as it has a directory. To retire one: claude-remote stop NAME, as for any dynamic one. The first boot with this only notes the static ones.
* pkgs/claude-remote: the help in sections, and in colortv4 days1-23/+79
| | | | | | | | As claude-inbox's: Commands, each with its description indented below it, and Kinds; on a terminal, the headings in bold, commands, options and names in colors (truecolor, 256 or 8, as the terminal has them, none with NO_COLOR), errors too; and an unknown command or option is a one-line error now, not all of the help.
* pkgs/claude-remote: rename OLD NEW, all or nothing, and back by NEW OLDtv4 days1-5/+273
| | | | | | | | | | | | | | | | | | | A remote, renamed: its directory, its Claude Code project (and the link to its claude.ai session in it), its trust in ~/.claude.json, the worktrees in it (repaired), its branches (OLD/* to NEW/*), and a dynamic one's mark; stopped first, if it runs, and started after. Each step is a rename, so rename NEW OLD takes it all back. Everything gets checked first, and nothing changes unless all's well: OLD there, and not static; nothing of NEW's there (directory, project, unit, mark, branches; but an entry in ~/.claude.json alone, which a remote writing back what it read before can bring back, gets replaced); not run from OLD itself; nothing but OLD's own unit using it (and, once stopped, nothing at all); no other rename running. Then all or nothing: before each step, how to take it back, which looks at what's there (so a step half done gets taken back, too), and if one fails, those get done, last first. Only if that fails, too, a copy of ~/.claude.json as it was stays, which list shows until it's removed. The process, in the header.
* configs/claude: claude-remote, root's tool for the remotestv5 days1-0/+164
claude-remote list (the default) shows the remotes, static, dynamic, with a unit loaded, or with a directory, with their kind, state, and whether they trust their directory yet; inspect NAME shows a remote's unit, directory, trust, claude.ai session (bridge-pointer.json), and the last lines of its terminal; start, stop and restart NAME go through systemctl (a remote started here is dynamic: it lasts until stopped here), and start points to attach while the remote doesn't trust its directory; attach [NAME] opens its terminal (it's claude-attach, which is gone); log NAME shows its journal. Which remotes are static, it asks systemd (multi-user.target's wants), so changing them doesn't change it. A package (pkgs/claude-remote.nix), with bash completion of the commands and the remotes' names.