Skip to content

Commit 4fe68be

Browse files
committed
rename sivit -> svt and change versioning strategy
1 parent 7d5ac92 commit 4fe68be

File tree

12 files changed

+83
-85
lines changed

12 files changed

+83
-85
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Build and upload binaries
4040
uses: taiki-e/upload-rust-binary-action@v1
4141
with:
42-
bin: sivit
42+
bin: svt
4343
target: ${{ matrix.target }}
4444
toolchain: stable
4545
checksum: sha256

CLAUDE.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# sivit - Project Guide
1+
# svt - Project Guide
22

33
## Overview
44

5-
sivit (Simple Image Viewer In Terminal) - A terminal-based image viewer with sxiv-like keybindings.
5+
SVT (Simple Viewer in Terminal) - A terminal-based image viewer with sxiv-like keybindings.
66

77
## Tech Stack
88

@@ -15,7 +15,7 @@ sivit (Simple Image Viewer In Terminal) - A terminal-based image viewer with sxi
1515
## Project Structure
1616

1717
```
18-
sivit/
18+
svt/
1919
├── Cargo.toml
2020
├── docs/
2121
│ └── architecture.md
@@ -51,16 +51,16 @@ cargo clippy # Lint
5151

5252
## Environment Variables
5353

54-
- `SIVIT_NAV_LATCH_MS` - Navigation latch (ms) before drawing images (default: 150)
55-
- `SIVIT_RENDER_CACHE_SIZE` - Client-side render cache size (encoded images in memory, default: 100)
56-
- `SIVIT_TMUX_KITTY_MAX_PIXELS` - Max pixels for tmux+kitty in `Normal` mode (default: 2000000)
57-
- `SIVIT_FORCE_ALT_SCREEN` - Force alternate screen mode
58-
- `SIVIT_NO_ALT_SCREEN` - Disable alternate screen mode
59-
- `SIVIT_DEBUG` - Enable debug info in status bar
60-
- `SIVIT_TRACE_WORKER` - Write worker timing logs to `/tmp/sivit_worker.log`
61-
- `SIVIT_KGP_NO_COMPRESS` - Disable zlib compression for KGP transmission
62-
- `SIVIT_COMPRESS_LEVEL` - Zlib compression level 0-9 (default: 6, higher = smaller but slower)
63-
- `SIVIT_PREFETCH_COUNT` - Number of images to prefetch ahead/behind (default: 5)
54+
- `SVT_NAV_LATCH_MS` - Navigation latch (ms) before drawing images (default: 150)
55+
- `SVT_RENDER_CACHE_SIZE` - Client-side render cache size (encoded images in memory, default: 100)
56+
- `SVT_TMUX_KITTY_MAX_PIXELS` - Max pixels for tmux+kitty in `Normal` mode (default: 2000000)
57+
- `SVT_FORCE_ALT_SCREEN` - Force alternate screen mode
58+
- `SVT_NO_ALT_SCREEN` - Disable alternate screen mode
59+
- `SVT_DEBUG` - Enable debug info in status bar
60+
- `SVT_TRACE_WORKER` - Write worker timing logs to `/tmp/svt_worker.log`
61+
- `SVT_KGP_NO_COMPRESS` - Disable zlib compression for KGP transmission
62+
- `SVT_COMPRESS_LEVEL` - Zlib compression level 0-9 (default: 6, higher = smaller but slower)
63+
- `SVT_PREFETCH_COUNT` - Number of images to prefetch ahead/behind (default: 5)
6464

6565
## Coding Conventions
6666

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing
22

3-
Thanks for contributing to `sivit`.
3+
Thanks for contributing to `svt`.
44

55
## Quick start
66

@@ -33,8 +33,8 @@ cargo clippy --all-targets --all-features
3333

3434
| Env | Description |
3535
|-----|-------------|
36-
| `SIVIT_TRACE_WORKER=1` | Write worker timing logs to `/tmp/sivit_worker.log` |
37-
| `SIVIT_DEBUG=1` | Add debug info to status bar |
36+
| `SVT_TRACE_WORKER=1` | Write worker timing logs to `/tmp/svt_worker.log` |
37+
| `SVT_DEBUG=1` | Add debug info to status bar |
3838

3939
## Tips
4040

Cargo.lock

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
2-
name = "sivit"
3-
version = "2025.12.26"
2+
name = "svt"
3+
version = "25.12.1"
44
edition = "2024"
5-
description = "Simple Image Viewer In Terminal - sxiv-like terminal image viewer"
5+
description = "Simple Viewer in Terminal - sxiv-like terminal image viewer"
66

77
[dependencies]
88
ratatui = { version = "0.29", features = ["crossterm"] }

README.md

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
1-
# sivit
1+
# SVT
22

3-
**S**imple **I**mage **V**iewer **I**n **T**erminal
3+
**S**imple **V**iewer in **T**erminal
44

5-
A terminal-based image viewer with sxiv-like keybindings. Works over SSH with Tmux.
5+
A blazing fast terminal image viewer written in Rust with sxiv-like keybindings. Works over SSH with Tmux.
66

7-
![](./samples/sivit.png)
7+
![](./samples/svt.png)
88

99
## Features
1010

11-
- Kitty Graphics Protocol (KGP) image rendering
12-
- sxiv/vim-like keyboard navigation (counts supported)
13-
- Zlib compression for fast image transmission
14-
- Prefetch adjacent images for instant navigation
15-
- Render cache for snappy navigation
16-
- `Fit` toggle (upscale to viewport) + `Normal` (shrink-only)
11+
- **Fast** - Zlib compression, prefetch, and render cache for instant navigation
12+
- **Keyboard-driven** - sxiv/vim-like keybindings with count support
13+
- **Flexible** - Fit/Normal display modes, works over SSH with Tmux
14+
- **KGP** - Kitty Graphics Protocol for high-quality image rendering
1715

1816
## Requirements
1917

2018
- Kitty Graphics Protocol supported terminal
21-
- Optional: tmux (uses `allow-passthrough=on`, `sivit` attempts to set it automatically)
19+
- Optional: tmux (uses `allow-passthrough=on`, `svt` attempts to set it automatically)
2220
- Rust 1.75+
2321

2422
Tested: Ghostty + tmux.
@@ -27,16 +25,16 @@ Tested: Ghostty + tmux.
2725

2826
### From Release
2927

30-
Download the latest binary from [Releases](https://github.com/kan-bayashi/sivit/releases):
28+
Download the latest binary from [Releases](https://github.com/kan-bayashi/svt/releases):
3129

3230
```bash
3331
# macOS (Apple Silicon)
34-
curl -L https://github.com/kan-bayashi/sivit/releases/latest/download/sivit-aarch64-apple-darwin.tar.gz | tar xz
35-
sudo mv sivit /usr/local/bin/
32+
curl -L https://github.com/kan-bayashi/svt/releases/latest/download/svt-aarch64-apple-darwin.tar.gz | tar xz
33+
sudo mv svt /usr/local/bin/
3634

