Add agentview command + refactor CLI into command-registry architecture#1
Open
InlinePizza wants to merge 1 commit intomainfrom
Open
Add agentview command + refactor CLI into command-registry architecture#1InlinePizza wants to merge 1 commit intomainfrom
InlinePizza wants to merge 1 commit intomainfrom
Conversation
…ture - Extract slop-cop and completion into separate command files under src/commands/ - Add COMMANDS registry (registry.ts) for clean subcommand dispatch - Add agentview subcommand: fetches a URL and renders the markdown a coding agent sees, stripping nav/header/footer chrome via turndown - Add tsup build config (ESM bundle, Node 20 target, zero external deps) - Add turndown + @types/turndown for HTML→markdown conversion
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
agentviewsubcommand: fetches any HTTP/HTTPS URL and prints the markdown a coding agent would see — strips nav/header/footer/sidebar chrome viaturndown, extracts<main>or<article>content first when availablesrc/cli.tssplit intosrc/commands/with a centralCOMMANDSregistry;slop-copandcompletioneach get their own filetsup.config.ts(ESM bundle, Node 20 target, all deps inlined — ships as a singledist/cli.js)turndown+@types/turndownadded as dev deps (bundled at build time)Usage
Test plan
promptless agentview --helpshows usagepromptless agentview https://nodejs.org/en/aboutreturns clean markdown (no nav, no scripts)promptless agentview <url> -o out.mdwrites file correctlypromptless agentview(no URL) exits 2 with help textpromptless agentview not-a-urlexits 2 with errorpromptless slop-copstill works as beforepromptless completion zshstill works as before🤖 Generated with Claude Code