open-index/open-npm huggingface dataset:
npm package: @prodara/cli
Description: Prodara CLI — thin wrapper that delegates to the project-local @prodara/compiler
Author: Prodara Contributors
Latest version: 0.2.10

# @prodara/cli

A thin global CLI wrapper that resolves and delegates to the project-local `@prodara/compiler`.

## Installation

```bash
npm install -g @prodara/cli
```

## How It Works

1. Walks up from the current directory to find `node_modules/@prodara/compiler`
2. Checks version compatibility (major versions must match)
3. Delegates all commands to the local compiler's CLI binary via `execFileSync`

This ensures you always run the compiler version pinned in your project's `package.json`.

## Usage

```bash
# Create a new project — automatically installs @prodara/compiler
prodara init my-project

# Update an existing project to latest version
prodara upgrade

# In a project with @prodara/compiler installed locally
prodara build
prodara validate
prodara graph
prodara plan
prodara test
prodara doctor
```

### Automatic Setup

`prodara init` handles project setup automatically:

1. Runs `npm init -y` if no `package.json` exists
2. Installs `@prodara/compiler` as a dev dependency
3. Scaffolds the `.prd` project structure

Use `--ai` to also generate a single AI agent prompt file for your platform (Copilot, Claude, Cursor, and 23 others). This gives you the `/prodara` command — one prompt that drives the full build-to-deploy lifecycle.

Use `--skip-install` to skip the npm init and compiler installation steps.

If no local compiler is found, the CLI prints installation instructions.

## License

Apache-2.0
npm package: @prodara/lsp
Description: Language Server Protocol implementation for Prodara .prd files
Author: Prodara Contributors
Latest version: 0.2.10

# @prodara/lsp

Language Server Protocol implementation for Prodara `.prd` specification files. Provides real-time diagnostics, keyword completion, and document symbols.

## Installation

```bash
npm install @prodara/lsp
```

## Capabilities

- **Diagnostics** — Real-time bracket/brace matching with debounced validation (300ms)
- **Completions** — All PRD keywords and type names with trigger characters `.` and `:`
- **Document Symbols** — Outline view of product, module, entity, workflow, and other block declarations

## Architecture

The server is split into two layers:

- **`analysis.ts`** — Pure functions (`validateText`, `extractSymbols`, `declKindToSymbolKind`) with no connection dependency. Fully testable.
- **`server.ts`** — LSP connection wiring, document management, and debounced diagnostics.

### Module Cache

An LRU cache (`ModuleCache`) stores parsed module results keyed by document URI. Configurable max size (default: 200 entries). Least-recently-used entries are evicted when the cache exceeds capacity.

## Usage with VS Code

The `prodara-vscode` extension starts this server automatically. See [`packages/vscode/`](../vscode/) for the extension.

## Testing

```bash
npm test              # 38 tests
npm run test:coverage # Enforces 100% coverage
```

## License

Apache-2.0