Update CLI header docs link with conditional routing
Currently the CLI header shows: 📚 Docs: https://lingo.dev/go/docs
Needs to be updated to:
- Default: https://lingo.dev/cli
- CI/CD mode: https://lingo.dev/ci
Implement conditional logic to detect CI/CD mode and route accordingly.
Is this issue fixed?
@maxprilutskiy can i work on this issue
Hey @adityasharmawork do you want to work on this?
Yes sir! I have already started to work on this issue, please assign it to me! Will send a PR as soon as possible! Thank you sir!
On Tue, 4 Nov 2025, 03:47 Sumit Saurabh, @.***> wrote:
sumitsaurabh927 left a comment (lingodotdev/lingo.dev#1078) https://github.com/lingodotdev/lingo.dev/issues/1078#issuecomment-3482825521
Hey @adityasharmawork https://github.com/adityasharmawork do you want to work on this?
— Reply to this email directly, view it on GitHub https://github.com/lingodotdev/lingo.dev/issues/1078#issuecomment-3482825521, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEPL36IMMRPNNNK7J3DUOET327A7LAVCNFSM6AAAAACCU4DUR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIOBSHAZDKNJSGE . You are receiving this because you were mentioned.Message ID: @.***>
Hello @sumitsaurabh927 sir,
I have submitted Pull Request #1539 to address this issue.
Summary of Changes :
-
To solve this, I updated the
renderHerofunction inpackages/cli/src/cli/utils/ui.ts, which is responsible for printing the CLI header. -
Imported
isRunningInCIOrDocker: I imported the existingisRunningInCIOrDockerutility from the@lingo-dot-dev/compiler package. -
Added Conditional Logic: Inside the
renderHerofunction, I now call this utility to check if the CLI is running in a CI/CD environment. -
Updated the Link: A
docsUrlvariable is set to https://lingo.dev/ci if it's a CI environment, or to the new default https://lingo.dev/cli otherwise. This variable is then used to render the "📚 Docs:" link.
This change ensures the correct documentation link is displayed based on the user's environment.
I look forward to your review and feedback. Thank you!
Hello maintainers,
I have updated and submitted Pull Request #1616 to address this issue.
Summary of Changes
This PR updates the documentation link in the CLI header to be environment-aware, ensuring users are directed to the most relevant documentation based on their runtime context.
Key Changes:
- Conditional Routing Logic: I introduced a local helper function,
isCI(), withinpackages/cli/src/cli/utils/ui.ts. This function detects if the CLI is running in a CI/CD environment by checking for theCIenvironment variable or the presence of a/.dockerenvfile.- Note: This local implementation was chosen to avoid introducing unnecessary coupling with internal modules from other packages, adhering to clean architecture principles.
- Dynamic Header Link: The
renderHerofunction now utilizes this logic to dynamically set the documentation URL:- Default Environment: Displays
https://lingo.dev/cli - CI/CD Environment: Displays
https://lingo.dev/ci
- Default Environment: Displays
This enhancement provides a better user experience by guiding users to the correct resources automatically.
I look forward to your review!