@build-it-now/binctl-shell-dsl-plugin
v0.1.6
Published
Shell-DSL command plugin for `binctl`, built on top of `@build-it-now/binctl-api`.
Readme
@build-it-now/binctl-shell-dsl-plugin
Shell-DSL command plugin for binctl, built on top of @build-it-now/binctl-api.
Installation
npm install @build-it-now/binctl-shell-dsl-plugin @build-it-now/binctl-api shell-dslUsage
import { createBinctlShellDslPlugin } from "@build-it-now/binctl-shell-dsl-plugin";
import { BinctlClient } from "@build-it-now/binctl-api";
const client = new BinctlClient({
baseUrl: "https://build-it.now",
token: process.env.BINCTL_TOKEN,
});
const commands = createBinctlShellDslPlugin({
client,
output: "human", // or "json"
});commands is a Record<string, Command> ready to mount in a Shell-DSL runtime.
The plugin exposes exactly one top-level command, binctl, so Shell-DSL scripts can use natural nested invocations like:
await sh`binctl projects list`;
await sh`binctl projects create --name "Demo"`;
await sh`binctl projects branches list demo-project`;
await sh`binctl projects sessions create demo-project feature-1 --name "Spec"`;
await sh`binctl sessions conversation session_123`;
await sh`binctl --help`;
await sh`binctl get branches demo-project --help`;Command Map
Top-level binctl routes include:
binctl auth statusbinctl auth logoutbinctl auth api-key create <name>binctl auth api-key listbinctl auth api-key revoke <key-id>binctl projects listbinctl projects create [--name <name>] [--org <org-id>]binctl projects describe <project-ref>binctl projects update <project-ref> [--name <name>] [--mode <greenfield|prod>] [--custom-domain <domain>] [--clear-custom-domain]binctl projects delete <project-ref>binctl projects branches list <project-ref>binctl projects branches describe <project-ref> <branch>binctl projects sessions list <project-ref> [--branch <branch>]binctl projects sessions create <project-ref> <branch> [--name <name>]binctl projects orchestrate <project-ref> <branch> <model>binctl sessions describe <session-id>binctl sessions update <session-id> (--name <name> | --clear-name)binctl sessions delete <session-id>binctl sessions conversation <session-id>binctl sessions prompt <session-id> <mode> <model> <message>binctl sessions answer-questions <session-id> <answer>...binctl sessions apply-required-envs <session-id> <target/name=value>...
Project responses render mode as greenfield or prod, derived from the persisted projects.backwardsCompatible setting.
Options
client: preconfiguredBinctlClientinstanceclientOptions: used whenclientis omittedoutput:"human"(default) or"json"
