feat!: remove the deprecated --install-from flag and .install remote form

--install <git-url|name> is the single entry point for remote installs
and updates; the unified .install dispatch likewise replaces
.install remote. Flag completion for .install now applies to the
unified form.
This commit is contained in:
2026-08-24 11:15:13 -06:00
parent 9541a094d8
commit 4987d850f9
7 changed files with 19 additions and 99 deletions
+12 -57
View File
@@ -50,7 +50,7 @@ pub enum McpScopeArg {
"model", "prompt", "role", "session", "agent", "rag", "rebuild_rag",
"macro_name", "execute", "code", "file", "no_stream", "no_memory",
"init_memory", "dry_run", "info", "build_tools", "install",
"install_from", "install_builtins", "sync_models", "list_models", "list_roles",
"install_builtins", "sync_models", "list_models", "list_roles",
"list_sessions", "list_agents", "list_rags", "list_macros",
"list_skills", "list_bundles", "skill", "tail_logs", "completions",
"update", "update_bundle", "uninstall",
@@ -61,11 +61,6 @@ pub enum McpScopeArg {
.args(["mcp_add", "mcp_remove", "mcp_list", "mcp_get"])
.multiple(false)
),
group(
ArgGroup::new("remote-install")
.args(["install", "install_from"])
.multiple(false)
),
)]
pub struct Cli {
/// Input text
@@ -197,33 +192,21 @@ pub struct Cli {
long,
value_name = "CATEGORY",
value_enum,
conflicts_with_all = ["install", "install_from"],
conflicts_with_all = ["install"],
help_heading = "Installation & Updates"
)]
pub install_builtins: Option<AssetCategory>,
/// Install assets from a remote git repository (URL may be suffixed with #<ref>)
#[arg(
long,
value_name = "GIT_URL",
hide = true,
help_heading = "Installation & Updates"
)]
pub install_from: Option<String>,
/// Restrict a remote install to a single asset category
#[arg(
long,
value_name = "CATEGORY",
value_enum,
requires = "remote-install",
requires = "install",
help_heading = "Installation & Updates"
)]
pub filter: Option<InstallFilter>,
/// Overwrite all conflicts without prompting (used with --install)
#[arg(
long,
requires = "remote-install",
help_heading = "Installation & Updates"
)]
#[arg(long, requires = "install", help_heading = "Installation & Updates")]
pub install_force: bool,
/// Update an installed bundle from its recorded source (NAME may be suffixed with #<ref> to move a pin)
#[arg(long, value_name = "NAME", help_heading = "Installation & Updates")]
@@ -581,65 +564,37 @@ mod tests {
}
#[test]
fn parse_install_from_flag_still_works() {
assert_eq!(
parse(&["--install-from", "https://github.com/x/y"])
.install_from
.as_deref(),
Some("https://github.com/x/y")
);
fn parse_install_from_is_no_longer_a_flag() {
let cli = parse(&["--install-from", "https://github.com/x/y"]);
assert!(cli.install.is_none());
assert_eq!(cli.text, vec!["--install-from", "https://github.com/x/y"]);
}
#[test]
fn parse_install_conflicts_with_install_from() {
assert!(Cli::try_parse_from(["coyote", "--install", "x", "--install-from", "y"]).is_err());
}
#[test]
fn parse_install_builtins_conflicts_with_remote_install_flags() {
fn parse_install_builtins_conflicts_with_install() {
assert!(
Cli::try_parse_from(["coyote", "--install-builtins", "agents", "--install", "x"])
.is_err()
);
assert!(
Cli::try_parse_from([
"coyote",
"--install-builtins",
"agents",
"--install-from",
"y"
])
.is_err()
);
}
#[test]
fn parse_filter_requires_a_remote_install_flag() {
fn parse_filter_requires_install() {
assert!(Cli::try_parse_from(["coyote", "--filter", "agents"]).is_err());
assert_eq!(
parse(&["--install", "https://github.com/x/y", "--filter", "agents"]).filter,
Some(InstallFilter::Agents)
);
assert_eq!(
parse(&[
"--install-from",
"https://github.com/x/y",
"--filter",
"agents"
])
.filter,
Some(InstallFilter::Agents)
);
}
#[test]
fn parse_install_force_requires_a_remote_install_flag() {
fn parse_install_force_requires_install() {
assert!(Cli::try_parse_from(["coyote", "--install-force"]).is_err());
assert!(parse(&["--install", "https://github.com/x/y", "--install-force"]).install_force);
}
#[test]
fn help_hides_install_from_and_shows_install_builtins() {
fn help_omits_install_from_and_shows_install_builtins() {
use clap::CommandFactory;
let help = Cli::command().render_long_help().to_string();
assert!(!help.contains("--install-from"), "help: {help}");