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

https://github.com/itcodehery/project_catport

A modern terminal-based file viewer with live sharing capabilities
https://github.com/itcodehery/project_catport

cat code rust sharing viewer websocket

Last synced: 4 months ago
JSON representation

A modern terminal-based file viewer with live sharing capabilities

Awesome Lists containing this project

README

          

ο»Ώ![Catport Banner](./images/catport_banner.png)

---

# 🐾 Catport

_A modern terminal-based file live sharing utility with file viewing capabilities_

---

## Features

- **Syntax Highlighting**
Powered by [syntect](https://github.com/trishume/syntect), Catport makes your code easier to read and navigate.

- **Real-time Live Share**
Instantly share files via **WebSockets** using [axum](https://github.com/tokio-rs/axum). Perfect for walkthroughs, code reviews, or lightweight pair programming.

- **File Change Tracking**
With [notify](https://github.com/notify-rs/notify), Catport streams file changes live to connected viewers.

- **Terminal-first Experience**
Simple, intuitive, and fastβ€”just like `cat`, but supercharged.

---

## Cat β†’ Bat β†’ Catport

- **`cat`** – View text files.
- **`bat`** – Adds syntax highlighting and paging.
- **`catport`** – Adds **real-time collaborative viewing** over the internet.

---

## Installation

```bash
# Clone the repo
git clone https://github.com/yourusername/catport.git
cd catport

# Build with Cargo
cargo build --release

# Run it
./target/release/catport
```

---

## Commands

Catport provides three main commands:

### View

View a file locally with syntax highlighting.

```bash
catport view src/main.rs
```

### Share

Share a file over WebSocket for others to view in real time.

```bash
catport share src/lib.rs
```

This will print a **shareable link** that others can use to connect.

### Connect

Connect to a shared file session and track updates live.

```bash
catport connect http://localhost:3000/share/
```

---

## Built With

- [Rust](https://www.rust-lang.org/) – safe, fast, and concurrent
- [Axum](https://github.com/tokio-rs/axum) – for WebSocket-powered sharing
- [Syntect](https://github.com/trishume/syntect) – syntax highlighting
- [Notify](https://github.com/notify-rs/notify) – file watching

---

## Roadmap

- [βœ…] Finishing Implementation for Viewing and Syntax Highlighting
- [βœ…] Finishing Implementations for Sharing
- [ ] Finishing Implementation for Connecting via Terminal
- [ ] Global Installation Implementation (PATH)
- [ ] Two-way collaborative editing
- [ ] Role-based permissions for viewers
- [ ] Editor/IDE plugins

---

## Contributing

I'm building Catport as an **open-source community project**. Contributions are welcome!

1. Fork the repo
2. Create a feature branch
3. Commit your changes
4. Push and open a Pull Request

Check out the [Issues](./issues) page for things to work on.

---

**Catport** – _from viewing, to highlighting, to sharing._

---