Add explorbot navigate CLI command#38
Merged
Merged
Conversation
Exposes the AI Navigator as a one-shot CLI command. Exits 0 when the target URL is reached and 1 otherwise, so it can be used as a reachability probe in CI. Inherits --session and all common options, making it the canonical way to capture an authenticated session for downstream agents in a single command. Also restructures docs/commands.md to treat CLI as a first-class surface alongside TUI: a comprehensive reference table, per-command sections showing both invocations side by side, and coverage of the previously-undocumented CLI-only commands. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
explorbot navigate <url>as a CLI command. Exits0when the AI Navigator reaches the URL and1otherwise, so it can be used as a reachability probe in CI or as the canonical "capture an authenticated session" step (explorbot navigate /login --session) feeding downstream agents.NavigateCommand(already wired as/navigatein the TUI) — no behavior change to the TUI surface.docs/commands.mdto treat CLI as a first-class surface alongside TUI: comprehensive reference table at the top, every command section now shows both CLI and TUI invocations, and previously-undocumented CLI-only commands (shell,test,learn,init,clean,extract-rules) are now covered.Test plan
bun installbun run bin/explorbot-cli.ts navigate --helpshows the new subcommand with all common options including--sessionbun run bin/explorbot-cli.ts navigate /<reachable-path> --sessionexits0and writesoutput/session.jsonbun run bin/explorbot-cli.ts navigate /<reachable-path> --session ./auth.jsonwrites to the custom session pathbun run bin/explorbot-cli.ts navigate /this-page-does-not-exist-xyzzyexits1/navigatestill works insideexplorbot startbun run format && bun run lint:fixclean🤖 Generated with Claude Code