| Crates.io | otter-pm |
| lib.rs | otter-pm |
| version | 0.1.1 |
| created_at | 2026-01-15 13:00:03.391215+00 |
| updated_at | 2026-01-16 06:43:16.533401+00 |
| description | NPM-compatible package manager for Otter |
| homepage | https://github.com/octofhir/otter |
| repository | https://github.com/octofhir/otter |
| max_upload_size | |
| id | 2045509 |
| size | 115,345 |
NPM-compatible package manager for Otter.
otter-pm provides npm registry client, dependency resolution, and package installation for Otter projects.
Add to your Cargo.toml:
[dependencies]
otter-pm = "0.1"
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(())
}
MIT