Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

feat(eve): show add help without an item (#2110)

Casey Gowrieccc604c4e627
diff --git a/.changeset/helpful-add-search.md b/.changeset/helpful-add-search.md
new file mode 100644
index 000000000..e05b0b6b6
--- /dev/null
+++ b/.changeset/helpful-add-search.md
@@ -0,0 +1,5 @@
+---
+"eve": patch
+---
+
+Show `eve add` help and registry search guidance when no item is provided.
diff --git a/docs/install-integrations.mdx b/docs/install-integrations.mdx
index 5be2ff0ef..70844c496 100644
--- a/docs/install-integrations.mdx
+++ b/docs/install-integrations.mdx
@@ -18,6 +18,8 @@ eve add instrumentation/braintrust
If an item is not found, `eve add` searches the available catalogs and prints close matches without installing anything.
+If you do not know an item name yet, run `eve add` without an argument. Its help output shows how to search the registry with `eve registry search <query>`.
+
Extensions may create a mount under `agent/extensions/`. Connections write their initial definition under `agent/connections/` and install `@vercel/connect` when required. Instrumentation providers write `agent/instrumentation.ts`; because an agent has one instrumentation file, compose multiple exporters there by hand. Configure generated files and required environment variables before running your agent.
Some integrations package several independently installable components. For example, `eve add linear` lets you choose the Linear Channel, Linear MCP, or both; both are selected by default. The specific `eve add channel/linear-agent` and `eve add connection/linear` commands remain available.
diff --git a/packages/eve/src/cli/commands/register-registry-commands.ts b/packages/eve/src/cli/commands/register-registry-commands.ts
index 3912f235b..755d9fef3 100644
--- a/packages/eve/src/cli/commands/register-registry-commands.ts
+++ b/packages/eve/src/cli/commands/register-registry-commands.ts
@@ -33,7 +33,7 @@ export function registerRegistryCommands(input: {
}): void {
const { applicationContext, logger, program } = input;
- applicationCommand(program.command("add <item>"), applicationContext)
+ const add = applicationCommand(program.command("add [item]"), applicationContext)
.description("Install a registry item; relative paths use the official eve registry.")
.option("-o, --overwrite", "Overwrite existing files.")
.option("--skip-install", "Run the item's setup flow without installing it.")
@@ -48,9 +48,10 @@ export function registerRegistryCommands(input: {
parseSetupAnswer,
)
.option("-y, --yes", "Run setup and accept its recommended defaults.")
+ .addHelpText("after", "\nSearch the registry:\n $ eve registry search <query>\n")
.action(
async (
- item: string,
+ item: string | undefined,
options: {
skipInstall?: boolean;
overwrite?: boolean;
@@ -60,6 +61,10 @@ export function registerRegistryCommands(input: {
yes?: boolean;
},
) => {
+ if (item === undefined) {
+ add.outputHelp();
+ return;
+ }
if (options.answer !== undefined && !options.nonInteractive) {
throw new InvalidArgumentError("--answer requires --non-interactive.");
}
diff --git a/packages/eve/src/cli/run.test.ts b/packages/eve/src/cli/run.test.ts
index a61063733..573d4a1d6 100644
--- a/packages/eve/src/cli/run.test.ts
+++ b/packages/eve/src/cli/run.test.ts
@@ -151,6 +151,21 @@ describe("CLI command registration", () => {
expect(help).not.toContain("--path");
});
+ it("shows add help and registry search guidance when no item is provided", async () => {
+ const errors: string[] = [];
+ const output: string[] = [];
+
+ await runCli(["add"], {
+ error: (message) => errors.push(message),
+ log: (message) => output.push(message),
+ });
+
+ const help = output.join("\n");
+ expect(errors).toEqual([]);
+ expect(help).toContain("Usage: eve add [options] [item]");
+ expect(help).toContain("eve registry search <query>");
+ });
+
it("registers JSON output and a search result limit for registry discovery commands", async () => {
const output: string[] = [];
const logger = {