Skip to content

Commit 945f66b

Browse files
author
LittleCoinCoin
committed
refactor(cli): replace --env with --env-var in mcp configure
- Replace --env argument with --env-var for environment variables in mcp configure command - Remove backward compatibility to avoid consumer confusion and technical debt - Update argument parsing and function calls to use new --env-var parameter - Maintain existing --env argument for Hatch environment names in other commands - Provide clear distinction between environment variables (--env-var) and Hatch environments (--env) This change eliminates CLI argument ambiguity and improves user experience with explicit argument naming for different purposes.
1 parent d08a202 commit 945f66b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hatch/cli_hatch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ def main():
10901090
server_type_group.add_argument("--url", help="Server URL for remote MCP servers")
10911091

10921092
mcp_configure_parser.add_argument("--args", nargs="*", help="Arguments for the MCP server command (only with --command)")
1093-
mcp_configure_parser.add_argument("--env", "-e", action="append", help="Environment variables (format: KEY=VALUE)")
1093+
mcp_configure_parser.add_argument("--env-var", action="append", help="Environment variables (format: KEY=VALUE)")
10941094
mcp_configure_parser.add_argument("--headers", action="append", help="HTTP headers for remote servers (format: KEY=VALUE, only with --url)")
10951095
mcp_configure_parser.add_argument("--no-backup", action="store_true", help="Skip backup creation before configuration")
10961096
mcp_configure_parser.add_argument("--dry-run", action="store_true", help="Preview configuration without execution")
@@ -1763,7 +1763,7 @@ def main():
17631763
elif args.mcp_command == "configure":
17641764
return handle_mcp_configure(
17651765
args.host, args.server_name, args.command, args.args,
1766-
args.env, args.url, args.headers, args.no_backup,
1766+
getattr(args, 'env_var', None), args.url, args.headers, args.no_backup,
17671767
args.dry_run, args.auto_approve
17681768
)
17691769

0 commit comments

Comments
 (0)