Expand description
Which command the hooks this CLI installs call.
The library runs as two binaries: the tracevault command and, under
visdom trace, the visdom one that replaces it. Whatever one of them
installs for an agent or for git to run later — hooks, the telemetry
helper, plugins — has to name a command, and it names the one that
installed it: a machine set up with visdom alone has no tracevault on
PATH.
The move goes one way. visdom rewrites tracevault … commands it finds
to visdom trace …; tracevault leaves visdom trace … commands as they
are (see installs_visdom), so an automatic refresh started by one
binary never undoes what the other set up.
Structs§
- Cli
- The command name in a message, for the running binary:
{CLI} repo switchreadstracevault repo switchorvisdom trace repo switch. - Env
- The prefix of the environment variables in a message:
{ENV}_API_KEYreadsTRACEVAULT_API_KEYorVISDOM_API_KEY(whichvisdomaccepts for it). - Top
- The binary’s own name in a message, for the commands
visdomhas at its top level and for message prefixes:{TOP} login,{TOP}: warning: ….
Constants§
- CLI
- See
Cli. - ENV
- See
Env. - TOP
- See
Top. - TRACEVAULT
- How the
tracevaultbinary spells a tracing command. - VISDOM_
TRACE - How the
visdombinary spells one.
Functions§
- installs_
visdom - Whether what is being installed should call
visdom: this is thevisdombinary, or what is already there (existing_is_visdom) does. - is_
visdom - Whether this process is the
visdombinary. - is_
visdom_ command - Whether
commandis one of ours and names thevisdombinary. - name
- The command name to install.
- run_
as_ visdom - Called once by the
visdombinary before it runs anything. - say
text— a message written withtracevault …commands andTRACEVAULT_…variables — as the running binary says it. For messages that are not format strings; those useCLI,TOPandENV.- spelled
command(one of ours, under either name) spelled for the binary chosen byvisdom. Anything else comes back unchanged.- subcommand
- What comes after the command name when
commandis one of ours (tracevault stream …orvisdom trace stream …→stream …).