Expand description
Which AI tools setup, onboard and the post-update refresh may touch.
Precedence: an explicit --agents list, then the saved setup.agents,
then — for the post-update refresh only — the tools that already carry a
lean-ctx entry. A setup with neither keeps the historical default and
offers every detected tool. An update therefore never connects a tool that
was installed after the last setup.
Structs§
- Detected
Agent - One selectable tool. Several registry targets can share an agent key (Augment CLI + VS Code, Cline + Cline CLI, Qoder paths); they are one choice.
Enums§
Functions§
- connected_
agent_ keys - Agent keys an earlier setup connected (a lean-ctx entry is present).
- detected_
agents - Installed tools, one entry per agent key, in registry order.
- known_
agent_ keys - Agent keys
--agentsandsetup.agentsaccept. - parse_
agent_ list - Parse a
--agentsvalue: comma-separated agent keys, ornoneto connect no tool at all. Unknown names are an error, never silently dropped. - parse_
selection_ answer - Interpret the answer to the selection prompt. Empty keeps
default; otherwiseall,none, or numbers / agent keys separated by commas or spaces select exactly those tools. - prompt_
agent_ selection - Ask which detected tools lean-ctx should connect. Reads stdin; callers must only use it on an interactive terminal.
- prompt_
default - Default for the prompt: the recorded choice, else the connected tools, else (first setup) every detected tool.
- remember_
connected_ agent init --agent <key>connects a tool on purpose: add it to a recorded selection so later updates keep it current. Without a recorded selection nothing is written — updates already follow the connected tools.- resolve_
scope - Resolve the scope for one run.
connectedis only evaluated for the post-update refresh without a recorded choice. - save_
selection - Record the choice so later updates refresh exactly these tools.
- scope_
for_ run - Scope for a setup run:
--agents, thensetup.agents, then (refresh only) the already-connected tools, else every detected tool. - take_
agents_ flag - Pull
--agents <list>/--agents=<list>out of CLI args. Returns the remaining args and the raw list;Errwhen the flag has no value.