@nidl/cli
v0.28.0
Published
CLI for nidl: provider account watching, catalog search and harness routing.
Readme
@nidl/cli
nidl watches your model provider accounts and routes your coding harness's traffic through one
place you control. This package is its command line, nidl, and a small function for apps.
Install
npm install -g @nidl/clinpm installs the one package with the core for your platform beside it:
| Platform | Package |
| --- | --- |
| macOS on Apple silicon | @nidl/cli-darwin-arm64, signed by the publisher's Apple team |
| Linux x64, glibc 2.17 or later | @nidl/cli-linux-x64-gnu |
| Linux arm64, glibc 2.17 or later | @nidl/cli-linux-arm64-gnu |
Intel Macs, Linux with musl, and Windows have no package yet; nidl says so when it starts.
Node.js 22 or later is required.
nidl version
nidl serve --data-dir ~/.nidlThe full guide (connecting accounts, unlocking, routing a harness) is the README in the
repository's packaging folder.
From an app
import { command, CommandError } from "@nidl/cli";
const targets = await command("targets.list", {}, { dataDir: `${process.env.HOME}/.nidl` });command(name, args, { dataDir }) runs one nidl command with this platform's core and returns its
result, or throws a CommandError with the core's own code and message. The arguments go to the
core on its standard input, never on its command line. Commands that handle credentials are refused:
connect accounts and unlock with the nidl command itself, which asks for keys in its own prompt.
Without dataDir, ~/.nidl is used. corePath() answers this platform's core's path, for a
program that starts a core itself, as @nidl/client's startTaskCore does in a Trigger.dev task.
Licence
MIT OR Apache-2.0.
