@profullstack/nichedb 0.36.2 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  The CLI for a [NicheDB](https://github.com/profullstack/niche-db) deployment, and an MCP server over stdio.
4
4
 
5
5
  ```sh
6
- npm install -g @profullstack/nichedb
6
+ curl -fsSL https://nichedb.dev/install.sh | sh # or: npm install -g @profullstack/nichedb
7
7
  nichedb login --api https://nichedb.dev # paste a key from /settings
8
8
  nichedb collections
9
9
  nichedb feeds --collection packages
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@profullstack/nichedb",
3
- "version": "0.36.2",
3
+ "version": "0.37.0",
4
4
  "description": "CLI and MCP bridge for NicheDB: browse collections, manage sources and feeds, search items, from any deployment",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -15,7 +15,7 @@ import { homedir, tmpdir } from 'node:os';
15
15
  import { join } from 'node:path';
16
16
  import { createInterface } from 'node:readline';
17
17
 
18
- export const VERSION = '0.36.0';
18
+ export const VERSION = '0.37.0';
19
19
  const GEO_FLAGS = ['lat', 'long', 'radius', 'unit', 'bbox', 'sort', 'offset'];
20
20
  const DEFAULT_API = process.env.NICHEDB_API ?? 'https://nichedb.dev';
21
21
  const CONFIG_DIR = join(process.env.XDG_CONFIG_HOME ?? join(homedir(), '.config'), 'nichedb');
@@ -223,6 +223,19 @@ export const COMMANDS = [
223
223
  'Is a domain name registered? Asks the registry over RDAP; a bare word is tried under each ending.',
224
224
  options: ['--tlds <list>', '--json'],
225
225
  },
226
+ {
227
+ name: 'business',
228
+ usage: 'business <name> [--domain <d>] [--state <st>] [--number <n>] [--ein <ein>]',
229
+ summary:
230
+ "Is a business on anybody's list? OFAC sanctions, LEI and SEC registrations, state registry, federal exclusions and its domain's reputation, in one standing report.",
231
+ options: [
232
+ '--domain <domain>',
233
+ '--state <two letters>',
234
+ '--number <entity number>',
235
+ '--ein <ein>',
236
+ '--json',
237
+ ],
238
+ },
226
239
  {
227
240
  name: 'profiles',
228
241
  usage:
@@ -984,6 +997,57 @@ export async function run(
984
997
  if (r.truncated) out('(only the first names were checked)');
985
998
  return 0;
986
999
  }
1000
+ case 'business': {
1001
+ const qs = new URLSearchParams();
1002
+ const name = rest.join(' ');
1003
+ if (name) qs.set('name', name);
1004
+ for (const k of ['domain', 'state', 'number', 'ein'])
1005
+ if (flags[k] && flags[k] !== true) qs.set(k, String(flags[k]));
1006
+ if (![...qs.keys()].length)
1007
+ throw new Error('business <name> [--domain <d>] [--state <st>] [--number <n>]');
1008
+ const r = await client.get(`/api/v1/business?${qs}`);
1009
+ if (json) {
1010
+ out(JSON.stringify(r, null, 2));
1011
+ return 0;
1012
+ }
1013
+ out(`standing: ${r.standing}`);
1014
+ for (const f of r.findings) out(` ${pad(f.severity, 8)} ${f.text}`);
1015
+ if (r.notChecked.length) out(` not checked: ${r.notChecked.join('; ')}`);
1016
+ const s = r.sections;
1017
+ out('');
1018
+ out(
1019
+ `${pad('sanctions', 16)} ${s.sanctions.status === 'checked' ? (s.sanctions.hits.length ? s.sanctions.hits.map((h) => `${h.match}: ${h.name}`).join('; ') : 'not listed') : s.sanctions.status}`,
1020
+ );
1021
+ out(
1022
+ `${pad('lei', 16)} ${s.gleif.status === 'checked' ? s.gleif.records.map((x) => `${x.name} (${x.registrationStatus})`).join('; ') || 'none' : s.gleif.status}`,
1023
+ );
1024
+ out(
1025
+ `${pad('sec', 16)} ${s.edgar.status === 'checked' ? s.edgar.filers.map((x) => `${x.name} CIK ${x.cik}`).join('; ') || 'never filed' : s.edgar.status}`,
1026
+ );
1027
+ out(
1028
+ `${pad('registry', 16)} ${s.opencorporates.status === 'checked' ? s.opencorporates.companies.map((x) => `${x.name} ${x.status}`).join('; ') || 'no record' : s.opencorporates.status}`,
1029
+ );
1030
+ out(
1031
+ `${pad('exclusions', 16)} ${s.sam.status === 'checked' ? s.sam.exclusions.map((x) => x.name).join('; ') || 'none' : s.sam.status}`,
1032
+ );
1033
+ if (s.domain.status !== 'skipped') {
1034
+ const reg = s.domain.registration;
1035
+ out(
1036
+ `${pad('domain', 16)} ${s.domain.domain}${reg ? ` ${reg.status}${reg.registrar ? ` at ${reg.registrar}` : ''}` : ''}`,
1037
+ );
1038
+ for (const l of s.domain.lists ?? [])
1039
+ out(
1040
+ ` ${pad(l.list, 22)} ${pad(l.subject, 22)} ${l.status}${l.reasons?.length ? ` ${l.reasons.map((x) => x.label).join(', ')}` : ''}`,
1041
+ );
1042
+ if (s.domain.status === 'unconfigured')
1043
+ out(
1044
+ ` reputation lists not checked here: ${s.domain.selfChecks.map((x) => x.url).join(' ')}`,
1045
+ );
1046
+ }
1047
+ out('');
1048
+ for (const l of r.lookUpYourself) out(`${pad(l.name, 44)} ${l.url}`);
1049
+ return 0;
1050
+ }
987
1051
  case 'profiles': {
988
1052
  const term = rest.join(' ');
989
1053
  const qs = new URLSearchParams();