airgen-cli 0.5.0 → 0.6.0

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.
@@ -1,4 +1,4 @@
1
- import { readFileSync } from "node:fs";
1
+ import { readFileSync, writeFileSync } from "node:fs";
2
2
  import { output, isJsonMode } from "../output.js";
3
3
  export function registerImportExportCommands(program, client) {
4
4
  const imp = program.command("import").description("Import requirements");
@@ -63,4 +63,20 @@ export function registerImportExportCommands(program, client) {
63
63
  output(data);
64
64
  }
65
65
  });
66
+ exp
67
+ .command("documents")
68
+ .description("Export complete document set as ReqIF or Excel (includes sections, requirements, trace links, linksets)")
69
+ .argument("<tenant>", "Tenant slug")
70
+ .argument("<project>", "Project slug")
71
+ .option("--format <fmt>", "Format: reqif, excel", "reqif")
72
+ .option("-o, --output <file>", "Output file path")
73
+ .action(async (tenant, project, opts) => {
74
+ const format = opts.format === "excel" ? "excel" : "reqif";
75
+ const ext = format === "excel" ? "xlsx" : "reqif";
76
+ const outPath = opts.output ?? `${project}.${ext}`;
77
+ console.error(`Exporting documents as ${format}...`);
78
+ const { data } = await client.fetchBinary(`/documents-export/${tenant}/${project}?format=${format}`);
79
+ writeFileSync(outPath, data);
80
+ console.log(`Exported to ${outPath} (${(data.length / 1024).toFixed(1)} KB)`);
81
+ });
66
82
  }
@@ -82,6 +82,8 @@ export function registerRequirementCommands(program, client) {
82
82
  .requiredOption("--text <text>", "Requirement text")
83
83
  .option("--pattern <p>", "Pattern: ubiquitous, event, state, unwanted, optional")
84
84
  .option("--verification <v>", "Verification: Test, Analysis, Inspection, Demonstration")
85
+ .option("--rationale <r>", "Rationale")
86
+ .option("--compliance <status>", "Compliance status")
85
87
  .option("--document <slug>", "Document slug")
86
88
  .option("--section <id>", "Section ID")
87
89
  .option("--tags <tags>", "Comma-separated tags")
@@ -92,6 +94,8 @@ export function registerRequirementCommands(program, client) {
92
94
  text: opts.text,
93
95
  pattern: opts.pattern,
94
96
  verification: opts.verification,
97
+ rationale: opts.rationale,
98
+ complianceStatus: opts.compliance,
95
99
  documentSlug: opts.document,
96
100
  sectionId: opts.section,
97
101
  tags: opts.tags?.split(",").map(t => t.trim()),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "airgen-cli",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "AIRGen CLI — requirements engineering from the command line",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",