You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cli-reference.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ The following environment variables can be used to configure default values for
28
28
-`STRUCTKIT_LOG_LEVEL`: Set the default logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL). Overridden by the `--log` flag.
29
29
-`STRUCTKIT_STRUCTURES_PATH`: Set the default path to structure definitions. This is used as the default value for the `--structures-path` flag when not explicitly provided. When set, the CLI will log an info message indicating that this environment variable is being used.
30
30
-`STRUCTKIT_SOURCES_CONFIG`: Override the user-level named sources config file (default: `$XDG_CONFIG_HOME/structkit/sources.yaml` or `~/.config/structkit/sources.yaml`).
31
+
-`STRUCTKIT_SOURCES_CACHE`: Override the local cache directory used for git-backed sources (default: `$XDG_CACHE_HOME/structkit/sources` or `~/.cache/structkit/sources`).
Manage named custom structure sources. Sources currently support local filesystem directories. Remote sources are reserved for future support.
250
+
Manage named custom structure sources. Sources support local filesystem directories, GitHub repositories, and git-backed repositories.
250
251
251
252
**Usage:**
252
253
@@ -263,16 +264,20 @@ structkit sources list
263
264
264
265
-`--config-path CONFIG_PATH`: Override the sources config file for this command.
265
266
-`NAME`: Source name.
266
-
-`PATH_OR_URL`: Local directoryto use as a structure source.
267
+
-`PATH_OR_URL`: Local directory, GitHub repository shorthand (`owner/repo`), `github://owner/repo`, or git URL to use as a structure source. GitHub sources may include an optional ref and subdirectory, for example `github://owner/repo@v1/structures`.
StructKit can store named local structure sources in a user-level config file. This is useful when you reuse a shared template directory and do not want to pass `--structures-path` or set `STRUCTKIT_STRUCTURES_PATH` every time.
41
+
StructKit can store named structure sources in a user-level config file. This is useful when you reuse a shared template directory or GitHub repository and do not want to pass `--structures-path` or set `STRUCTKIT_STRUCTURES_PATH` every time.
@@ -50,7 +52,14 @@ structkit sources remove company
50
52
51
53
By default, sources are written to `$XDG_CONFIG_HOME/structkit/sources.yaml` or `~/.config/structkit/sources.yaml`. Set `STRUCTKIT_SOURCES_CONFIG` to use a different file, or pass `structkit sources --config-path <file>`.
52
54
53
-
Named sources currently support local filesystem directories. Remote URLs are reserved for future support and are rejected by validation.
55
+
Named sources support:
56
+
57
+
- Local filesystem directories, such as `./templates` or `~/platform/structures`
58
+
- GitHub shorthand, such as `httpdss/platform-structures`
59
+
- GitHub URLs, such as `github://httpdss/platform-structures` or `github://httpdss/platform-structures@v1/structures`
60
+
- Git URLs, including HTTPS, SSH, and `file://` repositories
61
+
62
+
Git-backed sources are cloned into `$XDG_CACHE_HOME/structkit/sources` or `~/.cache/structkit/sources` by default. Set `STRUCTKIT_SOURCES_CACHE` to use a different cache directory. StructKit runs `git fetch` when a git-backed source is resolved or validated, so a named source can track the latest content from its configured repository or ref.
@@ -68,6 +69,7 @@ Generate a project structure using specified definition and options.
68
69
-`dry_run` (optional): Perform a dry run without creating actual files (default: false)
69
70
-`mappings` (optional): Variable mappings for template substitution
70
71
-`structures_path` (optional): Custom path to structure definitions
72
+
-`source` (optional): Named source configured with `manage_sources`. The structure definition can also use a `<source>/<structure>` prefix.
71
73
72
74
### 4. get_structure_vars
73
75
Inspect variables declared by a specific structure without generating files.
@@ -146,6 +148,26 @@ Visualize structure dependencies from `folders[].struct` references as text, JSO
146
148
-`graph_all` (optional): Graph all available structures (default: false).
147
149
-`output` (optional): Output format - "text", "json", or "mermaid" (default: "text").
148
150
151
+
### 8. manage_sources
152
+
Manage named structure sources. Sources can point at local directories, GitHub repositories, or git URLs. Git-backed sources are cloned into the StructKit sources cache and refreshed when resolved or validated.
0 commit comments