@base-works/cli (0.2.1)
Installation
@base-works:registry=https://git.muddlab.com/api/packages/ahmadsholehin/npm/npm install @base-works/[email protected]"@base-works/cli": "0.2.1"About this package
@base-works/cli
Thin terminal interface over @base-works/intelligence. It does not contain a
second resolver, catalogue compiler, or ranking implementation.
When installed in a derivative, invoke the project-local binary through pnpm;
do not assume node_modules/.bin is globally present on PATH:
pnpm exec base-works project [--json]
pnpm exec base-works index [--refresh] [--json]
pnpm exec base-works search <query> [--limit 1..10] [--json]
pnpm exec base-works describe <id> [--json]
pnpm exec base-works patterns <query> [--limit 1..10] [--json]
pnpm exec base-works pattern <id> [--json]
pnpm exec base-works compatible <slot> [--container <id>] [--json]
pnpm exec base-works validate <composition.json> [--json]
pnpm exec base-works locate <id> [--refresh] [--diagnostics] [--json]
pnpm exec base-works usages <id> [--limit 1..10] [--refresh] [--diagnostics] [--json]
pnpm exec base-works compare <left-component-id> <right-component-id> [--json]
pnpm exec base-works promotion-candidate <project-local-id> [--against <shared-id>] [--limit 1..5] [--refresh] [--json]
pnpm exec base-works dev link <package> <baseworks-checkout-or-package-path>
pnpm exec base-works dev status [--json]
pnpm exec base-works dev check <package>
pnpm exec base-works dev unlink <package>
search prints one compact line per hit by default. describe is the explicit
progressive-disclosure step and includes ownership, installed version, source,
capabilities, fit and guidance when present. All commands discover the
derivative by walking upward from the current directory.
patterns searches only known-good composition records. pattern returns one
record's ordered wiring guidance, component/capability/slot dependencies and
real example/source references. They are thin adapters over
findPatterns()/describePattern() and keep TSX—not metadata—as the runtime
composition source of truth. Default text is deliberately compact for
progressive agent discovery; --json preserves the complete machine-readable
record when structured processing is necessary.
locate returns the smallest statically known implementation range for one
exact catalogue ID. usages returns bounded imports, renders, route renders,
hook/store references, and curated pattern relationships. Neither command
prints source code. Add --diagnostics only when measuring the indexed lines,
estimated response tokens, avoided full-scan tokens, or incremental-cache
reuse; JSON responses always include those diagnostics.
The package is published to the private BaseWorks Gitea npm registry. Stack
generates it as a pinned-range development dependency, so a normal
pnpm install makes pnpm exec base-works available without a BaseWorks source
checkout. Registry authentication remains external to source.
Generated-agent behavior, the CLI-unavailable fallback, and the measured
discovery corpus are documented in
BASE_WORKS_AGENT_INTEGRATION.md.
Future pattern promotion follows
BASE_WORKS_PATTERN_AUTHORING.md.
The dev workflow is the optional bridge from a derivative into canonical
shared-package development. link requires an existing dependency declaration,
builds and symlinks the canonical package without changing the derivative's
manifest or lockfile, and records only ignored local state. check runs the
canonical package test plus the derivative's compact verify contract;
unlink reinstalls the declared registry version. See
BASE_WORKS_SHARED_DEVELOPMENT.md.
compare reports factual contract overlap and differences without reading
source. promotion-candidate gathers declared lineage, bounded source/usages,
installed shared comparisons, possible owners, and review questions for one
catalogued project-local component. The result is always human-review-required:
neither command chooses an owner, moves code, edits metadata, or proves reuse.
See
BASE_WORKS_PROMOTION_ASSISTANCE.md.
compatible resolves a concrete slot of ui.operations-workspace by default;
use --container for another manifest-defined container. validate reads a
non-executable JSON document containing container and placements and exits
non-zero for contract violations. Both are thin renderings of Intelligence
results and do not contain separate compatibility rules.
Dependencies
Dependencies
| ID | Version |
|---|---|
| @base-works/intelligence | ^0.2.1 |
Development Dependencies
| ID | Version |
|---|---|
| @types/node | ^24.10.0 |