Files
devvm/internal/msg/docs.go
T
w3cjandClaude Opus 5.5 329e31be1d refactor(secrets): the proxy looks secrets up in-process, from one versioned bindings file
The proxy no longer runs devvm secret get for a value: proxy.IO.Secret,
which devvm _proxy sets to secrets.Store.Get, looks a binding's value up
in the proxy's own process (Keychain, devvm's secrets folder, or the
agent's login file), so internal/proxy stays standard library only.
Config.SecretCmd (secret_cmd) and the hidden devvm secret get command go,
with secret_to_terminal and secret_read_failed; Main refuses a config
with secrets and no IO.Secret.

One binding type, proxy.Binding, with kind secret|login and a login's
agent, in proxy.BindingList ({"version": 1, "bindings": [...]}), written
by secrets.Store (Encode) and read by the proxy and RefreshFiles with
proxy.ReadBindings (private regular file, no link, 1 MiB, version and
kinds checked; an unreadable file has no bindings). It replaces
proxy.binding, secrets.binding and agentlogin.Binding; the kind replaces
the name-prefix classifiers in proxy.ttlOf, secrets.loginOf and
RefreshFiles' Lookup check; proxy.InterceptLines replaces
agentlogin.Hosts and RefreshFiles' host loop.

agentlogin's user-actionable errors are typed (ErrCodexNoKey,
ErrCodexNoChatGPT, RefreshError) and secrets maps them to messages:
codex_no_key, codex_no_chatgpt, codex_refresh_failed,
opencode_refresh_failed, and login_read_failed for the rest.

Tests: proxy TestSecretValueLooksUpInProcess, TestReadBindings,
TestBindingsUnreadableHaveNone, ttlOf by kind, Main refusing secrets
without a lookup and -secret-cmd, config refusing secret_cmd; secrets
TestGet by kind, TestLoginFailed; agentlogin TestCodexBindings (kind and
agent checked on every binding), TestGetErrorsSayWhatToDo; secret.txtar
and network.txtar on the new file and without secret get; e2e's network
section keeps the fake token off argv and checks no command prints it.

Docs: the proxy README (Secrets section), internals/network.md,
safety/network.md, using/coding-agents.md, contributing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 19:35:25 -07:00

462 lines
32 KiB
Go

