glugent 0.3.0 → 0.4.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Antonín Báleš
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,55 @@
1
+ <!-- Generated from .glugent by `npm run docs:build`. Edit the sections in .glugent/sections, not this file. -->
2
+
3
+ # glugent
4
+
5
+ The command-line tool of [Glugent](https://github.com/anweba/glugent). It glues Markdown **sections** into **targets**: agents, docs, or anything else you build from Markdown.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm i -D glugent # in your project
11
+ npx glugent --help # or run it without installing
12
+ ```
13
+
14
+ ## Quick start
15
+
16
+ Three files make a project:
17
+
18
+ ```
19
+ glugent.config.json { "props": { "PROJECT": "Acme Shop" } }
20
+ hello.ggen.md # Hello
21
+ You are a helpful assistant working on {PROJECT}.
22
+ hello.agent.ggen.json { "name": "hello", "sections": ["hello"] }
23
+ ```
24
+
25
+ `npx glugent build` writes `dist/agents/hello.md`, with `{PROJECT}` replaced by `Acme Shop`.
26
+
27
+ ## CLI
28
+
29
+ ```bash
30
+ glugent build [target...] [--set KEY=VALUE]... [--config <path>] [--dry-run | --check]
31
+ glugent validate [--set KEY=VALUE]... [--config <path>]
32
+ glugent list [--config <path>]
33
+ glugent convert <file.md>... [--force] [--dry-run]
34
+ ```
35
+
36
+ `convert` turns plain Markdown into a section: it writes `<file>.ggen.md` next to each file, with every `{` escaped as `{{` and every `}` as `}}` (frontmatter is left alone). It needs no project and refuses to overwrite an existing file unless `--force` is given.
37
+
38
+ With no target names, `build` builds every target. The config is found by searching upward from the current directory.
39
+
40
+ `build --check` writes nothing: it compiles the targets and compares each result with the file on disk, then exits with 1 if any file is missing or out of date, listing them. Use it to check committed or generated output, locally or in CI; it takes the same target names and `--set` as `build`. Example:
41
+
42
+ ```bash
43
+ glugent build --set ADDITIONAL_INSTRUCTIONS="Be terse."
44
+ ```
45
+
46
+ ## More
47
+
48
+ - [Glugent on GitHub](https://github.com/anweba/glugent): the full documentation, including the template syntax
49
+ - [Examples](https://github.com/anweba/glugent/tree/main/examples), from a first agent to a team setup
50
+ - [Changelog](https://github.com/anweba/glugent/blob/main/packages/cli/CHANGELOG.md) and [issues](https://github.com/anweba/glugent/issues)
51
+ - The packages: [`glugent`](https://www.npmjs.com/package/glugent) (the CLI), [`@anweba/glugent-core`](https://www.npmjs.com/package/@anweba/glugent-core) (the library) and [`@anweba/glugent-schemas`](https://www.npmjs.com/package/@anweba/glugent-schemas) (JSON Schemas)
52
+
53
+ ## License
54
+
55
+ [MIT](https://github.com/anweba/glugent/blob/main/packages/cli/LICENSE) © Antonín Báleš
@@ -8,6 +8,8 @@ export declare class Arguments {
8
8
  overrides: Props;
9
9
  config?: string;
10
10
  dryRun: boolean;
11
+ /** `build --check`: compare with the files on disk instead of writing them. */
12
+ check: boolean;
11
13
  force: boolean;
12
14
  static parse(argv: string[]): Arguments;
13
15
  private addOverride;
package/dist/arguments.js CHANGED
@@ -11,6 +11,8 @@ class Arguments {
11
11
  overrides = {};
12
12
  config;
13
13
  dryRun = false;
14
+ /** `build --check`: compare with the files on disk instead of writing them. */
15
+ check = false;
14
16
  force = false;
15
17
  static parse(argv) {
16
18
  const args = new Arguments();
@@ -22,6 +24,8 @@ class Arguments {
22
24
  args.config = argv[++i];
23
25
  else if (arg === "--dry-run")
24
26
  args.dryRun = true;
27
+ else if (arg === "--check")
28
+ args.check = true;
25
29
  else if (arg === "--force")
26
30
  args.force = true;
27
31
  else if (arg === "-h" || arg === "--help")
@@ -1 +1 @@
1
- {"version":3,"file":"arguments.js","sourceRoot":"","sources":["../src/arguments.ts"],"names":[],"mappings":";;;AACA,qCAAoC;AAEpC,uEAAuE;AACvE,MAAa,SAAS;IACpB,OAAO,CAAU;IACjB,kEAAkE;IAClE,KAAK,GAAa,EAAE,CAAC;IACrB,yEAAyE;IACzE,SAAS,GAAU,EAAE,CAAC;IACtB,MAAM,CAAU;IAChB,MAAM,GAAG,KAAK,CAAC;IACf,KAAK,GAAG,KAAK,CAAC;IAEd,MAAM,CAAC,KAAK,CAAC,IAAc;QACzB,MAAM,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC;QAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACpB,IAAI,GAAG,KAAK,OAAO;gBAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;iBAClD,IAAI,GAAG,KAAK,UAAU,IAAI,GAAG,KAAK,IAAI;gBAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,CAA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,GAAG,CAAC,CAAC,CAAC;IACrE,CAAC;CACF;AAjCD,8BAiCC"}
@@ -1,11 +1,17 @@
1
1
  import { Project } from "@anweba/glugent-core";
2
2
  import { Command } from "./command";
3
- /** `glugent build [target...]`: compile targets and write their output files. */
3
+ /**
4
+ * `glugent build [target...]`: compile targets and write their output files.
5
+ * With `--check`, nothing is written: it fails if an output file is missing or differs.
6
+ */
4
7
  export declare class BuildCommand extends Command {
5
8
  run(project: Project): number;
6
9
  /** The targets named on the command line, or all of them. */
7
10
  private selectTargets;
8
11
  private find;
9
- /** Builds one target; returns false (and writes nothing) if it has errors. */
12
+ /** Compiles one target; returns undefined (and writes nothing) if it has errors. */
10
13
  private build;
14
+ private write;
15
+ /** `--check`: true when the file on disk is what the build would write. */
16
+ private check;
11
17
  }
@@ -5,17 +5,28 @@ const glugent_core_1 = require("@anweba/glugent-core");
5
5
  const errors_1 = require("../errors");
6
6
  const reporter_1 = require("../reporter");
7
7
  const command_1 = require("./command");
8
- /** `glugent build [target...]`: compile targets and write their output files. */
8
+ /**
9
+ * `glugent build [target...]`: compile targets and write their output files.
10
+ * With `--check`, nothing is written: it fails if an output file is missing or differs.
11
+ */
9
12
  class BuildCommand extends command_1.Command {
10
13
  run(project) {
11
14
  const targets = this.selectTargets(project);
12
15
  this.out.diagnostics(project.diagnostics);
13
16
  let ok = !reporter_1.Reporter.hasErrors(project.diagnostics);
17
+ let outdated = false;
14
18
  for (const target of targets) {
15
- if (!this.build(project, target))
19
+ const result = this.build(project, target);
20
+ if (!result)
16
21
  ok = false;
22
+ else if (!this.args.check)
23
+ this.write(result);
24
+ else if (!this.check(result))
25
+ outdated = true;
17
26
  }
18
- return ok ? 0 : 1;
27
+ if (outdated)
28
+ this.out.error("Run 'glugent build' to update the files above.");
29
+ return ok && !outdated ? 0 : 1;
19
30
  }
20
31
  /** The targets named on the command line, or all of them. */
21
32
  selectTargets(project) {
@@ -30,19 +41,31 @@ class BuildCommand extends command_1.Command {
30
41
  throw new errors_1.CliError(`unknown target '${name}'`);
31
42
  return target;
32
43
  }
33
- /** Builds one target; returns false (and writes nothing) if it has errors. */
44
+ /** Compiles one target; returns undefined (and writes nothing) if it has errors. */
34
45
  build(project, target) {
35
46
  const result = (0, glugent_core_1.compileTarget)(project, target, { overrides: this.args.overrides });
36
47
  this.out.diagnostics(result.diagnostics);
37
48
  if (reporter_1.Reporter.hasErrors(result.diagnostics)) {
38
49
  this.out.error(`✗ ${target.name} (not written)`);
39
- return false;
50
+ return undefined;
40
51
  }
52
+ return result;
53
+ }
54
+ write(result) {
41
55
  if (!this.args.dryRun)
42
56
  (0, glugent_core_1.writeBuild)(result);
43
57
  const note = this.args.dryRun ? " (dry run)" : "";
44
- this.out.info(`✓ ${target.name} → ${this.out.relative(result.outputFile)}${note}`);
45
- return true;
58
+ this.out.info(`✓ ${result.target.name} → ${this.out.relative(result.outputFile)}${note}`);
59
+ }
60
+ /** `--check`: true when the file on disk is what the build would write. */
61
+ check(result) {
62
+ const status = (0, glugent_core_1.checkBuild)(result);
63
+ const line = `${result.target.name} → ${this.out.relative(result.outputFile)}`;
64
+ if (status === "current")
65
+ this.out.info(`✓ ${line} (up to date)`);
66
+ else
67
+ this.out.error(`✗ ${line} (${status === "missing" ? "missing" : "out of date"})`);
68
+ return status === "current";
46
69
  }
47
70
  }
48
71
  exports.BuildCommand = BuildCommand;
@@ -1 +1 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":";;;AAAA,uDAAkF;AAClF,sCAAqC;AACrC,0CAAuC;AACvC,uCAAoC;AAEpC,iFAAiF;AACjF,MAAa,YAAa,SAAQ,iBAAO;IACvC,GAAG,CAAC,OAAgB;QAClB,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAE5C,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC1C,IAAI,EAAE,GAAG,CAAC,mBAAQ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KAAK,CAAC,KAAK,IAAI,KAAK,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC;QACvF,OAAO,MAAM,KAAK,SAAS,CAAC;IAC9B,CAAC;CACF;AAvDD,oCAuDC"}
package/dist/help.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const HELP = "glugent - glue Markdown sections into targets (agents, docs, ...)\n\nUsage:\n glugent build [target...] [--set KEY=VALUE]... [--config <path>] [--dry-run]\n glugent validate [--set KEY=VALUE]... [--config <path>]\n glugent list [--config <path>]\n glugent convert <file.md>... [--force] [--dry-run]\n\nconvert writes <file>.ggen.md next to each Markdown file, escaping { and } as {{ and }}.\nWith no target names, build builds every target.";
1
+ export declare const HELP = "glugent - glue Markdown sections into targets (agents, docs, ...)\n\nUsage:\n glugent build [target...] [--set KEY=VALUE]... [--config <path>] [--dry-run | --check]\n glugent validate [--set KEY=VALUE]... [--config <path>]\n glugent list [--config <path>]\n glugent convert <file.md>... [--force] [--dry-run]\n\nconvert writes <file>.ggen.md next to each Markdown file, escaping { and } as {{ and }}.\nWith no target names, build builds every target.\nbuild --check writes nothing and fails if an output file is missing or out of date.";
package/dist/help.js CHANGED
@@ -4,11 +4,12 @@ exports.HELP = void 0;
4
4
  exports.HELP = `glugent - glue Markdown sections into targets (agents, docs, ...)
5
5
 
6
6
  Usage:
7
- glugent build [target...] [--set KEY=VALUE]... [--config <path>] [--dry-run]
7
+ glugent build [target...] [--set KEY=VALUE]... [--config <path>] [--dry-run | --check]
8
8
  glugent validate [--set KEY=VALUE]... [--config <path>]
9
9
  glugent list [--config <path>]
10
10
  glugent convert <file.md>... [--force] [--dry-run]
11
11
 
12
12
  convert writes <file>.ggen.md next to each Markdown file, escaping { and } as {{ and }}.
13
- With no target names, build builds every target.`;
13
+ With no target names, build builds every target.
14
+ build --check writes nothing and fails if an output file is missing or out of date.`;
14
15
  //# sourceMappingURL=help.js.map
package/dist/help.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG;;;;;;;;;iDAS6B,CAAC"}
1
+ {"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG;;;;;;;;;;oFAUgE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,17 @@
1
1
  {
2
2
  "name": "glugent",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
+ "description": "Glue Markdown sections into AI agents, docs and other targets: the Glugent command line.",
5
+ "keywords": [
6
+ "glugent",
7
+ "markdown",
8
+ "templates",
9
+ "ai-agents",
10
+ "prompts",
11
+ "agent-instructions",
12
+ "cli"
13
+ ],
14
+ "license": "MIT",
4
15
  "repository": {
5
16
  "type": "git",
6
17
  "url": "git+https://github.com/anweba/glugent.git",
@@ -27,6 +38,6 @@
27
38
  "test": "node --test dist/test/*.test.js"
28
39
  },
29
40
  "dependencies": {
30
- "@anweba/glugent-core": "0.3.0"
41
+ "@anweba/glugent-core": "0.4.1"
31
42
  }
32
43
  }