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
Provides agents and automation tools with local access to external documentation without committing it to the repository.
11
+
Provides agents and developers with local access to external documentation without committing it to the repository.
12
12
13
13
Documentation is cached in a gitignored location, exposed to agent and tool targets via links or copies, and updated through sync commands or postinstall hooks.
14
14
15
15
## Features
16
16
17
-
-**Local only**: Cache lives in the directory `.docs` (or a custom location) and _should_ be gitignored.
17
+
-**Local only**: Cache lives in the directory `.docs` (or a custom location) and can be gitignored.
18
18
-**Deterministic**: `docs-lock.json` pins commits and file metadata.
19
19
-**Fast**: Local cache avoids network roundtrips after sync.
20
20
-**Flexible**: Cache full repos or just the subdirectories you need.
@@ -54,20 +54,21 @@ npx docs-cache clean
54
54
55
55
## Configuration
56
56
57
-
`docs.config.json` at project root (or `docs-cache`inside`package.json`):
57
+
`docs.config.json` at project root (or a `docs-cache`field in`package.json`):
|`targetDir`| Path where files should be symlinked/copied to, outside `.docs`. |
121
-
|`targetMode`| How to link or copy from the cache to the destination. |
122
-
|`required`| Whether missing sources should fail. |
123
-
|`maxBytes`| Maximum total bytes to materialize. |
124
-
|`maxFiles`| Maximum total files to materialize. |
125
-
|`toc`| Generate per-source `TOC.md`. Supports `true`, `false`, or a format (`"tree"`, `"compressed"`). |
126
-
|`unwrapSingleRootDir`| If the materialized output is nested under a single directory, unwrap it (recursively). |
127
-
128
-
> **Note**: Sources are always downloaded to `.docs/<id>/`. If you provide a `targetDir`, `docs-cache` will create a symlink or copy pointing from the cache to that target directory. The target should be outside `.docs`. Git operation timeout is configured via the `--timeout-ms` CLI flag, not as a per-source configuration option.
|`targetDir`| Path where files should be symlinked/copied to, outside `.docs`. |
120
+
121
+
> **Note**: Sources are always downloaded to `.docs/<id>/`. If you provide a `targetDir`; `docs-cache` will create a symlink or copy pointing from the cache to that target directory.
0 commit comments