otter-pm

Crates.iootter-pm
lib.rsotter-pm
version0.1.1
created_at2026-01-15 13:00:03.391215+00
updated_at2026-01-16 06:43:16.533401+00
descriptionNPM-compatible package manager for Otter
homepagehttps://github.com/octofhir/otter
repositoryhttps://github.com/octofhir/otter
max_upload_size
id2045509
size115,345
Alexander Streltsov (octoshikari)

documentation

README

otter-pm

NPM-compatible package manager for Otter.

Overview

otter-pm provides npm registry client, dependency resolution, and package installation for Otter projects.

Features

  • Download packages from npm registry
  • Dependency resolution with semver
  • Lockfile support
  • Local package cache

Usage

Add to your Cargo.toml:

[dependencies]
otter-pm = "0.1"

Example

use otter_pm::{Installer, NpmRegistry, Resolver};
use std::path::Path;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let registry = NpmRegistry::new();

    // Fetch package metadata
    let metadata = registry.get_package("lodash").await?;
    println!("Latest version: {}", metadata.dist_tags.get("latest").unwrap());

    // Install dependencies from package.json
    let installer = Installer::new(Path::new("."));
    installer.install().await?;

    Ok(())
}

License

MIT

Commit count: 0

cargo fmt