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

amt-manager-test

v0.0.2

Published

Intel AMT Management Tool - Control power states of AMT-enabled devices

Readme

AMT Manager

A Node.js tool for managing Intel AMT (Active Management Technology) devices. This tool provides both a command-line interface and a programmatic API to control power states of AMT-enabled devices.

Features

  • Power on/off AMT devices
  • Reset AMT devices
  • Check power state
  • Secure authentication using Digest Authentication
  • Support for both HTTP and HTTPS protocols
  • IPv4 and IPv6 support
  • Automatic retry with exponential backoff
  • SSL verification options

Prerequisites

  • Node.js 14 or higher
  • npm 6 or higher
  • Intel AMT-enabled device
  • Network access to the AMT device

Installation

As a Command Line Tool

  1. Install globally:
npm install -g amt-manager
  1. Create a .env file for optional settings:
cp .env.example .env
  1. Edit the .env file with optional AMT device configuration:
AMT_PORT=16992
AMT_PROTOCOL=http
AMT_VERIFY_SSL=false
AMT_FORCE_IPV4=true
  1. Use the CLI commands:
# Basic usage
amt-manager power-on 192.168.1.100 admin password
amt-manager power-off 192.168.1.100 admin password
amt-manager reset 192.168.1.100 admin password
amt-manager status 192.168.1.100 admin password

# With optional settings from .env file
amt-manager power-on 192.168.1.100 admin password --port 16992 --protocol https

As a Package in Your Project

  1. Install the package:
npm install amt-manager
  1. Import and use in your code:
import { AMTManager, PowerState } from 'amt-manager';

// Create AMT manager instance
const amtManager = new AMTManager({
  host: '192.168.1.100',
  username: 'admin',
  password: 'your_password',
  port: 16992,
  protocol: 'http',
  verifySSL: false,
  forceIPv4: true
});

// Use the manager
async function manageDevice() {
  try {
    // Power on the device
    const powerOnResult = await amtManager.powerOn();
    console.log('Power on result:', powerOnResult);

    // Check power state
    const powerState = await amtManager.getPowerState();
    console.log('Current power state:', powerState);

    // Power off the device
    const powerOffResult = await amtManager.powerOff();
    console.log('Power off result:', powerOffResult);

    // Reset the device
    const resetResult = await amtManager.reset();
    console.log('Reset result:', resetResult);
  } catch (error) {
    console.error('Error managing device:', error);
  }
}

Command Line Usage

The tool accepts the following command line arguments:

amt-manager <command> <host> <username> <password>

Required Arguments

  • command: The action to perform (power-on, power-off, reset, status)
  • host: IP address or hostname of the AMT device
  • username: AMT device username
  • password: AMT device password

Optional Environment Variables

| Variable | Description | Default | Required | |----------|-------------|---------|----------| | AMT_PORT | AMT device port | 16992 | No | | AMT_PROTOCOL | Protocol to use (http/https) | http | No | | AMT_VERIFY_SSL | Whether to verify SSL certificates | false | No | | AMT_FORCE_IPV4 | Whether to force IPv4 connections | true | No |

API Reference

AMTManager Class

The main class for interacting with AMT devices.

Constructor

constructor(config: AMTConfig)

Methods

  • powerOn(): Promise<boolean> - Turn on the device
  • powerOff(): Promise<boolean> - Turn off the device
  • reset(): Promise<boolean> - Reset the device
  • getPowerState(): Promise<number> - Get current power state
  • testConnection(): Promise<boolean> - Test connection to the device

Types

interface AMTConfig {
  host: string;
  port?: number;
  username: string;
  password: string;
  protocol?: 'http' | 'https';
  timeout?: number;
  retries?: number;
  verifySSL?: boolean;
  forceIPv4?: boolean;
}

enum PowerState {
  PowerOn = 2,
  PowerOff = 8,
  Reset = 10
}

Error Handling

The tool includes robust error handling:

  • Automatic retry with exponential backoff for connection issues
  • Detailed error messages for authentication failures
  • Validation of required configuration
  • Proper handling of SSL/TLS errors

Security Notes

  • Never commit your .env file containing credentials
  • Use HTTPS when possible for secure communication
  • Consider using environment variables in production environments
  • Keep your AMT credentials secure and rotate them regularly

License

MIT