Installation

Note

tarzi supports only Linux and macOS. Windows is not supported.

tarzi is available as both a Python package and a Rust crate, with optional CLI tools. Choose the installation method that best fits your use case.

Python Installation

From Source

If you need to build from source or want the latest development version:

# Clone the repository
git clone https://github.com/mirasurf/tarzi.rs.git
cd tarzi.rs

# Install Rust if not already installed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env

# Install maturin for building Python wheels
pip install maturin

# Build and install in development mode
maturin develop --release

Python Requirements

  • Python 3.10 or higher

  • Operating system: Linux, macOS

Optional dependencies for development:

# Install with development dependencies
pip install tarzi[dev]

# Install with test dependencies
pip install tarzi[test]

Rust Installation

As a Rust Crate

Add tarzi to your Cargo.toml:

[dependencies]
tarzi = "0.0.11"
tokio = { version = "1.0", features = ["full"] }

Or add it using cargo:

cargo add tarzi

CLI Installation

Install the command-line interface:

cargo install tarzi

This will install the tarzi binary to your cargo bin directory.

From Source

# Clone the repository
git clone https://github.com/mirasurf/tarzi.rs.git
cd tarzi.rs

# Build the project
cargo build --release

# Install the CLI (optional)
cargo install --path .

Rust Requirements

  • Rust 1.70 or higher

  • Cargo package manager

System Dependencies

Browser Dependencies (Optional)

For browser-based fetching, you’ll need a WebDriver:

Firefox (Recommended):

# Ubuntu/Debian
sudo apt-get install firefox

# Download GeckoDriver
wget https://github.com/mozilla/geckodriver/releases/latest/download/geckodriver-linux64.tar.gz
tar -xzf geckodriver-linux64.tar.gz
sudo mv geckodriver /usr/local/bin/

Chrome/Chromium (Alternative):

# Ubuntu/Debian
sudo apt-get update
sudo apt-get install -y chromium-browser

# Download ChromeDriver
wget https://chromedriver.storage.googleapis.com/LATEST_RELEASE_114/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/local/bin/

Verification

After installation, verify that tarzi is working correctly:

Python

import tarzi
print(tarzi.__version__)

# Test basic functionality
html = "<h1>Test</h1>"
result = tarzi.convert_html(html, "markdown")
print(result)

Rust

use tarzi::Converter;

#[tokio::main]
async fn main() {
    let converter = Converter::new();
    let html = "<h1>Test</h1>";
    match converter.convert(html, tarzi::Format::Markdown).await {
        Ok(result) => println!("{}", result),
        Err(e) => eprintln!("Error: {}", e),
    }
}

CLI

tarzi --version
tarzi convert --input "<h1>Test</h1>" --format markdown

Getting Help

If you encounter issues:

  1. Search existing GitHub issues

  2. Create a new issue with detailed error information

  3. Join our community discussions

Next Steps

Now that you have tarzi installed, check out the Quick Start Guide guide to learn the basic usage patterns and start building your first application.