npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dottyfiles/runtime

v0.1.0

Published

Dynamic provider loading and app resolution for the dotty ecosystem.

Readme

@dottyfiles/runtime

Dynamic provider loading and app resolution for the dotty ecosystem.

Installation

npm install @dottyfiles/runtime

Usage

Loading Providers

import { loadProvider, loadProviders, getAvailableProviders } from '@dottyfiles/runtime';

// Load a single provider
const homebrew = await loadProvider('homebrew');
if (homebrew) {
  const installed = await homebrew.getInstalled();
}

// Load multiple providers
const providers = await loadProviders(['homebrew', 'mas']);

// Get only available (installed and working) providers
const available = await getAvailableProviders(['homebrew', 'mas']);

Resolving Apps to Providers

import { loadDottyfile } from '@dottyfiles/config';
import {
  loadProviders,
  resolveAllApps,
  findMissingApps,
  installMissingApps,
} from '@dottyfiles/runtime';

const config = await loadDottyfile();
const providers = await loadProviders(config.providers);

// Resolve which provider handles each app
const { resolved, unresolved } = await resolveAllApps(
  config.apps,
  config.providers,
  providers
);

// Find apps not yet installed
const missing = await findMissingApps(resolved);

// Install them
const result = await installMissingApps(missing, {
  onProgress: (app, result) => {
    console.log(`${app.name}: ${result.success ? 'OK' : result.error}`);
  },
});

Managing ~/.dotty Packages

import {
  ensureDottyPackageJson,
  addProviderDependency,
  getInstallCommand,
} from '@dottyfiles/runtime';

// Create package.json in ~/.dotty
await ensureDottyPackageJson('0.1.0');

// Add a provider dependency
await addProviderDependency('homebrew', '0.1.0');

// Get the npm install command
const cmd = getInstallCommand(['homebrew', 'mas'], '0.1.0');
// => "npm install @dottyfiles/[email protected] @dottyfiles/[email protected]"

Provider Interface

Providers must implement this interface:

interface Provider {
  readonly name: string;
  isAvailable(): Promise<boolean>;
  getVersion(): Promise<string | null>;
  getInstalled(): Promise<InstalledApp[]>;
  isInstalled(app: App): Promise<boolean>;
  install(app: App, options?: InstallOptions): Promise<ProviderResult>;
  uninstall(app: App, options?: UninstallOptions): Promise<ProviderResult>;
}

API Reference

Provider Loading

| Function | Description | |----------|-------------| | loadProvider(name) | Load a single provider | | loadProviders(names) | Load multiple providers | | getAvailableProviders(names) | Get providers that are installed and working | | isProviderInstalled(name) | Check if provider package is installed | | clearProviderCache() | Clear the provider cache |

App Resolution

| Function | Description | |----------|-------------| | resolveAppProvider(app, order, providers) | Find which provider handles an app | | resolveAllApps(apps, order, providers) | Resolve all apps | | groupByProvider(resolved) | Group resolved apps by provider | | findMissingApps(resolved) | Find apps not installed | | findExtraApps(config, providers) | Find installed apps not in config | | installMissingApps(missing, options) | Install missing apps |

Package Management

| Function | Description | |----------|-------------| | ensureDottyPackageJson(version) | Create ~/.dotty/package.json | | addProviderDependency(name, version) | Add provider to package.json | | getInstalledProviderVersion(name) | Get installed version | | checkProviderVersions(names, expected) | Check version consistency | | getInstallCommand(names, version) | Generate npm install command | | ensureDottyGitignore() | Create .gitignore |

License

MIT