Skip to main content

corgi cache paths

corgi cache paths​

Print the directories worth caching, and a key derived from every cacheKey file

Synopsis​

Print the dependency directories a CI cache should persist, and a key that changes whenever any beforeStart cacheKey file changes.

Derived from the compose file, so the list cannot drift when a service is added. A service opts in by giving a beforeStart step a cacheKey; without one corgi cannot skip that install anyway.

corgi_services/.cache is always included. It holds the markers for steps whose install has no directory of its own (go.sum, for one). A step that produces a dependency directory keeps its marker inside it (node_modules/.corgi-step-0), so one cache entry carries both and a stale restore cannot pass as fresh.

GitHub Actions can read this plan at runtime through the corgi action's outputs. GitLab cannot - its cache config is static YAML - so --gitlab renders a job template to commit, and --check fails when that file no longer matches the compose file.

Run it after the service directories exist. A cacheKey file that is not on disk yet hashes to a fixed marker, so the key comes out the same on every run and the cache never invalidates - in a workflow that means the plan belongs after corgi init, not before. The command warns when that happens; --strict turns the warning into exit 1, and --json reports it as complete: false with the files under missingFiles.

Examples: corgi cache paths corgi cache paths --json corgi cache paths --key corgi cache paths --json --strict corgi cache paths --gitlab --out .gitlab/corgi-cache.yml corgi cache paths --gitlab --check .gitlab/corgi-cache.yml

corgi cache paths [flags]

Options​

--check string With --gitlab: exit non-zero when this file differs from what would be generated
--gitlab Render a GitLab CI cache job template instead of a path list
-h, --help help for paths
--key Print only the cache key
--out string With --gitlab: write to this file instead of stdout, creating its directory
--path-prefix string With --gitlab: prefix every path, for a pipeline that clones the workspace into a subdirectory
--strict Exit 1 when a cacheKey file does not exist, instead of only warning

Options inherited from parent commands​

--describe Describe contents of corgi-compose file
--dockerContext string Specify docker context to use, can be default,orbctl,colima (default "default")
-l, --exampleList List examples to choose from. Click on any example to download it
-f, --filename string Custom filepath for for corgi-compose
--fromScratch Clean the .corgi/corgi_services folder before running
-t, --fromTemplate string Create corgi service from template url
--fromTemplateName string Create corgi service from template name and url
-g, --global Use global path to one of the services
--interactive Force interactive prompts even when no TTY/agent detected
--isolate string Run this workspace under a named lease: own port block, own database names, own containers
--json Emit machine-readable JSON output
--privateToken string Private token for private repositories to download files
-o, --runOnce Run corgi once and exit
--silent Hide all welcome messages

SEE ALSO​

  • corgi cache - What a CI cache should persist between runs
Auto generated by spf13/cobra on 22-Sep-2026​