1 unstable release
Uses new Rust 2024
new 0.1.0 | Mar 30, 2025 |
---|
#46 in Text editors
42KB
903 lines
TexMan: A Rust-Based Package Manager for LaTeX
texman
is a lightweight, command-line package manager for TeX Live, written in Rust. It allows you to install, update, remove, and manage LaTeX packages efficiently across multiple profiles, with support for backups and detailed package searches.
Features
- Package Management: Install, update, remove, and list LaTeX packages from the TeX Live repository.
- Profiles: Create and switch between isolated TeX environments (profiles).
- Backups: Create, list, restore, and remove backups of your active profile with timestamps and package counts.
- Search: Search packages by name, short description, long description, or dependencies.
- Clean: Remove unused downloaded files and optionally all backups.
- Parallel Parsing: Fast TLPDB parsing with
rayon
for multi-core performance. - Incremental Parsing: Caches parsed TLPDB data for quick startup.
Installation
Prerequisites
- Rust (1.70+ recommended) and Cargo (install via rustup).
- A working internet connection to fetch the TeX Live package database (TLPDB).
Pre-built Binaries
Download the appropriate binary for your platform from the Releases page:
- macOS (x86_64):
texman-macos-x86_64
- Linux (x86_64, glibc):
texman-linux-x86_64
- Linux (x86_64, musl):
texman-linux-x86_64-musl
Extract and move to a directory in your PATH:
chmod +x texman-<platform>
sudo mv texman-<platform> /usr/local/bin/texman
Build from Source
- Clone the repository:
git clone https://github.com/amirhosseinghanipour/texman.git
cd texman
- Build and install:
cargo build --release
sudo cp target/release/texman /usr/local/bin/
Usage
Basic Commands
- Install a package:
texman install babel --profile minimal
- List installed packages:
texman list
- Update packages:
texman update
- Remove a package:
texman remove babel
- Get package info:
texman info babel
Profile Management
- Create a profile:
texman profile create myprofile
- Switch profiles:
texman profile switch myprofile
- List profiles:
texman profile list
- Remove a profile:
texman proile remove myprofile
Backup Management
- Create a backup:
texman backup create mybackup
- List backups:
texman backup list
- Restore a backup:
texman restore mybackup
- Remove a backup:
texman backup remove mybacup
Search
- Search by name:
texman search latex
- Search with descriptions or dependencies:
texman search latex --description --longdesc --depends
Cleaup
- Remove unused files:
texman clean
- Remove all backups too:
texman clean --backups
Configuration
- Storage: Packages, profiles, and backups are stored in ~/.texman/.
- Database: SQLite database at ~/.texman/db/texman.sqlite tracks installed packages and backups.
- TLPDB Cache: Cached at ~/.texman/db/tlpdb.txt and tlpdb.bin, refreshed every 24 hours.
Supported Platforms
- macOS (x86_64)
- Linux (x86_64, glibc and musl-based distros like Arch, Ubuntu, Fedora)
Contributing
Contributions are welcome! Please submit issues or pull requests to GitHub.
Dependencies
~36–51MB
~867K SLoC