3735
# Linux (x86_64)
38-
curl -L https://github.com/kan-bayashi/sivit/releases/latest/download/sivit-x86_64-unknown-linux-gnu.tar.gz | tar xz
39-
sudo mv sivit /usr/local/bin/
36+
curl -L https://github.com/kan-bayashi/svt/releases/latest/download/svt-x86_64-unknown-linux-gnu.tar.gz | tar xz
37+
sudo mv svt /usr/local/bin/
4038
```
4139

4240
### From Source
@@ -48,10 +46,10 @@ cargo install --path .
4846
## Usage
4947

5048
```bash
51-
sivit image.png
52-
sivit ~/photos/
53-
sivit *.png
54-
sivit ~/photos/*.jpg
49+
svt image.png
50+
svt ~/photos/
51+
svt *.png
52+
svt ~/photos/*.jpg
5553
```
5654

5755
## Keybindings
@@ -72,14 +70,14 @@ Vim-like counts are supported (e.g. `5j`, `10G`).
7270

7371
| Env | Default | Description |
7472
|-----|---------|-------------|
75-
| `SIVIT_NAV_LATCH_MS` | `150` | Navigation latch (ms) before drawing images |
76-
| `SIVIT_RENDER_CACHE_SIZE` | `100` | Render cache entries |
77-
| `SIVIT_PREFETCH_COUNT` | `5` | Number of images to prefetch ahead/behind |
78-
| `SIVIT_COMPRESS_LEVEL` | `6` | Zlib compression level 0-9 |
79-
| `SIVIT_KGP_NO_COMPRESS` | unset | Disable zlib compression |
80-
| `SIVIT_TMUX_KITTY_MAX_PIXELS` | `2000000` | Max pixels in `Normal` mode (tmux+kitty) |
81-
| `SIVIT_FORCE_ALT_SCREEN` | unset | Force alternate screen |
82-
| `SIVIT_NO_ALT_SCREEN` | unset | Disable alternate screen |
73+
| `SVT_NAV_LATCH_MS` | `150` | Navigation latch (ms) before drawing images |
74+
| `SVT_RENDER_CACHE_SIZE` | `100` | Render cache entries |
75+
| `SVT_PREFETCH_COUNT` | `5` | Number of images to prefetch ahead/behind |
76+
| `SVT_COMPRESS_LEVEL` | `6` | Zlib compression level 0-9 |
77+
| `SVT_KGP_NO_COMPRESS` | unset | Disable zlib compression |
78+
| `SVT_TMUX_KITTY_MAX_PIXELS` | `2000000` | Max pixels in `Normal` mode (tmux+kitty) |
79+
| `SVT_FORCE_ALT_SCREEN` | unset | Force alternate screen |
80+
| `SVT_NO_ALT_SCREEN` | unset | Disable alternate screen |
8381

8482
## Contributing
8583

docs/architecture.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Architecture
22

3-
`sivit` is a terminal image viewer built around Kitty Graphics Protocol (KGP).
3+
`svt` is a terminal image viewer built around Kitty Graphics Protocol (KGP).
44
The core goal is: keep navigation/status updates responsive even when image rendering or terminal I/O is slow.
55

66
## High-level pipeline
@@ -56,7 +56,7 @@ This design prevents "blank screen" issues that occur when image data is partial
5656

5757
## KGP ID Strategy
5858

59-
`sivit` uses a single KGP ID per process (inspired by Yazi):
59+
`svt` uses a single KGP ID per process (inspired by Yazi):
6060

6161
- The ID is generated at startup based on the process ID.
6262
- RGB components are ensured to be >= 16 to avoid terminal color quantization issues.
@@ -75,10 +75,10 @@ This approach:
7575

7676
## Caching
7777

78-
`sivit` uses a **client-side render cache** only:
78+
`svt` uses a **client-side render cache** only:
7979

8080
- **Render cache** (`render_cache` in `App`): Stores decoded/resized/encoded image data.
81-
- Size controlled by `SIVIT_RENDER_CACHE_SIZE` (default: 15).
81+
- Size controlled by `SVT_RENDER_CACHE_SIZE` (default: 15).
8282
- LRU eviction when cache is full.
8383

8484
The terminal-side cache is **not** relied upon. Each transmit starts with `delete_by_id` to ensure a clean slate. This trades some bandwidth for simplicity and correctness.
File renamed without changes.

src/app.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn render_cache_limit() -> usize {
3535
const DEFAULT: usize = 100;
3636
const MAX: usize = 500;
3737

38-
std::env::var("SIVIT_RENDER_CACHE_SIZE")
38+
std::env::var("SVT_RENDER_CACHE_SIZE")
3939
.ok()
4040
.and_then(|s| s.parse::<usize>().ok())
4141
.unwrap_or(DEFAULT)
@@ -442,7 +442,7 @@ impl App {
442442
}
443443

444444
fn prefetch_count() -> usize {
445-
std::env::var("SIVIT_PREFETCH_COUNT")
445+
std::env::var("SVT_PREFETCH_COUNT")
446446
.ok()
447447
.and_then(|s| s.parse::<usize>().ok())
448448
.unwrap_or(5)
@@ -569,7 +569,7 @@ impl App {
569569
resolution,
570570
);
571571

572-
if std::env::var_os("SIVIT_DEBUG").is_some() {
572+
if std::env::var_os("SVT_DEBUG").is_some() {
573573
if self.is_tmux {
574574
status.push_str(" tmux");
575575
}

src/kgp.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ pub fn erase_rows(area: Rect) -> Vec<Vec<u8>> {
129129
}
130130

131131
fn compression_level() -> Option<u32> {
132-
if std::env::var_os("SIVIT_KGP_NO_COMPRESS").is_some() {
132+
if std::env::var_os("SVT_KGP_NO_COMPRESS").is_some() {
133133
return None;
134134
}
135-
let level = std::env::var("SIVIT_COMPRESS_LEVEL")
135+
let level = std::env::var("SVT_COMPRESS_LEVEL")
136136
.ok()
137137
.and_then(|s| s.parse::<u32>().ok())
138138
.unwrap_or(6)
@@ -151,8 +151,8 @@ pub fn encode_chunks(img: &DynamicImage, id: u32, is_tmux: bool) -> Vec<Vec<u8>>
151151

152152
let compress_level = compression_level();
153153
let data = if let Some(level) = compress_level {
154-
use flate2::write::ZlibEncoder;
155154
use flate2::Compression;
155+
use flate2::write::ZlibEncoder;
156156
let mut encoder = ZlibEncoder::new(Vec::new(), Compression::new(level));
157157
let _ = encoder.write_all(&raw);
158158
encoder.finish().unwrap_or(raw)

0 commit comments

Comments
 (0)