Skip to content

v1.19.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Dec 09:28
92629cf

Adding a router or switch no longer means editing YAML. mikromcp device add asks the questions for a RouterOS router or a SwOS switch, tests the connection, and writes routers.yaml and .env; device list and device remove manage what is there. Requested in #170 by @Laznology. This release also fixes mikromcp init wiping an existing .env when run a second time.

Upgrading from 1.18. mikromcp init asks whether to use HTTPS before it asks for the port, and suggests 443 for HTTPS instead of 80. Scripts that drive its prompts need the new order. The server itself is unchanged.

Added

  • mikromcp device add, device list and device remove manage the RouterOS routers and SwOS switches in routers.yaml without editing it by hand or running the whole setup wizard again. device add asks for the device type (or takes --type routeros|swos), then only the questions that type needs: TLS, certificate pinning and RouterOS version for a router; none of them, port 80 and an allowed empty factory password for a switch. It offers a connection test (REST system/resource, or SwOS sys.b), validates the result with the server's own schema before writing, keeps the comments and formatting in routers.yaml, and adds the credentials to ~/.mikromcp/.env next to the existing ones. A credential prefix another device already uses can share its credentials, and an existing id is replaced only after confirmation. device list shows each device's type, address, tags, the default, and whether its credentials are set. device remove also offers to remove credentials no other device uses, and clears MIKROMCP_DEFAULT_ROUTER when it named the removed device (#170).
  • mikromcp init sets up a SwOS switch as well as a RouterOS router, and offers the same connection test before writing anything. It now asks whether to use HTTPS first, then suggests port 443 or 80 to match, and the password is no longer echoed as you type it.

Fixed

  • Running mikromcp init again with an existing ~/.mikromcp/.env no longer replaces the file. Before, it deleted the credentials of every device added earlier, any setting you had changed, and generated a new MIKROMCP_CONFIRMATION_SECRET. The file is now merged: init sets the new device's credentials, the transport and (if chosen) the default router, and leaves everything else alone. .env is created owner-only (0600), and a password with spaces, # or quotes is quoted so dotenv reads it back intact.