@archlang/cli 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.
Files changed (46) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +62 -0
  3. package/dist/cli.cjs +14015 -0
  4. package/dist/cli.d.ts +23 -0
  5. package/dist/cli.d.ts.map +1 -0
  6. package/dist/cli.js +212 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/commands/check.d.ts +30 -0
  9. package/dist/commands/check.d.ts.map +1 -0
  10. package/dist/commands/check.js +53 -0
  11. package/dist/commands/check.js.map +1 -0
  12. package/dist/commands/format.d.ts +50 -0
  13. package/dist/commands/format.d.ts.map +1 -0
  14. package/dist/commands/format.js +170 -0
  15. package/dist/commands/format.js.map +1 -0
  16. package/dist/commands/info.d.ts +34 -0
  17. package/dist/commands/info.d.ts.map +1 -0
  18. package/dist/commands/info.js +102 -0
  19. package/dist/commands/info.js.map +1 -0
  20. package/dist/commands/validate-watch.d.ts +35 -0
  21. package/dist/commands/validate-watch.d.ts.map +1 -0
  22. package/dist/commands/validate-watch.js +84 -0
  23. package/dist/commands/validate-watch.js.map +1 -0
  24. package/dist/commands/validate.d.ts +42 -0
  25. package/dist/commands/validate.d.ts.map +1 -0
  26. package/dist/commands/validate.js +79 -0
  27. package/dist/commands/validate.js.map +1 -0
  28. package/dist/index.d.ts +14 -0
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +14 -0
  31. package/dist/index.js.map +1 -0
  32. package/package.json +58 -0
  33. package/stdlib/arch.backend/common.arch +62 -0
  34. package/stdlib/arch.backend/databases.arch +178 -0
  35. package/stdlib/arch.backend/infra.arch +65 -0
  36. package/stdlib/arch.backend/messaging.arch +114 -0
  37. package/stdlib/arch.backend/package.archspace +6 -0
  38. package/stdlib/arch.backend/protocols.arch +105 -0
  39. package/stdlib/arch.diagrams/common.arch +30 -0
  40. package/stdlib/arch.diagrams/package.archspace +6 -0
  41. package/stdlib/arch.kinds/interaction.arch +29 -0
  42. package/stdlib/arch.kinds/package.archspace +1 -0
  43. package/stdlib/arch.modules/common.arch +62 -0
  44. package/stdlib/arch.modules/package.archspace +6 -0
  45. package/stdlib/arch.ui/package.archspace +3 -0
  46. package/stdlib/arch.ui/tokens.css +60 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Arch:Lang contributors
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
13
+ all 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
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # @archlang/cli
2
+
3
+ Command-line tool for [Arch:Lang](https://archlang.dev) — a typed
4
+ language for describing system architecture as text. Validate, format,
5
+ inspect, and check `.arch` workspaces from the terminal or CI.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install -g @archlang/cli
11
+ # or, no install
12
+ npx -y @archlang/cli --help
13
+ ```
14
+
15
+ ## Commands
16
+
17
+ ```
18
+ archlang validate <path> [--strict] [--json] [--watch]
19
+ archlang format <path> [--check | --diff] [--indent=<n>] [--tabs]
20
+ archlang info <path> [--json]
21
+ archlang check <path> [--strict]
22
+ ```
23
+
24
+ - `validate` loads the workspace and reports diagnostics. Exits
25
+ non-zero on errors; add `--strict` to also fail on warnings.
26
+ - `format` canonicalises indentation. `--check` exits non-zero if any
27
+ file needs reformatting (good for CI). `--diff` prints what would
28
+ change without writing.
29
+ - `info` prints a structured summary of the workspace (modules,
30
+ processes, types, dependency tree). Pair with `--json` for scripts.
31
+ - `check` runs validate + a stricter set of structural checks.
32
+
33
+ Common flags:
34
+
35
+ - `--json` — machine-readable output
36
+ - `--stdlib=<path>` — override the bundled stdlib lookup
37
+ - `--help`, `--version`
38
+
39
+ ## CI usage
40
+
41
+ ```yaml
42
+ - run: npx -y @archlang/cli validate . --strict
43
+ - run: npx -y @archlang/cli format . --check
44
+ ```
45
+
46
+ Exit codes are stable; output is grep-friendly in text mode and
47
+ JSON-Schema-stable in `--json` mode.
48
+
49
+ ## Editor integrations
50
+
51
+ The CLI shares its parser and validator with:
52
+
53
+ - **VS Code extension**: [marketplace.visualstudio.com/items?itemName=Archlang.archlang-vscode](https://marketplace.visualstudio.com/items?itemName=Archlang.archlang-vscode)
54
+ - **Live online viewer**: [archlang.dev/viewer](https://archlang.dev/viewer/)
55
+
56
+ ## Documentation
57
+
58
+ [archlang.dev/docs/language/book/00-foreword/](https://archlang.dev/docs/language/book/00-foreword/)
59
+
60
+ ## License
61
+
62
+ MIT.