hyperctl asset ls command

Overview


List all static assets for a given website. The hyperctl asset ls command reads website configuration and lists all assets in the configured theme, website, and content subdirectories.

NEW! Available in hyperctl version 0.15.0 and later.

Usage


1List all static assets.
2
3Usage:
4        hyperctl asset ls [options]
5
6Options:
7        -c, --config  Path to the website configuration file. (required) (env: HYPER_CONFIG)
8        -h, --help    Display help information.

Example


The hyperctl asset ls command is a helpful utility for listing assets.

It works well to troubleshoot surprising hyperctl build results. For example, the current build report for the @hypertemplates.net website looks like the following:

1Pages:        79 (3.4 MB)
2Assets:       69 (77.3 MB)
3Feeds:         2 (27.9 KB)
4Tags:          1
5----------------
6TOTAL      132ms

132ms is pretty fast for writing 150 files (79 index.html files + 69 assets + and 2 atom.xml files)! But we have observed build times for @hypertemplates.net consistently under 100ms, so let's use hyperctl asset ls to determine what all these 69 assets files are.

 1$ hyperctl asset ls
 2No  Source                                                    Size      Path
 3--  ------                                                    ----      ----
 41   theme/static/favicon.png                                  8339      /favicon.png
 52   theme/static/css/chroma-base16-snazzy.css                 4518      /css/chroma-base16-snazzy.css
 63   theme/static/css/colors.css                               9651      /css/colors.css
 74   theme/static/css/grid.css                                 3416      /css/grid.css
 85   theme/static/css/pygments.css                             3767      /css/pygments.css
 96   theme/static/css/reset.css                                1199      /css/reset.css
