Bing Webmaster CLI

Agents

Run bwt from coding agents with JSON output, structured errors, read-only mode, dry runs, and capability discovery.

bwt is built mainly for coding agents. Any agent or harness that can run shell commands can use it; nothing else is needed.

Ground rules

  • Run commands with -o json --no-input. Data is on stdout; notes and structured errors are on stderr.
  • Use --read-only unless the user asked for a change. It blocks every command that changes Bing state, local credentials, or the binary itself.
  • Run writes with --dry-run first and show the plan. Destructive commands (remove, block) also need --yes under --no-input; pass it only when the user asked for that exact change.
  • Never invent, print, or log an API key. If bwt auth status -o json fails, ask the user to run bwt auth login or to set BWT_API_KEY.
# A safe, non-interactive read for an agent
bwt --read-only stats queries --sort clicks --limit 20 -o json --no-input

Discover capabilities

bwt api methods -o json

Lists every Bing Webmaster method with its HTTP verb, read or write effect, status (implemented, experimental, or obsolete), and the commands that call it. Read/write effects come from a registry, not from the HTTP verb: url children is a read even though Bing implements it with POST, so it works under --read-only.

For anything without a dedicated command, bwt api METHOD calls the method directly with the same redaction, error handling, and date conversion. Unknown methods count as writes.

Automation flags

FlagEnvironmentEffect
--read-onlyBWT_READ_ONLY=1Blocks remote writes, credential changes, and self-update
--no-inputBWT_NO_INPUT=1Never prompts or opens a browser; commands fail instead
--dry-runPrints every write request, including each batch, and sends nothing
--yes, -yConfirms destructive commands and update without a prompt
--quietBWT_QUIET=1Drops informational notes from stderr
--verboseBWT_VERBOSE=1Logs method, redacted URL, and status to stderr
--siteBWT_SITESite for this command
--profileBWT_PROFILESaved profile for this command

Agents never see the update notice: its once-a-day GitHub check runs only when stderr is a terminal, and BWT_NO_UPDATE_NOTIFIER=1 turns it off everywhere. bwt update --check -o json reports current_version, latest_version, update_available, release_url, and install_method.

Reporting results honestly

  • Performance rows are Bing's top rows; never sum them into site totals. Use bwt stats summary.
  • Never call a submission "indexed". submit and indexnow submit report what Bing accepted.
  • An empty links or crawl issues result is not proof of health; say so.
  • UnknownError on URL methods means Bing gave no reason, not that the URL is missing from the index.
  • ThrottleUser and ThrottleHost mean stop; do not retry in a loop.

Reading the data covers each of these in detail.

Agent skill and LLM files

  • The agent skill lives at bwt/SKILL.md. Copy it into your agent's skills directory.
  • llms.txt indexes these docs, and llms-full.txt contains all of them, including the full command reference.

On this page