Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description ts-apt

npm version License: Apache2 CI status codecov

TypeScript library for APT package operations on Debian-based Linux systems. It supports both standard APT binaries and the apt-fast bundled wrapper.

Note

If you find this project useful, please consider supporting it as a sponsor and show some ❤️ for open source maintainers.

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 and parallelism for read-only operations

Runtime Requirements

  • Node.js 24+
  • Linux environment with APT tooling available

Installation

npm install ts-apt

Usage

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:integration

Integration tests run against real APT tooling and are slower than unit tests.

API Documentation

Generate API docs:

npm run docs:api

Generated docs are written to docs/api.

Credits

Maintainer Notes

Development workflows, CI/release behavior, and repository maintenance guidance are documented in CONTRIBUTING.md. PRs are gated by branch policy checks, and releases are published from main and staging via semantic-release.

About

TypeScript library for APT and APT-fast package operations on Debian-based Linux systems.

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages