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

tm1npm

v1.5.1

Published

A Node.js module for TM1

Readme

tm1npm

tm1npm is the Node.js/TypeScript package for IBM Planning Analytics (TM1), providing a comprehensive interface to the TM1 REST API.

By wrapping the IBM Planning Analytics (TM1) REST API in a concise TypeScript framework, tm1npm facilitates Node.js developments for TM1.

Interacting with TM1 programmatically has never been easier.

import { TM1Service, Subset } from 'tm1npm';

const tm1 = new TM1Service({
    address: 'localhost',
    port: 8001,
    user: 'admin',
    password: 'apple',
    ssl: true
});

try {
    await tm1.connect();

    const subset = new Subset('Month', 'Q1', ['Jan', 'Feb', 'Mar']);
    await tm1.dimensions.subsets.create(subset, true);
} finally {
    await tm1.logout();
}

🌟 Features

  • 📊 Data Operations - Read/write data with MDX, CSV, and DataFrame support
  • ⚙️ Process Management - Execute and monitor TM1 processes with debugging
  • 🗂️ Metadata Management - Full CRUD for cubes, dimensions, hierarchies, and more
  • 🔒 Security - User and group management with role-based access
  • 📈 Monitoring - Access logs, sessions, and performance metrics
  • 🚀 Advanced Features - Async operations, type safety, and modern TypeScript

📦 Installation

npm install tm1npm

🚀 Quick Start

import { TM1Service } from 'tm1npm';

const tm1 = new TM1Service({
    address: 'localhost',
    port: 8879,
    user: 'admin',
    password: 'your_password',
    ssl: false
});

try {
    // Step 1: Connect to TM1 server (REQUIRED!)
    await tm1.connect();

    // Step 2: Perform TM1 operations
    const cubes = await tm1.cubes.getAllNames();
    console.log('Available cubes:', cubes);

} finally {
    // Step 3: Always logout (REQUIRED!)
    await tm1.logout();
}

⚠️ CRITICAL: Always call await tm1.connect() before operations and await tm1.logout() when finished!

📚 Documentation

💡 Common Examples

Read Data

const mdx = "SELECT [Time].[Jan] ON COLUMNS FROM [Budget]";
const data = await tm1.cubes.cells.executeMdx(mdx);

Write Data

await tm1.cubes.cells.writeValue('Budget', ['Jan', 'Revenue', 'Actual'], 1000);

Execute Process

const result = await tm1.processes.execute('ImportData', {
    pFilename: 'data.csv',
    pYear: '2024'
});

→ See More Examples

🏆 Feature Parity with tm1py

tm1npm achieves 95-98% feature parity with tm1py (Python), providing:

  • 300+ functions across 25+ services
  • DataFrame support for pandas-like data manipulation
  • CSV export with full formatting control
  • Cell tracing and analysis tools
  • Async operations for high performance

→ Full Feature Comparison

🔧 Requirements

  • Node.js 16.0 or higher
  • IBM Planning Analytics (TM1 11 or TM1 12)

🧪 Testing

npm test                    # Run all tests
npm run test:coverage       # Run with coverage
npm run test:watch          # Watch mode

🤝 Contributing

We welcome contributions! Please see our Contributing Guide.

# Clone and setup
git clone https://github.com/KimKaoPoo/tm1npm.git
cd tm1npm
npm install

# Run tests
npm test

# Build
npm run build

📝 License

MIT - See LICENSE file for details

🙏 Inspiration

tm1npm is inspired by tm1py, bringing familiar Python API patterns to Node.js/TypeScript with full type safety and modern async patterns.


tm1npm - Bringing the power of IBM Planning Analytics TM1 to Node.js developers.