Project
cortex
Description
cortex plugin list and cortex plugin show display wrong metadata for any plugin created with the built-in cortex plugin new template. All plugins appear with their directory name as the plugin name, 0.0.0 as the version, and an empty description — regardless of what the plugin.toml actually contains.
Root cause: MANIFEST_TEMPLATE (used by cortex plugin new) stores name, version, and description under the [plugin] nested section:
[plugin]
id = "my-awesome-plugin"
name = "My Awesome Plugin"
version = "1.2.3"
description = "Adds awesome features to Cortex"
But run_list() and run_show() read only top-level keys:
// src/cortex-cli/src/plugin_cmd.rs (run_list, ~line 992)
let name = manifest
.get("name") // BUG: looks for top-level "name" — not found in [plugin] section
.and_then(|v| v.as_str())
.unwrap_or_else(|| path.file_name()...); // falls back to directory name
let version = manifest
.get("version") // BUG: same issue
.and_then(|v| v.as_str())
.unwrap_or("0.0.0"); // always shows 0.0.0
Meanwhile run_install() and run_validate() correctly handle the [plugin] structure:
// run_install() correctly checks [plugin].name first, then falls back to top-level
let plugin_name = manifest
.get("plugin")
.and_then(|p| p.get("name")) // checks [plugin].name
.or_else(|| manifest.get("name")) // then top-level
.and_then(|v| v.as_str())
.unwrap_or("unknown");
run_list() and run_show() lack the manifest.get("plugin") lookup, making them inconsistent with the rest of the plugin subsystem.
Error Message
(no error — wrong metadata is silently displayed)
Debug Logs
$ cortex plugin new my-awesome-plugin
# Creates plugin.toml with [plugin] section (see template)
$ cortex plugin list
Installed Plugins:
------------------------------------------------------------
my-awesome-plugin v0.0.0 [enabled]
# BUG: shows directory name, not "My Awesome Plugin"
# BUG: shows 0.0.0, not the actual version from [plugin]
# BUG: description is empty
$ cortex plugin show my-awesome-plugin
Plugin: my-awesome-plugin
----------------------------------------
# BUG: no version, no description shown (keys not found at top level)
System Information
Cortex CLI v0.0.7
OS: Linux (Ubuntu 22.04)
Component: src/cortex-cli/src/plugin_cmd.rs — run_list() and run_show()
Screenshots

Steps to Reproduce
- Create a plugin:
cortex plugin new my-plugin
- The template creates
plugin.toml with [plugin] nested section containing name, version, description
- Run
cortex plugin list
- Observe: name shows as directory name, version shows as
0.0.0, description is empty
Expected Behavior
cortex plugin list should display the name, version, and description from the [plugin] section of plugin.toml — the same metadata that run_install() and run_validate() correctly read.
Actual Behavior
run_list() and run_show() only look for top-level keys (manifest.get("name")). Since the manifest template nests these under [plugin], the keys are not found and defaults are used (directory name, "0.0.0", empty string).
Additional Context
Fix: Apply the same pattern used in run_install() to run_list() and run_show():
// In run_list() and run_show(), replace:
manifest.get("name").and_then(|v| v.as_str()).unwrap_or("...")
// With:
manifest.get("plugin")
.and_then(|p| p.get("name"))
.or_else(|| manifest.get("name"))
.and_then(|v| v.as_str())
.unwrap_or("...")
Apply the same fix for version, description, enabled, and author fields.
Affected file: src/cortex-cli/src/plugin_cmd.rs, functions run_list() (~line 992) and run_show() (~line 1240)
Project
cortex
Description
cortex plugin listandcortex plugin showdisplay wrong metadata for any plugin created with the built-incortex plugin newtemplate. All plugins appear with their directory name as the plugin name,0.0.0as the version, and an empty description — regardless of what theplugin.tomlactually contains.Root cause:
MANIFEST_TEMPLATE(used bycortex plugin new) storesname,version, anddescriptionunder the[plugin]nested section:But
run_list()andrun_show()read only top-level keys:Meanwhile
run_install()andrun_validate()correctly handle the[plugin]structure:run_list()andrun_show()lack themanifest.get("plugin")lookup, making them inconsistent with the rest of the plugin subsystem.Error Message
Debug Logs
System Information
Screenshots
Steps to Reproduce
cortex plugin new my-pluginplugin.tomlwith[plugin]nested section containingname,version,descriptioncortex plugin list0.0.0, description is emptyExpected Behavior
cortex plugin listshould display thename,version, anddescriptionfrom the[plugin]section ofplugin.toml— the same metadata thatrun_install()andrun_validate()correctly read.Actual Behavior
run_list()andrun_show()only look for top-level keys (manifest.get("name")). Since the manifest template nests these under[plugin], the keys are not found and defaults are used (directory name,"0.0.0", empty string).Additional Context
Fix: Apply the same pattern used in
run_install()torun_list()andrun_show():Apply the same fix for
version,description,enabled, andauthorfields.Affected file:
src/cortex-cli/src/plugin_cmd.rs, functionsrun_list()(~line 992) andrun_show()(~line 1240)