Skip to content
finopsbricksPublic

About

MDM from the terminal and from Node: golden records for vendors (or any entity), their change history, and checks that connected apps still match. A CLI for people and AI agents, plus a client library.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

fob-mdm

MDM from the terminal and from Node: golden records for vendors (or any entity), their change history, and checks that connected apps still match. A CLI for people and AI agents, plus a client library for MDM by FinOpsBricks.

npm install -g @finopsbricks/fob-mdm
$ fob-mdm records show 100
ID:       100
Object:   1

name:       Acme Supplies Private Limited
gstin:      29ABCDE1234F1Z5
bank_ifsc:  HDFC0001234

--- Payments (cont_8f2k) ---

FIELD      APP VALUE        MATCHES
-----------------------------------
name       ACME SUPPLIES    NO
gstin      29ABCDE1234F1Z5  yes
bank_ifsc  HDFC0009999      NO

Docs: mdm.finopsbricks.com/docs/cli · For LLMs: llms.txt

Set up

Create an API key in the app under Settings → API Keys, then save it as a profile. You're asked for the key and the secret, and the key is checked before it's saved:

fob-mdm config profiles add acme
fob-mdm getting-started

Credentials live only in profiles (~/.fob/fob-mdm/config.yml, readable only by you), never in environment variables. Use --profile <name> to pick another one for a single command. Requires Node.js 18 or later.

Use

fob-mdm <resource> <action> [target] [options]
# Define what you keep
fob-mdm objects create --slug vendor --label Vendor
fob-mdm fields create --object vendor --key gstin --label GSTIN --identity
fob-mdm fields create --object vendor --key bank_ifsc --label 'Bank IFSC'

# Golden records and their history
fob-mdm records create --object vendor --set name='Acme Supplies Private Limited' --set gstin=29ABCDE1234F1Z5
fob-mdm records edit 100 --set bank_ifsc=HDFC0005678
fob-mdm records history 100

# Connect an app, require a field to match, find drift and fix it
fob-mdm integrations create --name Payments --type razorpayx --object vendor --config payments.json
fob-mdm integrations pull 5
fob-mdm contracts create --integration 5 --field bank_ifsc --mode ticket
fob-mdm conformance run
fob-mdm conformance status --status failed
fob-mdm conformance enforce 41
fob-mdm conformance confirm 41

Every command that reads or changes data takes --json, ready for jq or an agent:

fob-mdm records list --object vendor --all --json | jq '.[].values.bank_ifsc'

--help works at every level. Deletes ask first, and refuse without a terminal unless you pass --yes. Errors go to stderr with the API's code and details, and the exit code is 1.

The full walkthrough is Check and Fix Drift.

Library

import { fobMdm, ApiError } from '@finopsbricks/fob-mdm';

const mdm = fobMdm({ api_key, api_secret });

const vendor = await mdm.objects.findBySlug('vendor');
const { data } = await mdm.records.list({ object: vendor.id, 'values.gstin': '29ABCDE1234F1Z5' });
await mdm.records.setValues(data[0].id, { bank_ifsc: 'HDFC0005678' });

You pass the credentials in; the client reads nothing from the environment. The CLI is built on the same client, so the two can't drift. Every method is listed in JavaScript Client.

License

Apache-2.0. See LICENSE and NOTICE.

About

MDM from the terminal and from Node: golden records for vendors (or any entity), their change history, and checks that connected apps still match. A CLI for people and AI agents, plus a client library.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages