Skip to content

keryx theme use

Description

Makes an existing theme the default for its type, so commands resolve to it when --theme is omitted.

keryx seeds no themes (spec 0046), so the first theme you add for a type automatically becomes its default. theme use is how you change it afterwards.

Usage

keryx theme use <keyword> --type reel|article|portrait [--project|--user]

Run keryx theme use --help for the authoritative, always-current flag set.

Which file it writes to

Themes live in two scopes — your user config, and a project's committed .keryx.yaml. By default the write goes wherever the key already wins, so the value you set is the value you read back. The command always reports the file:

$ keryx theme use emberlight --type reel
default reel theme is now "emberlight"
written to /home/you/.keryx/config.yaml

Pin the scope explicitly when you mean one in particular:

Flag Writes to Use when
--project the project's .keryx.yaml the default should travel with the repo, so CI resolves it too
--user your user config the default should apply across all your projects

--project outside a project is refused rather than quietly written elsewhere.

When something else still wins

A project default outranks a user one. Setting a user default from inside a project that has its own is a legitimate thing to do — but it will not change what that project resolves to, so the command says so:

$ keryx theme use clay --type reel --user
default reel theme is now "clay"
written to /home/you/.keryx/config.yaml
note: /home/you/blog/.keryx.yaml still sets a default for reel, so it wins over this one

Without that line you would see a success and no change in behaviour.

Notes

  • Pointing the default at a theme that does not exist is refused — a dangling default is exactly the broken state that removing the seeded themes avoided.
  • Only the default key is written. The rest of the catalog is left alone, so setting a project default does not copy your user themes into the project file.

See also