Add desktop shortcut creation for Tingly Box#1005
Open
0x0079 wants to merge 5 commits into
Open
Conversation
Adds `tingly-box shortcut` which generates a double-click launcher on Windows (.lnk via WScript.Shell), macOS (.command) and Linux (.desktop) that runs `restart --daemon` and opens the web UI, so users no longer need to remember and type the startup command. https://claude.ai/code/session_012yPdw9AGArrZBosAPa3M4i
The shortcut can now target npx (npx -y tingly-box@latest restart --daemon) instead of the local binary, surviving npx-cache cleanup and auto-updating. --source defaults to auto, detecting whether the running binary lives in the npx cache. npx launches are wrapped in a login shell (or cmd /c on Windows) so GUI double-clicks pick up node on PATH. https://claude.ai/code/session_012yPdw9AGArrZBosAPa3M4i
Adds a --source flag to start/restart/open that records how tingly-box was launched (binary, npx, npx-bundle) in config, and teaches the npx wrappers to report their source. The shortcut command gains an npx-bundle target and, in auto mode, generates a launcher matching the recorded launch source so npx/bundle users get an npx-based shortcut. https://claude.ai/code/session_012yPdw9AGArrZBosAPa3M4i
Promotes --source from the start/restart/open subcommands to a global flag so the npx wrappers can prepend it to every invocation (not just the no-arg default), meaning any npx run records its launch source. The shortcut command's generation selector is renamed to --target to avoid a flag-name collision. Launch source is persisted centrally in main. https://claude.ai/code/session_012yPdw9AGArrZBosAPa3M4i
7abbcae to
ae8b955
Compare
…kage The shortcut generation logic (launch resolution, npx detection, platform shortcut creation) is now in its own package with no CLI dependency, so a future HTTP handler can reuse it. internal/command/shortcut.go keeps only the Kong CLI shell and PersistLaunchSource (a CLI-boundary concern).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
shortcutcommand that creates desktop and Start Menu shortcuts for launching Tingly Box, eliminating the need for users to remember and type startup commands. The implementation includes platform-specific shortcut creation for Windows (.lnk), macOS (.command), and Linux (.desktop), with automatic detection of the launch method (binary, npx, or npx-bundle).Key Changes
New
shortcutcommand (internal/command/shortcut.go):Launch source persistence:
LaunchSourcefield to global config (internal/server/config/config.go)GetLaunchSource()andSetLaunchSource()methods to config and AppConfigPersistLaunchSource()function records how the binary was invoked for future shortcut generationGlobal
--sourceflag (cli/tingly-box/main.go):NPX wrapper updates:
build/npx/tingly-box/bin.jsandbuild/npx/tingly-box-bundle/bin.jsnow prepend--sourceflag to all invocationsComprehensive test coverage (
internal/command/shortcut_test.go):Implementation Details
--no-desktopand--no-menuflags to allow selective shortcut creation--nameflaghttps://claude.ai/code/session_012yPdw9AGArrZBosAPa3M4i