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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@clearfeed-ai/quix-kandji-agent

v1.0.3

Published

This integration provides tools to manage Apple devices through the Kandji MDM platform. It supports device information retrieval and remote device management actions.

Downloads

418

Readme

Kandji Integration

This integration provides tools to manage Apple devices through the Kandji MDM platform. It supports device information retrieval and remote device management actions.

Implemented Tools

Device Information Tools

  1. list_kandji_devices

    • Lists devices managed by Kandji
    • Returns device details including name, model, OS version, serial number, blueprint name, and last enrollment
    • Supports search and pagination parameters
  2. get_kandji_device

    • Gets detailed information about a specific Kandji device
    • Requires device ID as parameter
    • Returns complete device information including MDM status and agent details

Device Management Actions

  1. lock_kandji_device

    • Locks a Kandji-managed device remotely
    • iOS devices require passcode to unlock, macOS devices require generated PIN
    • Requires device to be online and MDM-managed
  2. shutdown_kandji_device

    • Shuts down a Kandji-managed macOS device (macOS only)
    • Immediately powers off the device if online and connected
  3. restart_kandji_device

    • Restarts a Kandji-managed macOS device (macOS only)
    • Immediately restarts the device if online and connected
  4. reinstall_kandji_agent

    • Reinstalls the Kandji agent on a managed device
    • Useful for fixing agent issues or updating to latest version
  5. reset_kandji_device

    • WARNING: Completely erases/resets a Kandji-managed device
    • This action will wipe all data from the device
    • Use with extreme caution
  6. unlock_kandji_user_account

    • Unlocks the local user account on a Kandji-managed device
    • Useful for resolving locked account issues
  7. send_blank_push_kandji

    • Sends an update inventory command to trigger device check-in
    • Forces the device to refresh its information with Kandji
    • Helps ensure device status is up to date
  8. set_kandji_device_name

    • Sets the name of a Kandji-managed device
    • Requires device ID and new device name as parameters

Configuration

The integration requires the following configuration:

interface KandjiConfig {
  apiKey: string; // Your Kandji API key
  baseUrl: string; // Your Kandji instance URL (e.g., https://yourorg.api.kandji.io)
}

Testing Instructions

Prerequisites

  1. Set environment variables:

    export KANDJI_API_KEY="your-api-key-here"
    export KANDJI_BASE_URL="https://yourorg.api.kandji.io"
  2. Ensure you have devices enrolled in your Kandji instance for testing

Running Tests

# Install dependencies
yarn install

# Build the package
yarn build

# Run integration tests
yarn test:integration

Test Coverage

The integration tests cover:

  • Device listing and retrieval
  • Blueprint information
  • Device action commands (with proper error handling for non-MDM devices)

Note: Device action tests may show expected failures if test devices are not MDM-managed or if specific action endpoints are not available in your Kandji instance.

Important Notes

Device Management Requirements

  • MDM Management: Most device actions require the device to be enrolled and managed by MDM
  • Device Status: Devices must be online and connected to receive commands
  • Platform Limitations: Some actions (shutdown, restart) are macOS-only
  • Permissions: Ensure your API key has appropriate permissions for device actions

Error Handling

The integration provides comprehensive error handling:

  • Network and API errors are caught and returned as structured responses
  • MDM status errors are handled gracefully
  • Missing endpoints return appropriate error messages

Rate Limits

Kandji API has the following rate limits:

  • 10,000 requests per hour per customer
  • 50 requests per second

Future Considerations

Potential enhancements for future versions:

  1. Bulk Operations: Support for bulk device actions
  2. Policy Management: Tools for managing device policies and configurations
  3. App Management: Installing and removing applications on devices
  4. User Management: Creating and managing user accounts
  5. Reporting: Enhanced reporting and analytics capabilities
  6. Webhook Support: Real-time notifications for device events

Security Best Practices

  • Store API keys securely using environment variables
  • Use principle of least privilege for API key permissions
  • Regularly rotate API keys
  • Monitor API usage for unusual activity
  • Test device actions in non-production environment first

Troubleshooting

Common Issues

  1. "Device is not managed by MDM"

    • Ensure the device is properly enrolled in Kandji
    • Check that MDM profiles are installed and active
  2. 404 Not Found for device actions

    • Some endpoints may not be available in all Kandji instances
    • Verify the action is supported for your device type (iOS vs macOS)
  3. Rate limiting errors

    • Implement proper retry logic with exponential backoff
    • Monitor your request frequency
  4. Authentication errors

    • Verify your API key is valid and has required permissions
    • Check that your base URL is correct for your Kandji instance