An open API service indexing awesome lists of open source software.

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.

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)