gabriel / muse public
feat patch task/init-default-hub-remotes #1 / 1
AI Agent gabriel · 147 days ago · Apr 26, 2026 · Diff

feat: muse init pre-wires local/staging/production remotes by default

- Add HUB_LOCAL/HUB_STAGING/HUB_PRODUCTION constants - Add resolve_default_handle() — reads handle from ~/.muse/identity.toml - _build_default_config() generates TOML with hub.url=localhost:1337 and three remotes (local, staging, production) when a handle is available - Without a handle: hub.url still defaults to localhost, remotes skipped - JSON output now includes 'remotes' key listing wired remote URLs - 15 new TDD tests covering all cases

sha256:4843cdc97dbb2bf25e7e5167f957a409bdf414e824d0b09b32b521aded47e367 sha
+27 ~2 symbols
sha256:8e5331609f04339845845e75b1b6b21145f43eb1339f24417e9a8a051898d57a snapshot
+27
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 29 symbols
~ muse/cli/commands/init.py .py 6 symbols added, 2 symbols modified
+ HUB_LOCAL variable variable HUB_LOCAL L87–87
+ HUB_PRODUCTION variable variable HUB_PRODUCTION L89–89
+ HUB_STAGING variable variable HUB_STAGING L88–88
+ _DEFAULT_REMOTES variable variable _DEFAULT_REMOTES L91–95
+ _build_default_config function function _build_default_config L184–216
+ resolve_default_handle function function resolve_default_handle L98–121
~ run
~ tests/test_cmd_init.py .py 21 symbols added
+ TestDefaultHubRemotes class class TestDefaultHubRemotes L1598–1747
+ _init_with_handle method method _init_with_handle L1608–1623
+ _read_config method method _read_config L1602–1606
+ test_different_handles_produce_different_urls method method test_different_handles_produce_different_urls L1686–1694
+ test_hub_url_default_is_not_commented_out method method test_hub_url_default_is_not_commented_out L1633–1637
+ test_hub_url_defaults_to_localhost method method test_hub_url_defaults_to_localhost L1627–1631
+ test_json_output_includes_remotes_key method method test_json_output_includes_remotes_key L1720–1727
+ test_json_remotes_lists_all_three method method test_json_remotes_lists_all_three L1729–1736
+ test_local_remote_url_contains_handle_and_slug method method test_local_remote_url_contains_handle_and_slug L1641–1645
+ test_local_remote_uses_localhost_base method method test_local_remote_uses_localhost_base L1647–1650
+ test_no_handle_hub_url_still_set_to_localhost method method test_no_handle_hub_url_still_set_to_localhost L1698–1706
+ test_no_handle_no_remotes_written method method test_no_handle_no_remotes_written L1708–1716
+ test_production_remote_url_contains_handle_and_slug method method test_production_remote_url_contains_handle_and_slug L1666–1669
+ test_production_remote_uses_production_base method method test_production_remote_uses_production_base L1671–1674
+ test_reinit_with_force_preserves_existing_config method method test_reinit_with_force_preserves_existing_config L1740–1747
+ test_slug_uses_directory_name method method test_slug_uses_directory_name L1678–1684
+ test_staging_remote_url_contains_handle_and_slug method method test_staging_remote_url_contains_handle_and_slug L1654–1657
+ test_staging_remote_uses_staging_base method method test_staging_remote_uses_staging_base L1659–1662
+ _HUB_LOCAL variable variable _HUB_LOCAL L1593–1593
+ _HUB_PRODUCTION variable variable _HUB_PRODUCTION L1595–1595
+ _HUB_STAGING variable variable _HUB_STAGING L1594–1594
← Older Oldest on task/init-default-hub-remotes
All commits
Newer → Latest on task/init-default-hub-remotes

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:4843cdc97dbb2bf25e7e5167f957a409bdf414e824d0b09b32b521aded47e367 --body "your comment"