Agris is a terminal-based web browser that provides a simple CLI interface for navigating the web. It supports basic browsing capabilities, HTML parsing, and now includes advanced features like JavaScript execution (where supported), handling of dialog boxes, binary content handling, and bot detection avoidance.
- GET Requests: Fetch and display web content
- POST Requests: Submit forms and post data
- HEAD Requests: View HTTP headers
- Uses Cheerio (jQuery-like) library for robust HTML parsing
- Extracts text, links, and forms
- Handles complex HTML structures better than regex
- Uses Puppeteer for JavaScript execution
- Handles dynamic content loaded after page load
- Processes AJAX requests
- Falls back to standard mode if JavaScript rendering is not available
- Detects binary content types (images, videos, PDFs, documents, etc.)
- Maintains buffer integrity for binary data instead of corrupting it
- Shows informative references like
[Image: URL]or[Video: URL] - Extracts binary content references from HTML pages
- Displays metadata (content type, size, file extension) for binary responses
- Rotates user agents to appear more like regular browsers
- Adds authentic browser headers
- Handles referrer chains for natural browsing patterns
- Automatically detects and bypasses Cloudflare protection
- Provides alternative handling for Google captcha challenges
- Falls back to alternative access methods when needed
- Persistent cookie storage between sessions
- Proper domain matching for cookie handling
- Support for all cookie attributes (Secure, HttpOnly, SameSite, etc.)
- Automatic cookie expiration management
- Session tracking across multiple requests
- Auto-dismisses alerts
- Auto-confirms confirmation dialogs
- Auto-dismisses prompts
- Handles "beforeunload" dialogs
- Follow links by number
- Search multiple engines (DuckDuckGo, Google, Bing)
- Track state between commands
# Regular browsing
agris get <url>
# JavaScript-enabled browsing
agris jsget <url>
# View raw HTML
agris get --raw <url>
# View HTTP headers
agris head <url># Search with default engine (DuckDuckGo)
agris search "query"
# Search with specific engine
agris search --engine=google "query"
# Search with JavaScript enabled
agris search --js=yes "query"# Post form data
agris post <url> form:"formname" "field1":"value1" "field2":"value2"# Follow a link from the previous page
agris follow <link_number>
# Follow a link with JavaScript enabled
agris follow <link_number> --js=yes# Show help
agris help
# Show version
agris version--raw: Display the raw HTML content--show-links=yes|no: Show or hide extracted links--engine=name: Specify search engine (duckduckgo, google, bing)--js=yes: Enable JavaScript rendering
- The browser works on all platforms where Node.js is available
- Basic HTML parsing works on all platforms
- JavaScript rendering requires Puppeteer, which is not supported on all platforms:
- Supported: Windows, macOS, most Linux distributions
- Not supported: Termux/Android, some restricted environments
- The browser automatically detects if JavaScript rendering is available and falls back to standard mode if it's not
- Uses Cheerio for DOM manipulation similar to jQuery
- Extracts text by filtering out script and style tags
- Deduplicates links based on URL
- Normalizes URLs for proper display
- Launches a headless Chromium browser via Puppeteer
- Waits for network activity to settle (networkidle2)
- Extracts HTML after JavaScript execution
- Handles dialogs automatically
- Maintains state between commands using a local file
- Stores the last viewed page for navigation
- Supports future history and bookmark features
- Update relevant module in
src/core/ - Add command handler in
src/cli/commands.js - Update input parser in
src/cli/inputParser.js - Update documentation and help text
- Run the browser with
npm startoragris - Test HTML parsing with various websites
- Test JavaScript rendering with dynamic sites where supported
- Check dialog handling with the included test page
AGRIS is now available as an npm package, making installation easier than ever.
npm install -g agrisnpm install -g agris --no-optionalgit clone https://github.com/salviz/agris.git
cd agris
npm install
npm linknpx agris get https://example.comFor detailed installation instructions, troubleshooting, and platform-specific guidance, see INSTALLATION.md.
See the LESSONS_LEARNED.md file for insights gained during development.