@reqlan/cli 0.1.0 → 0.1.1

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
@@ -1,6 +1,25 @@
1
- # reqlan CLI (`reqlan` / `rq`)
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/littletuna4/reqlan/HEAD/packages/extension/media/logo.png" alt="reqlan logo" width="128" height="128">
3
+ </p>
2
4
 
3
- Command-line interface for parsing `.rq` files and analysing the workspace requirement graph.
5
+ # @reqlan/cli
6
+
7
+ CLI for parsing and analysing reqlan requirement graphs
8
+
9
+ ## Features
10
+
11
+ - `reqlan` / `rq` Clipanion CLI for requirement workspaces
12
+ - `parse` — parse a `.rq` file and print diagnostics or an AST summary
13
+ - `analyse` / `analyze` — file, idea, or workspace graph analysis via `AnalysisApi`
14
+ - `search` — semantic search across indexed requirements (`--json` for scripting)
15
+
16
+ ## Install
17
+
18
+ ```bash
19
+ npm install -g @reqlan/cli
20
+ # or
21
+ npx @reqlan/cli --help
22
+ ```
4
23
 
5
24
  ## Commands
6
25
 
@@ -11,15 +30,35 @@ reqlan analyze # alias of analyse
11
30
  reqlan search <query> [--limit <n>] [--cwd <dir>] [--json]
12
31
  ```
13
32
 
14
- Workspace-scoped commands use `@reqlan/analytical`'s `AnalysisApi` (same headless path as MCP). Set `REQLAN_WORKSPACE` or pass `--cwd` to override the workspace root.
33
+ Set `REQLAN_WORKSPACE` or pass `--cwd` to override the workspace root.
15
34
 
16
- ## Build
35
+ ## Links
17
36
 
18
- From the monorepo root:
37
+ - [Site](https://tony.is-a.dev/reqlan)
38
+ - [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=reqlan.reqlan-extension)
39
+ - [Open VSX](https://open-vsx.org/extension/reqlan/reqlan-extension)
40
+ - [GitHub repository](https://github.com/littletuna4/reqlan)
41
+ - [Contact](mailto:reqlan@tony.is-a.dev)
19
42
 
20
- ```bash
21
- pnpm run build
22
- # or
23
- pnpm --filter @reqlan/cli run build
24
- node packages/cli/bin/cli.js --help
25
- ```
43
+ ## Changelog
44
+
45
+ ### 0.1.1
46
+
47
+ #### Patch Changes
48
+
49
+ - 1790ce1: Update the landers.
50
+ - Updated dependencies [1790ce1]
51
+ - @reqlan/language@1.4.1
52
+ - @reqlan/analytical@0.4.1
53
+
54
+ ### 0.1.0
55
+
56
+ #### Minor Changes
57
+
58
+ - 8ac3f82: Minor site showcase fixes, extension search functinoality, cli init.
59
+
60
+ #### Patch Changes
61
+
62
+ - Updated dependencies [8ac3f82]
63
+ - @reqlan/analytical@0.4.0
64
+ - @reqlan/language@1.4.0
@@ -0,0 +1,45 @@
1
+ <p align="center">
2
+ <img src="{{LOGO_URL}}" alt="reqlan logo" width="128" height="128">
3
+ </p>
4
+
5
+ # {{PACKAGE_NAME}}
6
+
7
+ {{DESCRIPTION}}
8
+
9
+ ## Features
10
+
11
+ - `reqlan` / `rq` Clipanion CLI for requirement workspaces
12
+ - `parse` — parse a `.rq` file and print diagnostics or an AST summary
13
+ - `analyse` / `analyze` — file, idea, or workspace graph analysis via `AnalysisApi`
14
+ - `search` — semantic search across indexed requirements (`--json` for scripting)
15
+
16
+ ## Install
17
+
18
+ ```bash
19
+ npm install -g @reqlan/cli
20
+ # or
21
+ npx @reqlan/cli --help
22
+ ```
23
+
24
+ ## Commands
25
+
26
+ ```bash
27
+ reqlan parse <file> [--json]
28
+ reqlan analyse [--file <path> | --idea <name>] [--depth <n>] [--cwd <dir>] [--json]
29
+ reqlan analyze # alias of analyse
30
+ reqlan search <query> [--limit <n>] [--cwd <dir>] [--json]
31
+ ```
32
+
33
+ Set `REQLAN_WORKSPACE` or pass `--cwd` to override the workspace root.
34
+
35
+ ## Links
36
+
37
+ - [{{SITE_LABEL}}]({{SITE_URL}})
38
+ - [{{VSC_LABEL}}]({{VSC_URL}})
39
+ - [{{OPENVSX_LABEL}}]({{OPENVSX_URL}})
40
+ - [GitHub repository]({{GITHUB_URL}})
41
+ - [Contact]({{EMAIL_URL}})
42
+
43
+ ## Changelog
44
+
45
+ {{CHANGELOG}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@reqlan/cli",
3
3
  "description": "CLI for parsing and analysing reqlan requirement graphs",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
7
7
  "repository": {
@@ -26,8 +26,8 @@
26
26
  "dependencies": {
27
27
  "clipanion": "3.2.1",
28
28
  "langium": "~4.3.0",
29
- "@reqlan/language": "1.4.0",
30
- "@reqlan/analytical": "0.4.0"
29
+ "@reqlan/analytical": "0.4.1",
30
+ "@reqlan/language": "1.4.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "shx": "~0.4.0"
@@ -1,2 +0,0 @@
1
- import type { Model } from 'reqlan-language';
2
- export declare function generateJavaScript(model: Model, filePath: string, destination: string | undefined): string;
package/out/generator.js DELETED
@@ -1,19 +0,0 @@
1
- import { expandToNode, joinToNode, toString } from 'langium/generate';
2
- import * as fs from 'node:fs';
3
- import * as path from 'node:path';
4
- import { extractDestinationAndName } from './util.js';
5
- export function generateJavaScript(model, filePath, destination) {
6
- const data = extractDestinationAndName(filePath, destination);
7
- const generatedFilePath = `${path.join(data.destination, data.name)}.js`;
8
- const fileNode = expandToNode `
9
- "use strict";
10
-
11
- ${joinToNode(model.elements, (element) => `// ${element.$type}`, { appendNewLineIfNotEmpty: true })}
12
- `.appendNewLineIfNotEmpty();
13
- if (!fs.existsSync(data.destination)) {
14
- fs.mkdirSync(data.destination, { recursive: true });
15
- }
16
- fs.writeFileSync(generatedFilePath, toString(fileNode));
17
- return generatedFilePath;
18
- }
19
- //# sourceMappingURL=generator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAEtD,MAAM,UAAU,kBAAkB,CAAC,KAAY,EAAE,QAAgB,EAAE,WAA+B;IAC9F,MAAM,IAAI,GAAG,yBAAyB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC9D,MAAM,iBAAiB,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;IAEzE,MAAM,QAAQ,GAAG,YAAY,CAAA;;;UAGvB,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,OAAwB,EAAE,EAAE,CAAC,MAAM,OAAO,CAAC,KAAK,EAAE,EAAE,EAAE,uBAAuB,EAAE,IAAI,EAAE,CAAC;KACvH,CAAC,uBAAuB,EAAE,CAAC;IAE5B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QACnC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,CAAC;IACD,EAAE,CAAC,aAAa,CAAC,iBAAiB,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxD,OAAO,iBAAiB,CAAC;AAC7B,CAAC"}