package msg
// docs links messages to the docs page that says more: message ID to
// "page#anchor", a page in docs/content/docs (a folder's _index.md for a
// section) and a heading on it. devvm
// prints the page's address on the line after the message's text.
// TestDocLinks checks every entry.
var docs = map[string]string{ //nolint:gosec // message IDs and pages, not credentials
"backend_lacks": "backends#when-a-backend-lacks-something",
"backend_unreviewed": "backends#when-a-backend-lacks-something",
"backend_unreviewed_used": "contributing/testing#unreviewed-emulations",
"backend_unknown_vm": "backends#a-vms-backend",
"agent_fixed": "backends#when-a-backend-lacks-something",
"ports_forward_failed": "using/ports-size#ports",
"net_off_backend": "backends#when-a-backend-lacks-something",
"net_about": "safety/network#turning-it-on-or-off",
"disk_low": "using/troubleshooting#not-enough-free-space",
"disk_low_warning": "using/ports-size#free-space",
"disk_free_unknown": "using/troubleshooting#not-enough-free-space",
"lima_missing": "backends/lima#requirements",
"lima_broken": "backends/lima#requirements",
"lima_old": "backends/lima#requirements",
"lima_host_unsupported": "backends/lima#requirements",
"qemu_missing": "backends/lima#requirements",
"lima_missing_fix": "backends/lima#requirements",
"lima_broken_fix": "backends/lima#requirements",
"lima_old_fix": "backends/lima#requirements",
"qemu_missing_fix": "backends/lima#requirements",
"lima_arch_unsupported": "backends/lima#requirements",
"macos_old": "backends/lima#requirements",
"no_kvm": "backends/lima#requirements",
"kvm_access": "backends/lima#requirements",
"lima_global_config": "backends/lima#devvms-lima-home",
"vm_has_networks": "backends/lima#devvms-lima-home",
"lima_home_too_long": "backends/lima#limits",
"mount_comma": "backends/lima#limits",
"disk_shrink": "backends/lima#limits",
"image_in_use": "using/images#deleting-images",
"image_building": "using/images#deleting-images",
"qemu_refused": "internals/lima#confinement",
"start_no_ssh": "using/troubleshooting#a-vm-wont-boot",
"no_ubuntu_image": "using/troubleshooting#base-cant-build-on-lima",
"ubuntu_bad_signature": "using/troubleshooting#a-download-doesnt-check-out",
"ubuntu_checksum_unpinned": "using/troubleshooting#a-download-doesnt-check-out",
"ubuntu_unsigned": "using/troubleshooting#a-download-doesnt-check-out",
"unknown_layer": "using/images#layers",
"default_layer_gone": "using/settings#layers-for-new-vms",
"default_layer_lacks": "using/settings#layers-for-new-vms",
"layer_name_invalid": "using/customizing#your-own-layers",
"layer_name_reserved": "using/customizing#your-own-layers",
"layer_created": "using/customizing#your-own-layers",
"base_features": "using/customizing#choosing-features",
"base_features_none": "using/customizing#choosing-features",
"unknown_feature": "using/customizing#choosing-features",
"feature_shadowed": "using/customizing#your-own-features",
"script_failed": "using/troubleshooting#a-build-fails",
"rebuild_replaces": "using/images#rebuilding",
"layer_exists": "using/customizing#your-own-layers",
"images_stale_note": "using/images#cleaning-up",
"images_unused": "using/images#cleaning-up",
"folders_not_private": "using/space#devvms-data-folder",
"layout_newer": "using/troubleshooting#a-newer-devvm-changed-devvms-folders",
"layout_unchecked": "using/troubleshooting#a-file-devvm-cant-read",
"vms_stray": "using/space#what-devvm-doctor-finds-in-vms",
"vm_folder_stateless": "using/space#what-devvm-doctor-finds-in-vms",
"vms_unreadable": "using/space#what-devvm-doctor-finds-in-vms",
"retention_busy": "using/settings#retention",
"retention_unreadable": "using/settings#retention",
"retention_failed": "using/settings#retention",
"retention_bad": "using/settings#retention",
"set_in_config": "using/settings#configtoml",
"gc_backend_skipped": "using/images#cleaning-up",
"gc_orphans_unknown": "using/space#leftovers-of-a-vm-deleted-outside-devvm",
"gc_orphan_elsewhere": "using/space#leftovers-of-a-vm-deleted-outside-devvm",
"gc_orphan_recent": "using/space#leftovers-of-a-vm-deleted-outside-devvm",
"gc_older_than_needs_history": "using/images#cleaning-up",
"bad_duration": "getting-started/commands#flags-and-values",
"gc_names_need_tools": "using/images#cleaning-up",
"gc_tools_recent": "using/images#cleaning-up",
"gc_tools_making": "using/images#cleaning-up",
"gc_recent_needs_tools": "using/images#cleaning-up",
"gc_recent_making": "using/images#cleaning-up",
"unknown_tool": "using/toolchains#adding-and-removing-tools",
"images_total": "using/space#devvm-space",
"space_backend_unknown": "using/space#devvm-space",
"space_stray": "using/space#vms-devvm-has-no-state-for",
"space_caches_note": "using/space#limas-caches",
"tool_not_locked": "using/images#shared-tools",
"vm_outdated": "using/images#outdated-vms",
"bad_path": "backends/lima#limits",
"vm_name_no_room": "backends/lima#limits",
"vm_other_folder": "getting-started/commands#a-folder-made-again",
"vm_other_folder_rm": "getting-started/commands#a-folder-made-again",
"vm_other_folder_adopt": "getting-started/commands#a-folder-made-again",
"rm_unknown_vm": "getting-started/commands#a-vm-whose-folder-is-gone",
"rm_vm_folder_there": "getting-started/commands#a-vm-whose-folder-is-gone",
"rm_vm_lost": "using/space#leftovers-of-a-vm-deleted-outside-devvm",
"rm_gone_stopped": "getting-started/commands#a-vm-whose-folder-is-gone",
"rm_gone_clone": "getting-started/commands#a-vm-whose-folder-is-gone",
"rm_vm_export_failed": "using/coding-agents#history",
"space_folder_gone": "getting-started/commands#a-vm-whose-folder-is-gone",
"vm_unfinished": "using/troubleshooting#a-vm-whose-creation-didnt-finish",
"use_parent_vm": "getting-started/commands#a-subfolder",
"using_parent_vm": "getting-started/commands#a-subfolder",
"rm_parent_vm": "getting-started/commands#a-subfolder",
"widen_parent_vm_refused": "getting-started/commands#a-subfolder",
"use_parent_vm_repo": "getting-started/commands#a-subfolder",
"tools_joined": "using/toolchains#adding-and-removing-tools",
"size_next_start": "using/ports-size#size",
"rm_export_failed": "using/coding-agents#history",
"history_not_exported": "using/coding-agents#history",
"git_replaced": "safety/git-protection#not-covered",
"git_appeared": "safety/git-protection#when-devvm-reports-git",
"git_embedded_new": "safety/git-protection#strict",
"git_hooks_unlocked": "safety/git-protection#when-devvm-reports-git",
"unsafe_folder": "using/settings#project-folders-devvm-refuses",
"unsafe_folder_inside": "using/settings#project-folders-devvm-refuses",
"unsafe_folder_used": "using/settings#project-folders-devvm-refuses",
"cpus_not_number": "using/ports-size#size-and-ports",
"size_not_gib": "using/ports-size#size-and-ports",
"too_many_cpus": "using/ports-size#size-and-ports",
"too_much_memory": "using/ports-size#size-and-ports",
"port_invalid": "using/ports-size#size-and-ports",
"devvm_other_first": "getting-started/install#one-devvm",
"host_memory_low": "getting-started/install#requirements",
"host_cpus_few": "getting-started/install#requirements",
"base_fitted": "using/ports-size#size-and-ports",
"ports_list_needed": "using/ports-size#ports",
"ports_rm_all": "using/ports-size#ports",
"ports_taken": "using/troubleshooting#a-listed-port-isnt-forwarded",
"ca_not_certificate": "using/settings#a-companys-ca",
"ca_not_ca": "using/settings#a-companys-ca",
"ca_invalid": "using/settings#a-companys-ca",
"ca_link": "using/settings#a-companys-ca",
"ca_folder_link": "using/settings#a-companys-ca",
"ca_unreadable": "using/settings#a-companys-ca",
"ca_folder_unreadable": "using/settings#a-companys-ca",
"doctor_proxy_ca": "using/troubleshooting#tls-errors-behind-a-company-proxy",
"net_direct_route": "safety/network#when-it-isnt-enforced",
"net_unenforced_stop": "using/troubleshooting#a-vm-shows-as-unenforced",
"net_unenforced": "using/troubleshooting#a-vm-shows-as-unenforced",
"net_off_log": "safety/network#turning-it-on-or-off",
"net_off_policy": "safety/network#turning-it-on-or-off",
"net_ask_global": "safety/network#turning-it-on-or-off",
"json_shows_only": "getting-started/commands#output-for-scripts",
"net_flag_ignored": "safety/network#turning-it-on-or-off",
"net_on_old_tokens": "safety/network#turning-it-on-or-off",
"net_off_next_start": "safety/network#turning-it-on-or-off",
"not_a_rule": "safety/network#rules",
"proxy_start_failed": "using/troubleshooting#the-proxy-doesnt-start",
"proxy_port_taken": "using/troubleshooting#the-proxy-doesnt-start",
"proxy_stop_failed": "using/troubleshooting#the-proxy-doesnt-start",
"upstream_proxy_scheme": "safety/network#behind-a-company-proxy",
"upstream_proxy_invalid": "safety/network#behind-a-company-proxy",
"net_proxy_down_stopped": "using/troubleshooting#the-proxy-doesnt-start",
"no_secret": "safety/network#saving-and-binding-secrets",
"codex_login_kept": "using/coding-agents#codex-and-opencode-logins",
"opencode_login_kept": "using/coding-agents#codex-and-opencode-logins",
"codex_no_key": "using/coding-agents#codex-and-opencode-logins",
"codex_no_chatgpt": "using/coding-agents#codex-and-opencode-logins",
"codex_refresh_failed": "using/coding-agents#codex-and-opencode-logins",
"opencode_refresh_failed": "using/coding-agents#codex-and-opencode-logins",
"login_read_failed": "using/coding-agents#codex-and-opencode-logins",
"setid_files": "using/troubleshooting#devvm-names-set-id-files",
"setid_root_files": "using/troubleshooting#devvm-names-set-id-files",
"home_not_absolute": "using/troubleshooting#home-isnt-an-absolute-path",
"net_unenforced_restart": "using/troubleshooting#a-vm-shows-as-unenforced",
"adopt_failed": "getting-started/commands#a-folder-made-again",
"clone_needs_git": "using/clone#requirements",
"uncommitted_not_copied": "using/clone#whats-copied",
"unfetched_commits": "using/clone#deleting-the-vm",
"branch_names_invalid": "using/clone#deleting-the-vm",
"git_protect_clone": "safety/git-protection#turning-it-on-or-off",
"git_protect_failed": "safety/git-protection#turning-it-on-or-off",
"devcontainer_using": "using/devcontainer",
"devcontainer_flag_wins": "using/devcontainer#when-its-read",
"devcontainer_ignored": "using/devcontainer#properties",
"devcontainer_unknown": "using/devcontainer#properties",
"devcontainer_initialize": "using/devcontainer#properties",
"devcontainer_feature_options": "using/devcontainer#properties",
"devcontainer_ports_ignored": "using/devcontainer#properties",
"git_protect_needs_macos_new": "safety/git-protection#linux-hosts",
"git_protect_on_needs_macos": "safety/git-protection#linux-hosts",
"git_protect_next_stop": "safety/git-protection#turning-it-on-or-off",
"git_unlocked": "safety/git-protection#turning-it-on-or-off",
"git_protect_flag_ignored": "safety/git-protection#turning-it-on-or-off",
"git_locked_strict": "safety/git-protection#strict",
"git_config_failed": "safety/git-protection#strict",
"git_commondir": "safety/git-protection#not-covered",
"git_worktree_stray": "safety/git-protection#not-covered",
"git_not_locked": "safety/git-protection#when-devvm-reports-git",
"git_lock_raced": "safety/git-protection#when-devvm-reports-git",
"git_hooks_path": "safety/git-protection#not-covered",
"git_include_inside": "safety/git-protection#not-covered",
"git_hook_link_inside": "safety/git-protection#not-covered",
"git_gitdir_outside": "safety/git-protection#not-covered",
"ssh_remote_hint": "using/ssh#agent-forwarding",
"agent_on_risk": "using/ssh#agent-forwarding",
"agent_devvm_risk": "using/ssh#devvms-own-agent",
"agent_no_keys": "using/ssh#devvms-own-agent",
"agent_key_changed": "using/ssh#devvms-own-agent",
"agent_key_unpinned": "using/ssh#devvms-own-agent",
"agent_key_no_fingerprint": "using/ssh#devvms-own-agent",
"agent_key_mounted": "using/ssh#devvms-own-agent",
"agent_confirm_needs_askpass": "using/ssh#devvms-own-agent",
"ssh_include_yourself": "using/ssh#ssh-access-by-name",
"no_code_command": "using/ssh#devvm-host-and-devvm-code",
"desktop_no_layer": "using/desktop#adding-the-desktop",
"desktop_start_failed": "using/desktop#when-the-desktop-doesnt-open",
"desktop_open_failed": "using/desktop#when-the-desktop-doesnt-open",
"clone_not_top": "using/clone#requirements",
"clone_no_commits": "using/clone#requirements",
"clone_detached": "using/clone#requirements",
"clone_needs_new_vm": "using/clone#requirements",
"remotes_taken": "using/clone#the-remote",
"fetch_until": "using/clone#the-remote",
"no_terminal_fetch": "using/clone#deleting-the-vm",
"saved_names_taken": "using/clone#deleting-the-vm",
"remote_kept": "using/clone#deleting-the-vm",
"no_terminal_delete": "using/clone#deleting-the-vm",
"clone_worktrees_unchecked": "using/clone#deleting-the-vm",
"tools_need_resolve": "using/images#shared-tools",
"mise_checksum": "using/troubleshooting#a-download-doesnt-check-out",
"tool_stepped_back": "using/troubleshooting#a-new-tool-release-isnt-there-yet",
"tool_no_download": "using/troubleshooting#a-new-tool-release-isnt-there-yet",
"tools_check_failed": "using/images#shared-tools",
"newer_tools": "using/toolchains#adding-and-removing-tools",
"tool_unbuilt": "using/troubleshooting#a-new-tool-release-isnt-there-yet",
"tool_bad_output": "internals/images#building-tools",
"custom_layer_remove": "using/toolchains#adding-and-removing-tools",
"agent_dir_comma": "using/coding-agents#mounts",
"agent_dirs_added": "using/coding-agents#mounts",
"agent_dirs_removed": "using/coding-agents#mounts",
"no_claude_token": "using/coding-agents#claude-code-login",
"claude_token_invalid": "using/coding-agents#claude-code-login",
"no_github_token": "safety/network#saving-and-binding-secrets",
"not_setup_token": "using/coding-agents#claude-code-login",
"secret_unuse_copied": "safety/network#saving-and-binding-secrets",
"keychain_save_failed": "safety/network#saving-and-binding-secrets",
"login_copy_failed": "using/coding-agents#copies",
"config_redacted": "using/coding-agents#copies",
"config_not_copied": "using/coding-agents#copies",
"claude_mcp_secrets_copied": "using/coding-agents#copies",
"bad_from": "using/from#tags-and-digests",
"from_unreachable": "using/from#tags-and-digests",
"from_cached_unreachable": "using/from#tags-and-digests",
"from_not_found": "using/from#images-only-docker-has",
"from_cached_not_found": "using/from#images-only-docker-has",
"docker_only": "using/from#images-only-docker-has",
"docker_image_changed": "using/from#images-only-docker-has",
"convert_failed": "using/from#supported-images",
"convert_bad_output": "using/from#supported-images",
"from_ignored": "using/from",
"devcontainer_invalid": "using/devcontainer#when-its-read",
"devcontainer_unreadable": "using/devcontainer#when-its-read",
"devcontainer_changed": "using/devcontainer#when-its-read",
"devcontainer_new": "using/devcontainer#when-its-read",
"devcontainer_bad_value": "using/devcontainer#properties",
"devcontainer_build": "using/devcontainer#properties",
"devcontainer_feature": "using/devcontainer#properties",
"devcontainer_docker_outside": "using/devcontainer#properties",
"devcontainer_env_name": "using/devcontainer#properties",
"devcontainer_image_not_public": "using/devcontainer#properties",
"devcontainer_local_env": "using/devcontainer#variables",
"devcontainer_variable": "using/devcontainer#variables",
"devcontainer_command_failed": "using/devcontainer#commands",
"no_devcontainer_flag_ignored": "using/devcontainer#when-its-read",
"no_ssh_agent": "using/ssh#agent-forwarding",
"ssh_agent_empty": "using/ssh#agent-forwarding",
"load_key_with": "using/ssh#agent-forwarding",
"no_vm_ssh_agent": "using/ssh#agent-forwarding",
"agent_key_not_found": "using/ssh#devvms-own-agent",
"agent_key_not_recorded": "using/ssh#devvms-own-agent",
"agent_unload_failed": "using/ssh#devvms-own-agent",
"agent_load_failed": "using/ssh#devvms-own-agent",
"agent_start_failed": "using/ssh#devvms-own-agent",
"mounts_next_start": "using/coding-agents#mounts",
"no_feature": "using/customizing#choosing-features",
"flag_blank": "getting-started/commands#flags-and-values",
"no_input": "getting-started/commands#questions-devvm-asks",
"no_input_terminal": "getting-started/commands#questions-devvm-asks",
"force_needed": "getting-started/commands#questions-devvm-asks",
"arg_blank": "getting-started/commands#flags-and-values",
"no_image_named": "using/images#listing-images",
"no_image_named_from": "using/images#listing-images",
"not_an_image": "using/images#deleting-images",
"no_vm": "getting-started/first-vm#making-the-vm",
"no_vm_size": "using/ports-size#size",
"no_vm_ports": "using/ports-size#ports",
"no_vm_git_protect": "safety/git-protection#turning-it-on-or-off",
"no_vm_policy": "safety/network#changing-rules",
"no_token": "safety/network#saving-and-binding-secrets",
"bad_secret_service": "using/settings#environment",
"start_failed": "using/troubleshooting#a-command-fails",
"stop_failed": "using/troubleshooting#a-command-fails",
"delete_failed": "using/troubleshooting#a-command-fails",
"vm_create_failed": "using/troubleshooting#a-command-fails",
"sync_failed": "using/troubleshooting#a-command-fails",
"link_setup_invalid": "using/troubleshooting#a-command-fails",
"tools_unmounted": "using/troubleshooting#a-shared-tool-doesnt-mount",
"devcontainer_ports_not_forwarded": "using/devcontainer#properties",
"size_pending": "using/ports-size#size",
"size_flags_ignored": "using/ports-size#size",
"ports_flag_ignored": "using/ports-size#ports",
"port_not_listed": "using/ports-size#ports",
"no_vm_link": "using/links",
"link_port_invalid": "using/links#ports",
"link_ports_invalid": "using/links#publishing-a-port",
"link_unknown_target": "using/links#adding-a-link",
"link_ambiguous_target": "using/links#adding-a-link",
"link_self": "using/links#adding-a-link",
"link_not_published": "using/links#publishing-a-port",
"link_policy_mismatch": "using/links#links-and-network-policy",
"link_name_invalid": "using/links#names",
"link_name_host": "using/links#names",
"link_name_taken": "using/links#names",
"link_target_named": "using/links#names",
"link_trust": "using/links#a-link-joins-the-two-vms-trust",
"link_not_found": "using/links#removing-a-link",
"link_port_taken": "using/links#when-a-target-stops-or-goes",
"link_target_stopped": "using/links#when-a-target-stops-or-goes",
"link_target_unusable": "using/links#when-a-target-stops-or-goes",
"link_target_unenforced": "using/links#links-and-network-policy",
"links_update_failed": "using/links#when-links-change",
"unpublished_linked": "using/links#publishing-a-port",
"network_off_linked": "using/links#links-and-network-policy",
"network_on_linked": "using/links#links-and-network-policy",
"port_not_published": "using/links#publishing-a-port",
"link_from_group": "using/links#leaving-a-group",
"no_vm_group": "using/links#groups",
"group_name_invalid": "using/links#joining-a-group",
"group_none": "using/links#joining-a-group",
"group_other": "using/links#leaving-a-group",
"group_named": "using/links#names-in-a-group",
"group_trust": "using/links#a-group-joins-the-trust-of-all-its-vms",
"group_policy_on": "using/links#groups-and-network-policy",
"group_policy_off": "using/links#groups-and-network-policy",
"group_policy_mixed": "using/links#groups-and-network-policy",
"group_name_taken": "using/links#names-in-a-group",
"group_name_host": "using/links#names-in-a-group",
"group_link_name_clash": "using/links#names-in-a-group",
"group_name_hostname": "using/links#names-in-a-group",
"agent_next_start": "using/ssh#agent-forwarding",
"ssh_agent_flag_ignored": "using/ssh#agent-forwarding",
"clone_seed_failed": "using/clone#whats-copied",
"remote_add_failed": "using/clone#the-remote",
"clone_check_failed": "using/clone#deleting-the-vm",
"clone_check_not_started": "using/clone#deleting-the-vm",
"clone_check_skipped": "using/clone#deleting-the-vm",
"fetch_failed": "using/clone#deleting-the-vm",
"mise_download_failed": "using/images#shared-tools",
"tools_resolve_failed": "using/images#shared-tools",
"tool_bad_version": "using/toolchains#adding-and-removing-tools",
"vm_lacks": "using/toolchains#adding-and-removing-tools",
"rule_missing": "safety/network#changing-rules",
"policy_not_rule": "safety/network#rules",
"policy_broken_deny": "safety/network#rules",
"usage_error": "using/troubleshooting#a-command-is-refused-before-it-runs",
"arg_missing": "using/troubleshooting#a-command-is-refused-before-it-runs",
"args_too_many": "using/troubleshooting#a-command-is-refused-before-it-runs",
"args_none": "using/troubleshooting#a-command-is-refused-before-it-runs",
"arg_not_choice": "using/troubleshooting#a-command-is-refused-before-it-runs",
"no_subcommand": "using/troubleshooting#a-command-is-refused-before-it-runs",
"flag_unknown": "using/troubleshooting#a-command-is-refused-before-it-runs",
"flag_needs_value": "using/troubleshooting#a-command-is-refused-before-it-runs",
"flag_bad_value": "using/troubleshooting#a-command-is-refused-before-it-runs",
"flag_bad_switch": "using/troubleshooting#a-command-is-refused-before-it-runs",
"flags_exclusive": "using/troubleshooting#a-command-is-refused-before-it-runs",
"no_command": "getting-started/commands#devvm-itself",
"no_command_like": "getting-started/commands#devvm-itself",
"no_command_part": "using/images#what-a-new-vm-gets",
"unknown_part": "using/images#what-a-new-vm-gets",
"unknown_part_like": "using/images#what-a-new-vm-gets",
"part_none_alone": "using/images#what-a-new-vm-gets",
"part_other_flag": "using/images#what-a-new-vm-gets",
"tool_not_layer": "using/images#layers",
"unknown_layer_like": "using/images#layers",
"remake_parent_vm": "getting-started/commands#a-subfolder",
"remake_clone": "using/images#adding-layers-to-a-vm",
"remake_export_failed": "using/coding-agents#history",
"remake_home_failed": "using/images#what-a-vm-made-again-keeps",
"remake_restore_failed": "using/images#a-remake-that-stops-halfway",
"remake_undo_failed": "using/images#a-remake-that-stops-halfway",
"remake_pending": "using/images#a-remake-that-stops-halfway",
"remake_home_lost": "using/images#a-remake-that-stops-halfway",
"rename_failed": "using/troubleshooting#a-command-fails",
"parts_flags_ignored": "using/toolchains#adding-and-removing-tools",
}
// IssuesURL is devvm's issue tracker, which the root's help ends with.
const IssuesURL = "https://github.com/w3cj/devvm/issues"
// commandDocs links each command users can run, by its path, to the user
// page that covers it, as docs does: "page#anchor". A command's help ends
// with the page's address, and its CLI reference page links to it.
// TestDocLinks checks every entry.
var commandDocs = map[string]string{
"devvm": "getting-started/commands",
"devvm restart": "getting-started/commands#restarting-and-stopping",
"devvm stop": "getting-started/commands#restarting-and-stopping",
"devvm rm": "getting-started/commands#deleting-a-vm",
"devvm adopt": "getting-started/commands#a-folder-made-again",
"devvm ls": "getting-started/commands#listing-vms",
"devvm code": "using/ssh#vs-code",
"devvm desktop": "using/desktop",
"devvm host": "using/ssh#devvm-host-and-devvm-code",
"devvm history": "using/coding-agents#history",
"devvm history export": "using/coding-agents#history",
"devvm tools": "using/toolchains#adding-and-removing-tools",
"devvm tools add": "using/toolchains#adding-and-removing-tools",
"devvm tools rm": "using/toolchains#adding-and-removing-tools",
"devvm tools update": "using/toolchains#adding-and-removing-tools",
"devvm size": "using/ports-size#size",
"devvm ports": "using/ports-size#ports",
"devvm ports add": "using/ports-size#ports",
"devvm ports rm": "using/ports-size#ports",
"devvm network": "safety/network#turning-it-on-or-off",
"devvm network allow": "safety/network#changing-rules",
"devvm network deny": "safety/network#changing-rules",
"devvm network rm": "safety/network#changing-rules",
"devvm network log": "safety/network#logs",
"devvm ssh-agent": "using/ssh#agent-forwarding",
"devvm ssh-agent add": "using/ssh#devvms-own-agent",
"devvm ssh-agent rm": "using/ssh#devvms-own-agent",
"devvm git-protect": "safety/git-protection#turning-it-on-or-off",
"devvm secret": "safety/network#saving-and-binding-secrets",
"devvm secret set": "safety/network#saving-and-binding-secrets",
"devvm secret rm": "safety/network#saving-and-binding-secrets",
"devvm secret use": "safety/network#saving-and-binding-secrets",
"devvm secret unuse": "safety/network#saving-and-binding-secrets",
"devvm link": "using/links#listing-links",
"devvm link add": "using/links#adding-a-link",
"devvm link rm": "using/links#removing-a-link",
"devvm link publish": "using/links#publishing-a-port",
"devvm link unpublish": "using/links#publishing-a-port",
"devvm group": "using/links#groups",
"devvm group join": "using/links#joining-a-group",
"devvm group leave": "using/links#leaving-a-group",
"devvm images": "using/images#listing-images",
"devvm images rm": "using/images#deleting-images",
"devvm build": "using/images#layers",
"devvm rebuild": "using/images#rebuilding",
"devvm layer": "using/customizing#your-own-layers",
"devvm layer new": "using/customizing#your-own-layers",
"devvm layer add": "using/images#adding-layers-to-a-vm",
"devvm space": "using/space#devvm-space",
"devvm gc": "using/images#cleaning-up",
"devvm retention": "using/settings#retention",
"devvm setup": "using/settings#devvm-setup",
"devvm doctor": "getting-started/install#checking-what-devvm-needs",
"devvm completion": "getting-started/commands#shell-completion",
"devvm limactl": "backends/lima#running-limactl",
}
// CommandDoc returns the "page#anchor" of the docs page for the command
// at path (devvm network allow), or "" when it has none.
func CommandDoc(path string) string { return commandDocs[path] }
// CommandDocURL returns the address of the docs page for the command at
// path, or "" when it has none.
func CommandDocURL(path string) string { return docURL(commandDocs[path]) }