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

@eagle-cooler/util

v2.1.1

Published

A set of utilities and tools to aid the development of Eagle plugins and extensions

Readme

@eagle-cooler/util

npm version License: MIT

A comprehensive utility library for Eagle plugin and extension development, providing essential tools for metadata management, API integration, and Eagle logic abstraction.

Features

  • Metadata Management

    • Item-level metadata handling
    • Library-level configuration
    • Folder-specific settings
    • Application-wide configuration
    • Plugin configuration support
  • Eagle API Integration

    • Comprehensive API client
    • Token-based authentication
    • Type-safe API methods
    • Error handling
    • Request/response processing
  • Eagle Logic Abstraction

    • Independent Eagle logic wrapper
    • Folder management
    • Tag management
    • Metadata handling
    • File operations
  • File System Operations

    • Path resolution utilities
    • File existence checks
    • Automatic file creation
    • JSON file handling
    • Type-safe file operations

Installation

npm install @eagle-cooler/util

Usage

Metadata Management

import { Meta } from '@eagle-cooler/util';

// Get item metadata
const itemMeta = Meta.item.metaext(item);
itemMeta.content.customField = 'value';
itemMeta.save();

// Get library configuration
const libraryConfig = Meta.libraryConfig();
const folderConfig = libraryConfig.folderConfig(folderId);

// Get application configuration
const appConfig = await Meta.appConfig();
const scopeConfig = appConfig.scope('myScope');

Eagle API Integration

import { WebApi } from '@eagle-cooler/util';

// Application info
const appInfo = await WebApi.application.info();

// Folder operations
const folder = await WebApi.folder.create('New Folder');
await WebApi.folder.rename(folder.id, 'Renamed Folder');

// Item operations
await WebApi.item.update({
  itemId: 'item-id',
  tags: ['tag1', 'tag2'],
  annotation: 'Note',
  star: true,
});

// Library operations
const libraryInfo = await WebApi.library.info();
await WebApi.library.switch('/path/to/library');

Eagle Logic Wrapper

import { EagleWrapover } from '@eagle-cooler/util';

// Create wrapper instance
const wrapper = new EagleWrapover('/path/to/library');

// Access metadata
const metadata = wrapper.metadata;
const folder = metadata.getFolderById('folder-id');
const tagsGroup = metadata.getTagsGroupByName('group-name');

Development

Prerequisites

  • Node.js >=12.0
  • npm or yarn
  • Git
  • Eagle application

Setup

  1. Clone the repository:
git clone https://github.com/eagle-cooler/eagle-cooler.git
cd eagle-cooler
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Run tests:
npm test

Development Commands

  • npm run build - Build the project
  • npm test - Run tests
  • npm run lint - Lint code
  • npm run typecheck - Type checking
  • npm run cm - Create a conventional commit

Documentation

For detailed documentation, please visit our documentation site.

Key Concepts

  1. Meta Class

    • Main entry point for metadata management
    • Provides item, library, and application-level operations
    • Handles file system interactions
  2. WebAPI Class

    • Eagle API client implementation
    • Token management and authentication
    • Type-safe API methods
    • Error handling and response processing
  3. EagleWrapover

    • Independent Eagle logic implementation
    • Folder and tag management
    • Metadata handling
    • File system operations
  4. Utility Classes

    • File system operations
    • Type definitions
    • Common utilities
    • Helper functions

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (npm run cm)
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Write comprehensive tests
  • Update documentation
  • Use conventional commits
  • Follow the code style guide

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments