sincecutoff.com
← all changes

hf spaces logs retrieves Space run and build logs

Introduced 2026-04-16 · score 0.98

HOW TO USE IT

When debugging a Space build failure or runtime crash, run `hf spaces logs <space_id>` for available run logs; add `--build` for build logs, `-f` to follow, or `-n <count>` to limit output to the last lines.

hf spaces logs username/my-space
hf spaces logs username/my-space --build
hf spaces logs -f username/my-space hf spaces logs -n 50 username/my-space

WHY THIS HELPS

Debug a Space that fails to build or crashes at runtime.

BEFORE THIS CHANGE

Open the browser to retrieve Space logs.

REQUIREMENTS AND LIMITATIONS

  • Version: v1.11.0
  • SPACE_ID (required): Space ID, such as `username/repo-name`.
  • --build: Fetch container build logs instead of run logs.
  • -f, --follow: Stream log output until the server closes the stream; without it, print currently available logs.
  • -n, --tail INTEGER: Number of lines to show from the end of the logs.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card