[{"data":1,"prerenderedAt":436,"buildId":437},["ShallowReactive",2],{"docs:\u002F":3},{"page":4,"section":10,"document":18,"credits":10,"prev":10,"next":10},{"id":5,"path":6,"file":7,"title":8,"sourceTitle":8,"description":9,"tagline":9,"eyebrow":10,"credits":10,"keywords":11,"icon":10,"layout":12,"seo":13,"sidebar":15,"toc":16,"kind":10,"group":10,"navigation":15,"order":17},"index","\u002F","index.md","fleethosts","Reach machines over ssh and Tailscale from Node. Resolve hosts and tags, run one command on each at once, and record the fleet a program last saw.",null,[],"home",{"title":14},"fleethosts · Run a command on every machine you reach",true,false,9007199254740991,{"nodes":19,"toc":433},[20,371,379,390,426],[21,22,23,28,32,59,161,349],"fleethosts-hero",{},[24,25,27],"h1",{"id":26},"run-a-command-on-every-machine-you-reach","Run a command on every machine you reach",[29,30,31],"p",{},"Name hosts and Tailscale tags. fleethosts turns them into ssh targets, runs one command on all of them at once, and tells you what each machine gave back.",[33,34,36],"template",{"name":35},"agents",[37,38,41],"pre",{"language":39,"class":40,"wrap":15},"text","shiki shiki-themes github-light-default github-dark-default dark:github-dark-default",[42,43,45,53,54],"code",{"class":44},"language-text",[46,47,50],"span",{"class":48,"style":49},"line","display: inline",[46,51,52],{},"Install fleethosts as a dependency.","\n",[46,55,56],{"class":48,"style":49},[46,57,58],{},"Read https:\u002F\u002Ffleethosts.loadsheet.dev\u002Fguide\u002Fhosts, then run commands on our machines with resolveHosts and runOnHosts, passing standardPlaces(\"\u003Cour program>\").",[33,60,62],{"name":61},"humans",[63,64,89,113,130,146],"tabs",{"uid":65,"count":66,"labels":67,"sync":72,"code":73,"magic":74,"icons":75},"ct-swpr8a-1","4",[68,69,70,71],"pnpm","npm","yarn","bun","pm","true","auto",[76,80,83,86],{"name":77,"src":78,"ratio":79,"mask":16},"pm:pnpm","data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' viewBox='0 0 32 32'%3E%3Cpath fill='%23f9ad00' d='M30 10.75h-8.749V2H30Zm-9.626 0h-8.75V2h8.75Zm-9.625 0H2V2h8.749ZM30 20.375h-8.749v-8.75H30Z'\u002F%3E%3Cpath fill='%238a8a8a' d='M20.374 20.375h-8.75v-8.75h8.75Zm0 9.625h-8.75v-8.75h8.75ZM30 30h-8.749v-8.75H30Zm-19.251 0H2v-8.75h8.749Z'\u002F%3E%3C\u002Fsvg%3E",1,{"name":81,"src":82,"ratio":79,"mask":16},"pm:npm","data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' viewBox='0 0 32 32'%3E%3Cpath fill='%23c12127' d='M2 2h28v28H2'\u002F%3E%3Cpath fill='%238a8a8a' d='M7.25 7.25h17.5v17.5h-3.5v-14H16v14H7.25'\u002F%3E%3C\u002Fsvg%3E",{"name":84,"src":85,"ratio":79,"mask":16},"pm:yarn","data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' viewBox='0 0 32 32'%3E%3Cpath fill='%232188b6' d='M28.208 24.409a10.5 10.5 0 0 0-3.959 1.822a23.7 23.7 0 0 1-5.835 2.642a1.63 1.63 0 0 1-.983.55a62 62 0 0 1-6.447.577c-1.163.009-1.876-.3-2.074-.776a1.573 1.573 0 0 1 .866-2.074a4 4 0 0 1-.514-.379c-.171-.171-.352-.514-.406-.388c-.225.55-.343 1.894-.947 2.5c-.83.839-2.4.559-3.328.072c-1.019-.541.072-1.813.072-1.813a.73.73 0 0 1-.992-.343a4.85 4.85 0 0 1-.667-2.949a5.37 5.37 0 0 1 1.749-2.895a9.3 9.3 0 0 1 .658-4.4a10.45 10.45 0 0 1 3.165-3.661S6.628 10.747 7.35 8.817c.469-1.262.658-1.253.812-1.308a3.6 3.6 0 0 0 1.452-.857a5.27 5.27 0 0 1 4.41-1.7S15.2 1.4 16.277 2.09a18.4 18.4 0 0 1 1.533 2.886s1.281-.748 1.425-.469a11.33 11.33 0 0 1 .523 6.132a14 14 0 0 1-2.6 5.411c-.135.225 1.551.938 2.615 3.887c.983 2.7.108 4.96.262 5.212c.027.045.036.063.036.063s1.127.09 3.391-1.308a8.5 8.5 0 0 1 4.277-1.604a1.081 1.081 0 0 1 .469 2.11Z'\u002F%3E%3C\u002Fsvg%3E",{"name":87,"src":88,"ratio":79,"mask":16},"pm:bun","data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' viewBox='0 0 32 32'%3E%3Cpath fill='%23fbf0df' d='M29 17c0 5.65-5.82 10.23-13 10.23S3 22.61 3 17c0-3.5 2.24-6.6 5.66-8.44S14.21 4.81 16 4.81s3.32 1.54 7.34 3.71C26.76 10.36 29 13.46 29 17'\u002F%3E%3Cpath fill='none' stroke='%23000' d='M16 27.65c7.32 0 13.46-4.65 13.46-10.65c0-3.72-2.37-7-5.89-8.85c-1.39-.75-2.46-1.41-3.37-2l-1.13-.69A6.14 6.14 0 0 0 16 4.35a6.9 6.9 0 0 0-3.3 1.23c-.42.24-.86.51-1.32.8c-.87.54-1.83 1.13-3 1.73C4.91 10 2.54 13.24 2.54 17c0 6 6.14 10.65 13.46 10.65Z'\u002F%3E%3Cellipse cx='21.65' cy='18.62' fill='%23febbd0' rx='2.17' ry='1.28'\u002F%3E%3Cellipse cx='10.41' cy='18.62' fill='%23febbd0' rx='2.17' ry='1.28'\u002F%3E%3Cpath fill-rule='evenodd' d='M11.43 18.11a2 2 0 1 0-2-2.05a2.05 2.05 0 0 0 2 2.05m9.2 0a2 2 0 1 0-2-2.05a2 2 0 0 0 2 2.05'\u002F%3E%3Cpath fill='%238a8a8a' fill-rule='evenodd' d='M10.79 16.19a.77.77 0 1 0-.76-.77a.76.76 0 0 0 .76.77m9.2 0a.77.77 0 1 0 0-1.53a.77.77 0 0 0 0 1.53'\u002F%3E%3Cpath fill='%23b71422' stroke='%23000' stroke-width='.75' d='M18.62 19.67a3.3 3.3 0 0 1-1.09 1.75a2.48 2.48 0 0 1-1.5.69a2.53 2.53 0 0 1-1.5-.69a3.28 3.28 0 0 1-1.08-1.75a.26.26 0 0 1 .29-.3h4.58a.27.27 0 0 1 .3.3Z'\u002F%3E%3Cpath fill='%23ccbea7' fill-rule='evenodd' d='M14.93 5.75a6.1 6.1 0 0 1-2.09 4.62c-.1.09 0 .27.11.22c1.25-.49 2.94-1.94 2.23-4.88c-.03-.15-.25-.11-.25.04m.85 0a6 6 0 0 1 .57 5c0 .13.12.24.21.13c.83-1 1.54-3.11-.59-5.31c-.1-.11-.27.04-.19.17Zm1-.06a6.1 6.1 0 0 1 2.53 4.38c0 .14.21.17.24 0c.34-1.3.15-3.51-2.66-4.66c-.12-.02-.21.18-.09.27ZM9.94 9.55a6.27 6.27 0 0 0 3.89-3.33c.07-.13.28-.08.25.07c-.64 3-2.79 3.59-4.13 3.51c-.14-.01-.14-.21-.01-.25'\u002F%3E%3C\u002Fsvg%3E",[90,91,94],"tabs-item",{"label":68,"index":92,"icon":93},"1",{"name":77,"src":78,"ratio":79,"mask":16},[37,95,98],{"language":96,"frame":97,"class":40,"wrap":15},"sh","terminal",[42,99,101],{"class":100},"language-sh",[46,102,103,106,110],{"class":48,"style":49},[46,104,68],{"style":105},"color:#953800;--shiki-dark:#FFA657",[46,107,109],{"style":108},"color:#0A3069;--shiki-dark:#A5D6FF"," add",[46,111,112],{"style":108}," fleethosts",[90,114,117],{"label":69,"index":115,"icon":116},"2",{"name":81,"src":82,"ratio":79,"mask":16},[37,118,119],{"language":96,"frame":97,"class":40,"wrap":15},[42,120,121],{"class":100},[46,122,123,125,128],{"class":48,"style":49},[46,124,69],{"style":105},[46,126,127],{"style":108}," install",[46,129,112],{"style":108},[90,131,134],{"label":70,"index":132,"icon":133},"3",{"name":84,"src":85,"ratio":79,"mask":16},[37,135,136],{"language":96,"frame":97,"class":40,"wrap":15},[42,137,138],{"class":100},[46,139,140,142,144],{"class":48,"style":49},[46,141,70],{"style":105},[46,143,109],{"style":108},[46,145,112],{"style":108},[90,147,149],{"label":71,"index":66,"icon":148},{"name":87,"src":88,"ratio":79,"mask":16},[37,150,151],{"language":96,"frame":97,"class":40,"wrap":15},[42,152,153],{"class":100},[46,154,155,157,159],{"class":48,"style":49},[46,156,71],{"style":105},[46,158,109],{"style":108},[46,160,112],{"style":108},[33,162,163],{"name":42},[37,164,166],{"language":165,"class":40,"wrap":15},"ts",[42,167,169,53,188,53,190,53,215,53,232,53,237,53,254,53,280,53,296,53,304,53,315,53,319],{"class":168},"language-ts",[46,170,171,175,179,182,185],{"class":48,"style":49},[46,172,174],{"style":173},"color:#CF222E;--shiki-dark:#FF7B72","import",[46,176,178],{"style":177},"color:#1F2328;--shiki-dark:#E6EDF3"," { resolveHosts, runOnHosts, standardPlaces } ",[46,180,181],{"style":173},"from",[46,183,184],{"style":108}," \"fleethosts\"",[46,186,187],{"style":177},";",[46,189],{"class":48,"style":49},[46,191,192,195,199,202,206,209,212],{"class":48,"style":49},[46,193,194],{"style":173},"const",[46,196,198],{"style":197},"color:#0550AE;--shiki-dark:#79C0FF"," places",[46,200,201],{"style":173}," =",[46,203,205],{"style":204},"color:#8250DF;--shiki-dark:#D2A8FF"," standardPlaces",[46,207,208],{"style":177},"(",[46,210,211],{"style":108},"\"mytool\"",[46,213,214],{"style":177},");",[46,216,217,219,222,224,227,230],{"class":48,"style":49},[46,218,194],{"style":173},[46,220,221],{"style":197}," runs",[46,223,201],{"style":173},[46,225,226],{"style":173}," await",[46,228,229],{"style":204}," runOnHosts",[46,231,208],{"style":177},[46,233,234],{"class":48,"style":49},[46,235,236],{"style":177},"  places,",[46,238,239,242,245,248,251],{"class":48,"style":49},[46,240,241],{"style":173},"  async",[46,243,244],{"style":177}," (",[46,246,247],{"style":105},"remoteCommand",[46,249,250],{"style":177},") ",[46,252,253],{"style":173},"=>",[46,255,256,259,262,265,268,271,274,277],{"class":48,"style":49},[46,257,258],{"style":177},"    (",[46,260,261],{"style":173},"await",[46,263,264],{"style":204}," resolveHosts",[46,266,267],{"style":177},"(places, [",[46,269,270],{"style":108},"\"vps\"",[46,272,273],{"style":177},", ",[46,275,276],{"style":108},"\"tag:servers\"",[46,278,279],{"style":177},"], { remoteCommand })).targets,",[46,281,282,285,288,290,293],{"class":48,"style":49},[46,283,284],{"style":177},"  [",[46,286,287],{"style":108},"\"uptime\"",[46,289,273],{"style":177},[46,291,292],{"style":108},"\"-p\"",[46,294,295],{"style":177},"],",[46,297,298,301],{"class":48,"style":49},[46,299,300],{"style":197},"  30_000",[46,302,303],{"style":177},",",[46,305,306,309,312],{"class":48,"style":49},[46,307,308],{"style":177},"  { here: ",[46,310,311],{"style":197},"false",[46,313,314],{"style":177}," },",[46,316,317],{"class":48,"style":49},[46,318,214],{"style":177},[46,320,321,324,326,328,331,334,337,340,343,346],{"class":48,"style":49},[46,322,323],{"style":173},"for",[46,325,244],{"style":177},[46,327,194],{"style":173},[46,329,330],{"style":197}," run",[46,332,333],{"style":173}," of",[46,335,336],{"style":177}," runs) console.",[46,338,339],{"style":204},"log",[46,341,342],{"style":177},"(run.host, run.exitCode ",[46,344,345],{"style":173},"??",[46,347,348],{"style":177}," run.error);",[33,350,352],{"name":351},"output",[37,353,354],{"language":39,"class":40,"wrap":15},[42,355,356,53,361,53,366],{"class":44},[46,357,358],{"class":48,"style":49},[46,359,360],{},"vps 0",[46,362,363],{"class":48,"style":49},[46,364,365],{},"web-1.tail4f2a.ts.net 0",[46,367,368],{"class":48,"style":49},[46,369,370],{},"web-2.tail4f2a.ts.net offline in Tailscale",[372,373,378],"h2",{"id":374,"anchor":375},"three-entries",{"label":376,"icon":377},"Section titled \"Three entries\"","#","Three entries",[29,380,381,382,385,386,389],{},"No runtime dependencies: fleethosts runs ",[42,383,384],{},"ssh"," and ",[42,387,388],{},"tailscale"," from the machine.",[391,392,393,406,416],"card-group",{},[394,395,402,405],"card",{"color":396,"to":397,"label":398,"icon":399},"primary","\u002Fguide\u002Fhosts","Hosts",{"name":400,"src":401,"ratio":79,"mask":15},"lucide:server","data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Crect width='20' height='8' x='2' y='2' rx='2' ry='2'\u002F%3E%3Crect width='20' height='8' x='2' y='14' rx='2' ry='2'\u002F%3E%3Cpath d='M6 6h.01M6 18h.01'\u002F%3E%3C\u002Fg%3E%3C\u002Fsvg%3E",[403,404,398],"card-title",{},"Check entries, expand tags, run on each machine, record the fleet",[394,407,413,415],{"color":396,"to":408,"label":409,"icon":410},"\u002Fguide\u002Fexec","Exec",{"name":411,"src":412,"ratio":79,"mask":15},"lucide:terminal","data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 19h8M4 17l6-6l-6-6'\u002F%3E%3C\u002Fsvg%3E",[403,414,409],{},"Run a command to the end, with a timeout and a cancel that stop what it started",[394,417,423,425],{"color":396,"to":418,"label":419,"icon":420},"\u002Fguide\u002Fplaces","Places",{"name":421,"src":422,"ratio":79,"mask":15},"lucide:folder-tree","data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Zm0 11a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1ZM3 5a2 2 0 0 0 2 2h3'\u002F%3E%3Cpath d='M3 3v13a2 2 0 0 0 2 2h3'\u002F%3E%3C\u002Fg%3E%3C\u002Fsvg%3E",[403,424,419],{},"Your program's folders and the names it writes under",[29,427,428,429,432],{},"An unreachable machine gets an ",[42,430,431],{},"error"," and no exit code, so it never reads as a failed command.",[434],{"id":374,"depth":435,"text":378},2,1796388535639,"7b1f70a7-2953-4287-ada9-b3dc097b349d"]