ts-apt
v1.0.0
Published
TypeScript APT and APT-fast package management library
Maintainers
Readme
ts-apt
TypeScript library for APT package operations on Debian-based Linux systems. It supports both standard APT binaries and the apt-fast wrapper.
[!NOTE] If you find this project useful, please consider supporting ongoing maintenance: Buy Me a Coffee
Features
- Install, remove, and upgrade packages
- Search package repositories
- List installed packages and upgradable packages
- Get package metadata and installed file lists
- Run cache cleanup and autoremove operations
- Use apt-fast when available, with automatic fallback to apt-get
- Structured command execution via pluggable command runners
- Typed error model for validation, availability, and command failures
- Safe locking support for mutating operations
Runtime Requirements
- Node.js 24+
- Linux environment with APT tooling available
Installation
npm install ts-aptUsage
import { createPackageManager } from "ts-apt";
const manager = await createPackageManager(false);
const searchResults = await manager.search(["vim"]);
const installed = await manager.listInstalled();
console.log(searchResults.length, installed.length);Testing
npm run test:unit
npm run test:integrationIntegration tests run against real APT tooling and are slower than unit tests.
API Documentation
Generate API docs:
npm run docs:apiGenerated docs are written to docs/api.
Credits
Maintainer Notes
Development workflows, CI/release behavior, and repository maintenance guidance are documented in CONTRIBUTING.md.
