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

inception-api

v1.0.11

Published

Inception API client library and CLI tool for controlling doors, areas, and security features

Readme

Inception API

A Node.js library and CLI tool for interacting with the Inception security system API. This package allows you to control doors, areas, outputs, and retrieve information from your Inception system.

Installation

npm install -g inception-api

CLI Usage

The CLI tool provides a convenient way to interact with your Inception system from the command line.

Global Options

  • -u, --url <url> - Base URL for Inception device
  • -U, --username <username> - API username
  • -P, --password <password> - API password
  • -T, --token <token> - API authentication token (alternative to username/password)
  • -v, --verbose - Enable verbose output (detailed JSON responses)
  • -h, --help - Display help information

Authentication

You can authenticate using any of these methods:

  1. Command line arguments:
inception -u http://your-inception-server -U username -P password <command>
# OR using API token
inception -u http://your-inception-server -T your-token <command>
  1. Environment variables:
export INCEPTION_URL=http://your-inception-server
export INCEPTION_USERNAME=username
export INCEPTION_PASSWORD=password
# OR
export INCEPTION_TOKEN=your-token

inception <command>
  1. Stored credentials (saved after first login):
# First login saves credentials
inception -u http://your-inception-server -U username -P password login

# Subsequent commands use stored credentials
inception <command>
  1. Interactive prompt (if no credentials provided):
inception <command>
# Will securely prompt for username and password

Config Management

# Show current config (with sensitive data hidden)
inception config --show

# Clear stored credentials
inception config --clear

Commands

# Get protocol version (no auth required)
inception protocol

# Login (verifies credentials)
inception login

# Get area information
inception area

# Get detailed area summary
inception area-summary

# Arm an area
inception arm <areaID>

# Arm an area in Stay mode
inception stay <areaID>

# Disarm an area
inception disarm <areaID>

# Get outputs information
inception outputs

# Control an output (on, off, pulse)
inception output <outputID> <on|off|pulse>

# Get doors information
inception doors

# Get detailed door summary
inception door-summary

# Control a door (lock, unlock, momentary)
inception door <doorID> <lock|unlock|momentary>

# Submit a virtual badge at a door reader
inception badge <readerID> <templateID> <cardData>

# Submit a PIN to a door reader
inception pin <readerID> <pinData>

# List users
inception users

# Get user details
inception user <userID>

# Get review events
inception events [--limit <limit>] [--offset <offset>]

# Get notification events
inception notifications [--limit <limit>] [--offset <offset>]

# Monitor state changes (long polling)
inception monitor [--timeout <timeout>]

# Cycle a door
inception door-cycle <doorID> [delay]

Library Usage

const InceptionAPI = require('inception-api');

// Initialize with username/password
const api = new InceptionAPI({
  baseURL: 'http://your-inception-server'
});

// Authenticate with username/password
api.login('username', 'password')
  .then(() => api.getDoorInformation())
  .then(doors => {
    console.log('Doors:', doors);
    return api.controlDoor('door-id', 'Unlock');
  })
  .then(result => {
    console.log('Door unlocked:', result);
  })
  .catch(err => {
    console.error('Error:', err.message);
  });

// OR initialize with token
const apiWithToken = new InceptionAPI({
  baseURL: 'http://your-inception-server',
  token: 'your-api-token'
});

// Now use without login
apiWithToken.getDoorInformation()
  .then(doors => {
    console.log('Doors:', doors);
  })
  .catch(err => {
    console.error('Error:', err.message);
  });

Available Methods

  • getProtocolVersion() - Get API protocol version
  • login(username, password) - Authenticate user
  • setAuthToken(token) - Set authentication token
  • getAreaInformation() - Get areas information
  • getAreaSummaryInformation() - Get area summary information
  • armArea(areaID) - Arm an area
  • disarmArea(areaID) - Disarm an area
  • armAreaStay(areaID) - Arm area in Stay mode
  • getOutputInformation() - Get outputs information
  • controlOutput(outputID, action) - Control output (On/Off/Pulse)
  • getDoorInformation() - Get doors information
  • getDoorSummaryInformation() - Get door summary information
  • controlDoor(doorID, action) - Control door (Lock/Unlock/MomentaryUnlock)
  • submitActivity(activityData) - Submit an activity (e.g., virtual badge, PIN)
  • getUsers() - List users
  • getUser(userID) - Get user details
  • getReviewEvents(options) - Get review events
  • getNotificationEvents(options) - Get notification events
  • longPoll(timeout) - Long polling for state changes

License

ISC