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

amule-ec-client

v0.5.0

Published

A TypeScript client for Amule EC API.

Readme

aMule EC Client for TypeScript

npm version License: MIT

A TypeScript client library for interacting with aMule's External Connection (EC) protocol.

Ported from jamule (Java/Kotlin) to TypeScript.

Features

  • ✅ Full EC protocol implementation (v0x0204)
  • ✅ Authentication and connection management
  • ✅ Server statistics
  • ✅ File searching (local, global, Kad, web)
  • ✅ Download management
  • ✅ Shared files listing
  • ⏳ Category management (partial)
  • ⏳ ED2K link parsing

Installation

npm install amule-ec-client

Usage

import { AmuleClient, SearchType } from 'amule-ec-client';

// Create client
const client = new AmuleClient({
	host: 'localhost',
	port: 4712,
	password: 'your-password',
	timeout: 10000, // optional, in milliseconds
});

// Get server stats
const stats = await client.getStats();
console.log(`Download speed: ${stats.downloadSpeed} bytes/s`);
console.log(`Upload speed: ${stats.uploadSpeed} bytes/s`);

// Perform a search
const results = await client.searchSync('ubuntu', SearchType.GLOBAL);
console.log(`Found ${results.files.length} files`);

for (const file of results.files) {
	console.log(`${file.fileName} (${file.sizeFull} bytes)`);

	// Download a file
	if (file.sourceCount > 5) {
		await client.downloadSearchResult(file.hash);
	}
}

// Get download queue
const queue = await client.getDownloadQueue();
console.log(`${queue.length} files downloading`);

API

AmuleClient

Constructor

new AmuleClient(options: AmuleClientOptions)

Options:

  • host: aMule server hostname
  • port: EC port (default: 4712)
  • password: EC password
  • timeout: Connection timeout in ms (optional)

Methods

Connection

  • reconnect(): Promise<void> - Reconnect to server

Statistics

  • getStats(): Promise<StatsResponse> - Get server statistics

Search

  • searchAsync(query, searchType?, filters?): Promise<string> - Start async search
  • searchStatus(): Promise<number> - Get search progress (0-1)
  • searchResults(): Promise<SearchResultsResponse> - Get search results
  • searchSync(query, searchType?, filters?, timeout?): Promise<SearchResultsResponse> - Synchronous search
  • searchStop(): Promise<void> - Stop current search

Downloads

  • downloadSearchResult(hash, category?): Promise<void> - Download from search results
  • getDownloadQueue(): Promise<AmuleTransferringFile[]> - Get download queue

Shared Files

  • getSharedFiles(): Promise<AmuleFile[]> - Get shared files

Protocol Details

This library implements the aMule External Connection protocol version 0x0204, compatible with:

  • aMule 2.3.1
  • aMule 2.3.2
  • aMule 2.3.3

Protocol Features

  • UTF-8 number encoding for reduced packet size
  • ZLIB compression support
  • MD5-based authentication with salt
  • Binary packet format with tagged data structures

Development

# Install dependencies
npm install

# Build
npm run build

# Test
npm test

Credits

License

MIT License