Skip to main content

Install

Install with npm. You need Node.js 20 or later.
To install without Node.js, use the standalone binary:
npx -y @stophy/cli init --all logs you in, adds Stophy’s agent skills to your agents, and adds the Stophy MCP server, in one command.

Authenticate

Log in with your browser:
The CLI prints a code and opens stophy.dev. Check that the page shows the same code, then approve it. On a server with no browser, open the printed link on any other device: the CLI logs in once you approve there. To use an API key instead, pass it to login or set it as an environment variable:
Each computer gets its own key. Google search, Google News, Google Maps search, Reddit search, YouTube search, YouTube video and YouTube transcript work without logging in. Log out and revoke this computer’s key:

Make a call

Name the source, then the command:
To point at one thing, give its link or its id as the argument, like stophy youtube video M4TufsFlv_o, or use the matching option, like --videoUrl or --videoId. Send one, not both. Run stophy <source> --help to see what a source can do, and stophy <source> <command> --help for every option on one command. If you give a value an option does not accept, the CLI stops before it calls Stophy and lists which values work.

Read the output

By default, lists print one row per result with its title and link, and other results print as name: value lines. Add --json to get the data as JSON instead, with the credits used printed to stderr. --raw prints the full response, including its request id.

Page through results

Commands for sites with numbered pages take --page. Commands for sites with their own cursor end their output with a cursor when there is more; pass it back to get the next page:

Save the output

-o <path> writes the output to a file instead of stdout:

Handle errors and retries

A failed call exits non-zero and writes its message to stderr. When the API says to wait, the message ends with Retry after Ns. and the CLI does not retry for you:
To retry on a rate limit from a script, parse the wait time out of that message, or call stophy status first to check your account is live before a batch of calls.

Check your account

status shows your login and balance. usage shows your balance and all-time usage. logs shows your recent requests.

Commands