Tricks
Section titled “Tricks”Each trick on this page is a few lines you can paste into a terminal or into ~/.bashrc (or ~/.zshrc). The snippets use the Hoody CLI, plain curl and ssh. Keys and tokens come from environment variables, never from the command line.
Hoody Bots from your shell
Section titled “Hoody Bots from your shell”These read two variables. Put the URL in your shell profile, and load the key once per session with read -rs, so it never lands in your history:
# ~/.bashrcexport HOODY_BOT='https://amber-falcon-river-k7m2q.hoody.bot'# In the shell, once per session (not in ~/.bashrc): paste the hbk_ key; it is not shownread -rs HOODY_BOT_KEY && export HOODY_BOT_KEYThe Hoody CLI reads HOODY_BOT_KEY on its own; there is no --key flag. Everyone who holds a key to the same Bot shares one conversation with it. See Bot URLs for creating the URL and its keys.
Ask your Bot in one word
Section titled “Ask your Bot in one word”ask() { hoody boturls ask "$HOODY_BOT" -- "$*"; }
ask what is blocking the releaseask sends the message and waits for the reply, for up to 10 minutes. -- keeps a message that starts with - from being read as a flag.
Pipe a diff or a log into the Bot
Section titled “Pipe a diff or a log into the Bot”askp() { local input; input=$(cat) || return; hoody boturls ask "$HOODY_BOT" -- "$*"$'\n\n'"$input"; }
git diff --cached | askp "Review this staged diff"tail -n 200 build.log | askp "Why did this build fail?"The question comes first, then whatever arrives on standard input. A message holds up to 64 KiB of text.
Stream the reply as it is written
Section titled “Stream the reply as it is written”chat() { hoody boturls chat "$HOODY_BOT" -- "$*"; }chat draft a release note for v2.3 prints the reply piece by piece instead of all at once.
Pick up a long answer later
Section titled “Pick up a long answer later”hoody boturls ask "$HOODY_BOT" --no-wait -o json -- "Audit the test suite" | jq '{status, ref}'
# Later: wait for that same reply; nothing new is senthoody boturls ask "$HOODY_BOT" --ref '<ref>' --max-wait 1800When status is working, the ref lets you come back for the answer without posting the task twice.
One function per Bot
Section titled “One function per Bot”workbot() { hoody boturls ask "$WORK_BOT" --key-env WORK_BOT_KEY -- "$*"; }--key-env names the variable that holds this Bot’s key, so several Bots never share HOODY_BOT_KEY.
Approve an agent’s question from any terminal
Section titled “Approve an agent’s question from any terminal”hoody boturls status "$HOODY_BOT"hoody boturls answer "$HOODY_BOT" --gate-id '<gate_id>' --decision approvestatus lists the approvals the Bot’s agents are waiting on. --decision takes approve, allow_session, deny or answer (with --text).
Use your Bot as Claude Code’s model
Section titled “Use your Bot as Claude Code’s model”alias claude-bot='ANTHROPIC_BASE_URL="$HOODY_BOT" ANTHROPIC_API_KEY="$HOODY_BOT_KEY" ANTHROPIC_MODEL=claude-sonnet-4-5 CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false claude'On the first start, answer Yes to using the detected API key. The Bot answers in text and does not run Claude Code’s tools. Codex, opencode and pi work too; see Use it from a coding agent.
Computer URLs
Section titled “Computer URLs”Build a service URL
Section titled “Build a service URL”# ~/.bashrc: replace the three values with your computer'sexport PROJECT_ID='replace-with-project-id' COMPUTER_ID='replace-with-computer-id' SERVER='replace-with-server'
hurl() { printf 'https://%s-%s-%s-%s.%s.computers.hoody.com\n' \ "$PROJECT_ID" "$COMPUTER_ID" "${1:?service}" "${2:-1}" "$SERVER"}
hurl files # files-1hurl terminal 2 # terminal-2hurl http 3000 # whatever listens on port 3000hurl always adds an instance number. SSH is the exception: its host is {projectId}-{computerId}-ssh.{server}.computers.hoody.com, with no instance suffix.
The tricks below use hurl. Each service and its URL are listed in Hoody Kit.
Every port is already a URL
Section titled “Every port is already a URL”curl "$(hurl http 3000)/"A dev server listening on port 3000 inside the computer is reachable over HTTPS, within the computer’s proxy permissions. For a short name, create an alias: hoody proxy aliases create --computer-id "$COMPUTER_ID" --alias my-app --program http --port 3000. In the Hub, open Computers, select the computer, then open Ports & addresses. Under Aliases, choose Create alias, enter 3000 under Port and my-app under Alias, then choose Create alias. See Proxy aliases.
Download a folder as a ZIP
Section titled “Download a folder as a ZIP”curl -fS "$(hurl files)/documents/?zip" -o documents.zipcurl -fsS "$(hurl files)/backup.tar.gz?preview" # list an archive without downloading itIn the Hub, open Files, pick the computer, and choose Download as .zip from the folder’s menu. For a folder on the computer’s filesystem, a ZIP that would hold more than 1,000,000 visible files, scan more than 10,000,000 entries, or go deeper than 50 levels is refused with 422 ARCHIVE_TOO_LARGE; download its subfolders separately. See Hoody Files.
Upload a script that is already executable
Section titled “Upload a script that is already executable”curl -fsS -X PUT "$(hurl files)/api/v1/files/scripts/report.sh?chmod=755" --data-binary @report.shThe file is written and its mode set in one request.
Send a file between two machines
Section titled “Send a file between two machines”# Machine Acurl -T report.pdf "$(hurl pipe)/api/v1/pipe/report"
# Machine B: either side can start firstcurl "$(hurl pipe)/api/v1/pipe/report" > report.pdfPipe does not save transferred files. Hoody Proxy logs may retain request and response body content; see Auditing. Each side waits for the other for up to 300 seconds by default. See Pipe.
Reach a database on another machine
Section titled “Reach a database on another machine”# On the machine with the databasehoody pipe forward pg --ws --connect 127.0.0.1:5432 -c "$COMPUTER_ID"# On your machinehoody pipe forward pg --ws --listen 127.0.0.1:15432 -c "$COMPUTER_ID"
# In another terminal, while --listen runspsql -h 127.0.0.1 -p 15432--listen opens a local port on your machine and --connect dials the database. It carries one TCP connection at a time, so run --connect again for the next client. Any TCP service works the same way.
Turn a POST into a link
Section titled “Turn a POST into a link”curl -fsSG "$(hurl curl)/api/v1/curl/request" \ --data-urlencode "url=$TARGET_URL" \ --data-urlencode 'method=POST' \ --data-urlencode 'json={"action":"check"}' \ --data-urlencode 'response=transparent'Hoody cURL makes the POST for you, so a tool that can only open a URL can still trigger it. --data-urlencode keeps spaces, & and nested JSON intact. See Hoody cURL.
Get a notification when a job finishes
Section titled “Get a notification when a job finishes”done-notify() { jq -n --arg body "$1 finished" '{display: "1", summary: "Done", body: $body}' | curl -fsS -X POST "$(hurl n)/api/v1/notifications/notify" \ -H "Content-Type: application/json" --data-binary @- > /dev/null || echo "done-notify: notification not sent" >&2}
make release; done-notify "make release"The notification shows on display 1 of the computer. -f makes curl fail on an HTTP error, such as a 429 or 503, so a missed notification prints a message instead of passing silently. notify allows 10 requests a minute. See Notifications.
Hand your account to any AI
Section titled “Hand your account to any AI”Paste @https://hoody.com Connect to Hoody into ChatGPT, Claude, Gemini or any AI that can run code with network access. It reads the Hoody Skill and sends you a browser sign-in link; once you approve, it can run your whole account. To hand it a token instead, give it a scoped auth token, not your login.
Hoody CLI
Section titled “Hoody CLI”Pick a computer with fzf
Section titled “Pick a computer with fzf”hc() { COMPUTER_ID=$(hoody computers list --limit 100 -o json | jq -r '.computers[] | [.id, .name, .status] | @tsv' | fzf | cut -f1) export COMPUTER_ID HOODY_COMPUTER=$COMPUTER_ID}After hc, every kit command targets the computer you picked, with no -c. To keep one computer across shells, save it instead: hoody config set computer <id>.
Snapshot before anything risky
Section titled “Snapshot before anything risky”safe() { hoody snapshots create -c "$COMPUTER_ID" --alias "before-$(date +%Y%m%d-%H%M%S)" && hoody terminal commands run -c "$COMPUTER_ID" --ephemeral --command "$*"}
safe "python3 migrate.py --destructive"If it goes wrong, hoody snapshots list -c "$COMPUTER_ID" shows the snapshot to pass to hoody snapshots restore <name> -c "$COMPUTER_ID" -y. In the Hub, open Computers, select the computer and open Backups. Choose Take snapshot, enter a Name and choose Take snapshot. To restore it, choose Restore on its row, then Restore computer.
By default the CLI waits 30 seconds for the command’s answer. No flag, environment variable or config set key changes that. A command that runs longer is reported as failed while it keeps running on the computer, up to its own --timeout (600 seconds by default with --ephemeral). Check that it has stopped before you restore the snapshot.
One alias per account
Section titled “One alias per account”alias hw='hoody --profile work'alias hp='hoody --profile personal'Each profile keeps its own sign-in, default computer and output format. Sign in once with hw login.
Make scripts fail instead of prompting
Section titled “Make scripts fail instead of prompting”hoody --non-interactive -o json computers list | jq -r '.computers[] | .name'--non-interactive turns interactive prompts into errors, but a destructive command may still read a confirmation from standard input; pass -y only when you intend to approve the action. -o json prints the response for jq. For headless use, set HOODY_TOKEN. See Output formats.
Find out why a command hit the wrong computer
Section titled “Find out why a command hit the wrong computer”hoody local defaults gethoody config get --resolvedlocal defaults get shows the active profile and where each default comes from: a flag, an environment variable or the config file. config get --resolved shows the merged values but does not label their sources. It follows a typed --profile, --config and --base-url, but leaves out --token, --computer, --realm and --proxy typed on the command line.
Tab completion in this shell
Section titled “Tab completion in this shell”source <(hoody completion bash)Add the line to ~/.bashrc to load it in every shell. In fish, use hoody completion fish | source; for zsh, see Shell completion.
The CLI from any machine
Section titled “The CLI from any machine”ssh hoody.com # sign in from the menu; an account with a computer opens the Hubssh "$HDY_TOKEN@hoody.com" # already signed in: HDY_TOKEN holds an hdy_ auth tokenOpens the Hoody CLI from any SSH client, with nothing installed: a borrowed laptop, a server, a phone app. With a token as the username, you start at a prompt with the full hoody command. It is interactive only, and ssh hoody.com <command> is refused, so scripts use the installed CLI. A session login token is too long for an SSH username, so use an hdy_ auth token, and a scoped one: the username shows in your process list. See Use the CLI over SSH.
Name your computers in ~/.ssh/config
Section titled “Name your computers in ~/.ssh/config”# ~/.ssh/configHost dev HostName {projectId}-{computerId}-ssh.{server}.computers.hoody.com User root IdentityFile ~/.ssh/hoody-dev IdentitiesOnly yesThen ssh dev, ssh dev 'cd /app && git pull', sftp dev and VS Code Remote-SSH all reach the computer by name. A one-off command returns its output and exit code, so it works in scripts. Add the public key to the computer first; see SSH access.
What’s Next
Section titled “What’s Next”- Hoody CLI: every global flag, profile and setting.
- Call a Bot URL: the OpenAI, Anthropic and MCP doors, exit codes and long answers.
- SSH access: keys, clients and SFTP.
- Hoody Kit: the services behind each computer URL.