hubcap info

Get combined page information including title, URL, and meta details in a single call.

When to use

Use info to retrieve the page title, URL, and meta information together. Prefer this over making separate title and url calls when you need multiple pieces of page information.

Usage

hubcap info

Arguments

None.

Flags

None.

Output

FieldTypeDescription
titlestringThe document title
urlstringThe current page URL
readyStatestringDocument ready state (loading, interactive, complete)
characterSetstringCharacter encoding (e.g. UTF-8)
contentTypestringDocument content type (e.g. text/html)
{
  "title": "Example Domain",
  "url": "https://example.com",
  "readyState": "complete",
  "characterSet": "UTF-8",
  "contentType": "text/html"
}

Errors

ConditionExit codeStderr
Chrome not connected2error: connecting to Chrome: ...
Timeout3error: timeout

Examples

Get page info:

hubcap info

Print just the title and URL:

hubcap info | jq '{title, url}'

After navigation, confirm the page is on a secure context:

hubcap goto "https://example.com" && hubcap info | jq -e '.readyState == "complete"'

See also

  • title - get just the page title
  • url - get just the page URL
  • meta - get meta tags from the page
  • source - get the full HTML source