https://github.com/pranavh-2004/termbrowse
A Terminal-Based Web Browser Lightweight, command-line web browser that supports Google search, text rendering, link navigation, bookmarking, and readability enhancements β all within your terminal.
https://github.com/pranavh-2004/termbrowse
browser cli internet minimalist search terminal text-browser tool web-browser
Last synced: about 1 month ago
JSON representation
A Terminal-Based Web Browser Lightweight, command-line web browser that supports Google search, text rendering, link navigation, bookmarking, and readability enhancements β all within your terminal.
- Host: GitHub
- URL: https://github.com/pranavh-2004/termbrowse
- Owner: Pranavh-2004
- License: mit
- Created: 2025-07-30T11:47:39.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-30T11:49:21.000Z (11 months ago)
- Last Synced: 2025-07-30T14:14:18.443Z (11 months ago)
- Topics: browser, cli, internet, minimalist, search, terminal, text-browser, tool, web-browser
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TermBrowse
**TermBrowse** is a lightweight command-line web browser designed for productivity and minimalism. It allows you to search the web, view readable text content, follow links, and manage bookmarks β all from your terminal.
---
## π¦ Features
* π Web search using DuckDuckGo
* π Browse simplified readable web pages
* π§ Navigate history: `:back`, `:forward`
* π Bookmark support: `:bookmark`, `:bookmarks`
* π Follow page links with `link ` or `l `
* π Paginated article view
* π Highlights visited links
---
## π§βπ» Usage
### π§ Installation
```bash
# Clone the repository
$ git clone https://github.com/your-username/termbrowse.git
$ cd termbrowse
# Create and activate a virtual environment
$ python3 -m venv venv
$ source venv/bin/activate
# Install dependencies
$ pip install -r requirements.txt
```
### π Running TermBrowse
```bash
$ python cli_browse.py
```
Youβll be greeted with a prompt:
```
π§ CLI Browser
Type a search query or command:
- :back, :forward, :bookmark, :bookmarks, :exit
- link or l to open a link on current page
```
---
## π Project Structure
```
TermBrowse/
βββ browser/ # Core browsing logic
β βββ fetch.py # Page fetching and readability parsing
β βββ history.py # Browsing history management
β βββ links.py # Link utilities
β βββ render.py # (optional extension)
β βββ search.py # DuckDuckGo search integration
βββ cli_browse.py # Main CLI launcher
βββ cli_browse_poc.py # Proof-of-concept legacy script
βββ data/
β βββ bookmarks.json # Bookmarked URLs
βββ tests/ # Unit tests
β βββ test_render.py
β βββ test_search.py
βββ utils/
β βββ formatter.py # Link display, text pagination, color formatting
β βββ bookmarks.py # Bookmark storage and retrieval
β βββ state.py # Session state manager
βββ requirements.txt # Dependencies
βββ LICENSE
βββ README.md # Youβre here!
```
---
## β
To-Do / Roadmap
* [x] Integrated readability parsing
* [x] Paginated terminal viewer
* [x] Bookmarks and visited link storage
* [ ] Tabbed browsing
* [ ] Image or media previews
* [ ] Custom themes (light/dark)
---
## π§ͺ Testing
Run tests using:
```bash
$ python -m unittest discover tests
```
---
## π§ Inspiration
* [w3m](http://w3m.sourceforge.net/)
* [lynx](https://lynx.invisible-island.net/)
* [readability-lxml](https://github.com/buriy/python-readability)
---
## βοΈ License
MIT License. See `LICENSE` file for details.
---
## π¨βπ Author
**Pranav Hemanth** β [@pranav-hemanth](https://github.com/pranav-hemanth)