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

openibm

v0.1.7

Published

Syntax highlighting, formatting, completions, and client code generation for .ibmi schema files

Downloads

27

Readme

OpenIBM

Syntax highlighting, formatting, IntelliSense, schema explorer, and client code generation for .ibmi schema files.


Features

Syntax Highlighting

Full grammar support for all .ibmi schema constructs — datasource, generator, program, serviceprogram, table, procedure, ds, dataq, and outbound blocks (including nested request / response sub-blocks).

IntelliSense & Completions

  • Block keyword snippets at the top level — including outbound with a full starter template
  • Context-aware attribute completions inside each block:
    • library, transport, system, function, resultSet, timeout, …
    • Inside outbound: library, timeout, request { }, response { }
    • Inside request / response: all IBM i types with argument snippets
  • All IBM i types with argument snippets: PackedDecimal(15, 0), Char(10), VarChar(255), etc.
  • Parameter direction directives: @in, @out, @inout
  • Table column directives: @id, @map("COLNAME"), @default(...), @relation(...)

Auto-formatting

Format your .ibmi file with Shift+Alt+F (or right-click → Format Document). Aligns columns and attributes for readability.

Schema Explorer (Sidebar)

Click the OpenIBM icon in the Activity Bar to open the Schema Explorer.

  • Lists all .ibmi files in your workspace
  • Expands each file into Programs, Service Programs, Tables, Procedures, Data Queues, and Outbound handlers
  • Click any declaration to jump directly to it in the editor
  • Refresh button (↺) to rescan the workspace
  • Auto-refreshes when .ibmi files are created, changed, or deleted

Generate Client Code

Generate a fully-typed TypeScript client from your .ibmi schema:

  • Click the ▶ Generate Client Code lens at the top of any open .ibmi file, or
  • Click the play button next to a file node in the Schema Explorer

Output is written to the path set in your generator block, or ./generated/ by default.

generator client {
    output = "./src/generated/ibmi"
}

File Icon (Material Icon Theme)

If you use the Material Icon Theme, this extension automatically configures .ibmi files to use the database icon.

If the icon doesn't appear, add this to your settings.json manually:

"material-icon-theme.files.associations": {
    "*.ibmi": "database"
}

Example Schema

datasource ibmi {
    transport = env("IBMI_TRANSPORT")
    system    = env("IBMI_SYSTEM")
}

generator client {
    output = "./src/generated/ibmi"
}

// DB2 table with relations and defaults
table Customer @map("MYLIB.CUSTMST") {
    id       Int               @id  @map("CUSTID")
    name     Char(25)               @map("CUSTNAME")
    balance  PackedDecimal(11, 2)   @map("BALANCE")
    created  Timestamp              @default(now())
}

// IBM i *PGM call
program GetCustomer @map("GETCUST") {
    library  = "MYLIB"
    custId   Int      @in
    custName Char(25) @out
}

// DB2 stored procedure
procedure ListCustomers {
    library   = "MYLIB"
    resultSet = "Customer"
    state     Char(2) @in
}

// Outbound: lets an RPG program call a JavaScript function
outbound ValidateOrder {
    library = "JSBRIDGE"
    timeout = 30
    request {
        orderId Int
        custNum Char(6)
        amount  Decimal(9, 2)
    }
    response {
        valid   Bool
        message Char(100)
        code    Int
    }
}

outbound Block

The outbound block enables RPG → JavaScript calls via IBM i data queues. It is the reverse of a normal program call: your RPG code calls a JS function and waits for the response.

How it works

RPG job                          Node.js process
────────────────────────────────────────────────
CALL_VALIDATEORDER(req)
  serialize + send → JSBRIDGE/VALIDATERQ ──────► receiveDataQueue()
                                                  call your handler(req, resolve, reject)
◄── JSBRIDGE/VALIDATERS ← sendDataQueue() ───────  resolve({ valid: true, ... })
  deserialize response
  return to RPG caller

What gets generated

outbound/
  ValidateOrder.ts                     ← JS listener (TypeScript)
  rpg/
    ValidateOrder/
      VALIDATEORDER.rpgle              ← RPG service program source (compile this)
      VALIDATEORDER_H.rpgleinc         ← copybook (/COPY this in caller programs)
      VALIDATEORDER_SAMPLE.rpgle       ← complete example caller program
      VALIDATEORDER_SETUP.clp          ← CL: creates DTAQs + compiles SRVPGM

Snippet

Typing outbound at the top level inserts:

outbound Name {
    library = "MYLIB"
    timeout = 30
    request {
        field Int
    }
    response {
        field Bool
    }
}

Inside request and response blocks, type completions offer all IBM i scalar types with argument snippets.


Requirements

  • VS Code ^1.80.0
  • An IBM i system accessible via HTTP, SSH, or ODBC transport
  • @openibm/client in your project for runtime usage