107   theme/static/css/styles.css                               1241      /css/styles.css
118   theme/static/css/typography.css                           5136      /css/typography.css
129   theme/static/css/variables.css                            1035      /css/variables.css
1310  theme/static/css/components/code-snippet.css              1649      /css/components/code-snippet.css
1411  theme/static/css/components/example-component.css         250       /css/components/example-component.css
1512  theme/static/fonts/Jersey/Jersey10-Regular.ttf            76636     /fonts/Jersey/Jersey10-Regular.ttf
1613  theme/static/fonts/Jersey/Jersey15-Regular.ttf            103368    /fonts/Jersey/Jersey15-Regular.ttf
1714  theme/static/fonts/Jersey/Jersey20-Regular.ttf            127616    /fonts/Jersey/Jersey20-Regular.ttf
1815  theme/static/fonts/Jersey/Jersey25-Regular.ttf            141388    /fonts/Jersey/Jersey25-Regular.ttf
1916  theme/static/fonts/Jersey/OFL.txt                         4488      /fonts/Jersey/OFL.txt
2017  theme/static/fonts/Silkscreen/OFL.txt                     4487      /fonts/Silkscreen/OFL.txt
2118  theme/static/fonts/Silkscreen/Silkscreen-Bold.ttf         30384     /fonts/Silkscreen/Silkscreen-Bold.ttf
2219  theme/static/fonts/Silkscreen/Silkscreen-Regular.ttf      31960     /fonts/Silkscreen/Silkscreen-Regular.ttf
2320  theme/static/icons/arrow-right-sharp-solid.svg            406       /icons/arrow-right-sharp-solid.svg
2421  theme/static/icons/bars.svg                               522       /icons/bars.svg
2522  theme/static/icons/chevron-right-thin.svg                 398       /icons/chevron-right-thin.svg
2623  theme/static/icons/cloud-arrow-down-solid.svg             684       /icons/cloud-arrow-down-solid.svg
2724  theme/static/icons/github-brands.svg                      1545      /icons/github-brands.svg
2825  theme/static/icons/square-up-right-solid.svg              589       /icons/square-up-right-solid.svg
2926  theme/static/img/apple-touch-icon.jpg                     4467      /img/apple-touch-icon.jpg
3027  theme/static/img/apple-touch-icon.png                     4467      /img/apple-touch-icon.png
3128  theme/static/img/favicon-1024x1024.png                    14981     /img/favicon-1024x1024.png
3229  theme/static/img/favicon-128x128.png                      3986      /img/favicon-128x128.png
3330  theme/static/img/favicon-192x192.png                      4602      /img/favicon-192x192.png
3431  theme/static/img/favicon-256x256.png                      5272      /img/favicon-256x256.png
3532  theme/static/img/favicon-512x512.png                      8194      /img/favicon-512x512.png
3633  theme/static/img/favicon-64x64.png                        3257      /img/favicon-64x64.png
3734  theme/static/img/ht-logo-duo.svg                          4556      /img/ht-logo-duo.svg
3835  theme/static/img/ht-logo-mono.svg                         4693      /img/ht-logo-mono.svg
3936  theme/static/img/hypertemplates-logo-duo.svg              20514     /img/hypertemplates-logo-duo.svg
4037  theme/static/img/hypertemplates-logo-mono.svg             20360     /img/hypertemplates-logo-mono.svg
4138  theme/static/img/logo-horizontal.svg                      22401     /img/logo-horizontal.svg
4239  theme/static/img/logo.svg                                 22086     /img/logo.svg
4340  theme/static/js/components/auto-anchor.js                 2232      /js/components/auto-anchor.js
4441  theme/static/js/components/auto-toc.js                    3893      /js/components/auto-toc.js
4542  theme/static/js/components/code-highlights.js             2808      /js/components/code-highlights.js
4643  theme/static/js/components/code-snippet.js                3529      /js/components/code-snippet.js
4744  theme/static/js/components/contact-form.js                1509      /js/components/contact-form.js
4845  theme/static/js/components/dismiss-button.js              2788      /js/components/dismiss-button.js
4946  theme/static/js/components/doc-breadcrumbs.js             2531      /js/components/doc-breadcrumbs.js
5047  theme/static/js/components/edit-this-page.js              4199      /js/components/edit-this-page.js
5148  theme/static/js/components/example-component.js           1700      /js/components/example-component.js
5249  theme/static/js/components/footer-menu.js                 1848      /js/components/footer-menu.js
5350  theme/static/js/components/hyper-feed.js                  6977      /js/components/hyper-feed.js
5451  theme/static/js/components/hyper-finder.js                5722      /js/components/hyper-finder.js
5552  theme/static/js/components/relative-time.js               4606      /js/components/relative-time.js
5653  static/favicon.ico                                        0         /favicon.ico
5754  static/downloads/.DS_Store                                6148      /downloads/.DS_Store
5855  static/downloads/hyperctl_0.14.2_darwin_amd64.tar.gz      10333680  /downloads/hyperctl_0.14.2_darwin_amd64.tar.gz
5956  static/downloads/hyperctl_0.14.2_darwin_arm64.tar.gz      9737254   /downloads/hyperctl_0.14.2_darwin_arm64.tar.gz
6057  static/downloads/hyperctl_0.14.2_darwin_universal.tar.gz  20070564  /downloads/hyperctl_0.14.2_darwin_universal.tar.gz
6158  static/downloads/hyperctl_0.14.2_linux_amd64.tar.gz       10312044  /downloads/hyperctl_0.14.2_linux_amd64.tar.gz
6259  static/downloads/hyperctl_0.14.2_linux_arm64.tar.gz       9547889   /downloads/hyperctl_0.14.2_linux_arm64.tar.gz
6360  static/downloads/hyperctl_0.14.2_windows_amd64.tar.gz     10421709  /downloads/hyperctl_0.14.2_windows_amd64.tar.gz
6461  static/downloads/hyperctl_0.14.2_windows_arm64.tar.gz     9576095   /downloads/hyperctl_0.14.2_windows_arm64.tar.gz
6562  static/js/main.js                                         0         /js/main.js
6663  content/blog/page.js                                      32        /blog/page.js
6764  content/blog/introducing-hypertemplates/cover-dark.png    54995     /blog/introducing-hypertemplates/cover-dark.png
6865  content/blog/introducing-hypertemplates/cover.png         55430     /blog/introducing-hypertemplates/cover.png
6966  content/docs/example-letterhead.pdf                       29001     /docs/example-letterhead.pdf
7067  content/cover-dark.png                                    54995     /cover-dark.png
7168  content/cover.png                                         55430     /cover.png
7269  content/page.js                                           0         /page.js

Aha! Right away we can see that the downloads are significantly larger (ranging from 9547889 bytes or 9.1MB to 20070564 bytes or 19MB) than all of my other assets. If we wanted to get a sense for build times sans these large assets, we could delete them and run the build again.

1Pages:        79 (3.4 MB)
2Assets:       62 (985.2 KB)
3Feeds:         2 (27.9 KB)
4Tags:          1
5----------------
6TOTAL       98ms

That's more like it. A 98ms build is less than 1ms per file written to disk! We can also see that all other assets for the entire @hypertemplates.net website are less than 1MB. We should restore the large download assets so that our builds are complete again, but this little exercise illustrates how hyperctl asset ls is a help utility for asset troubleshooting.

Options


-c, --config
Path to the website configuration file (site.yaml or site.json).

Defaults to the HYPER_CONFIG environment variable, if set.

To configure a default, use the export command.

1export HYPER_CONFIG="site.yaml"

💬 Join the community

Stay up-to-date with the latest releases and other news from the Team behind HyperTemplates. Ask the developers questions, get help from the community, and share your creations! 🎨