Skip to content

feat(cli): add ios dl command for App Store download link#259

Merged
AnnatarHe merged 1 commit intomainfrom
claude/add-ios-download-links-a9kwq
Mar 20, 2026
Merged

feat(cli): add ios dl command for App Store download link#259
AnnatarHe merged 1 commit intomainfrom
claude/add-ios-download-links-a9kwq

Conversation

@AnnatarHe
Copy link
Copy Markdown
Contributor

@AnnatarHe AnnatarHe commented Mar 20, 2026

Summary

  • Add new ios dl subcommand that prints the App Store URL and opens it in the default browser
  • Follows existing command patterns (e.g. web command) using github.com/pkg/browser
  • Register IosCommand in main command list

Test plan

  • Verify shelltime ios dl prints the App Store URL
  • Verify it attempts to open the URL in the default browser
  • Verify graceful handling when browser cannot be opened

https://claude.ai/code/session_01MRTpMAqcMQtjKKwbByPFXS


Open with Devin

Add a new `ios dl` subcommand that prints the App Store URL and opens
it in the user's default browser.

https://claude.ai/code/session_01MRTpMAqcMQtjKKwbByPFXS
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the command-line interface by adding a new feature that allows users to directly open the App Store page for the ShellTime iOS application. This streamlines the process of finding and downloading the mobile app, improving user convenience and discoverability.

Highlights

  • New ios dl subcommand: Introduced a new ios dl subcommand to the CLI, enabling users to quickly access the ShellTime iOS app's App Store download page.
  • Browser integration: The command automatically prints the App Store URL and attempts to open it in the user's default web browser using the github.com/pkg/browser library, similar to existing commands.
  • Command registration: The new IosCommand has been registered in the main command list, making it accessible via the CLI.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
commands/ios.go 0.00% 14 Missing ⚠️
cmd/cli/main.go 0.00% 1 Missing ⚠️
Flag Coverage Δ
unittests 39.73% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cmd/cli/main.go 0.00% <0.00%> (ø)
commands/ios.go 0.00% <0.00%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new ios dl command, which is a useful addition. The implementation is clean and follows existing patterns. I've provided a couple of suggestions to enhance maintainability by reducing code duplication and to align with command-line tool best practices for output streams.

Comment thread commands/ios.go
Comment on lines +13 to +31
var IosCommand *cli.Command = &cli.Command{
Name: "ios",
Usage: "iOS app related commands",
Subcommands: []*cli.Command{
{
Name: "dl",
Usage: "open the ShellTime iOS app download page on the App Store",
Action: commandIosDl,
OnUsageError: func(cCtx *cli.Context, err error, isSubcommand bool) error {
color.Red.Println(err.Error())
return nil
},
},
},
OnUsageError: func(cCtx *cli.Context, err error, isSubcommand bool) error {
color.Red.Println(err.Error())
return nil
},
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The OnUsageError handler function is duplicated for the main command and its subcommand. To improve maintainability and adhere to the Don't Repeat Yourself (DRY) principle, you can extract this logic into a shared function.

func onUsageError(cCtx *cli.Context, err error, isSubcommand bool) error {
	color.Red.Println(err.Error())
	return nil
}

var IosCommand *cli.Command = &cli.Command{
	Name:  "ios",
	Usage: "iOS app related commands",
	Subcommands: []*cli.Command{
		{
			Name:         "dl",
			Usage:        "open the ShellTime iOS app download page on the App Store",
			Action:       commandIosDl,
			OnUsageError: onUsageError,
		},
	},
	OnUsageError: onUsageError,
}

Comment thread commands/ios.go

err := browser.OpenURL(appStoreURL)
if err != nil {
fmt.Printf("Could not open browser automatically. Please visit the URL above to download.\n")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better command-line-tool citizenship, error or informational messages should be printed to standard error instead of standard output. This prevents polluting stdout, which might be piped to other commands. You can use c.App.ErrWriter, which is the idiomatic way to write to stderr in urfave/cli.

		fmt.Fprintf(c.App.ErrWriter, "Could not open browser automatically. Please visit the URL above to download.\n")

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@AnnatarHe AnnatarHe merged commit c6dac1a into main Mar 20, 2026
6 of 7 checks passed
@AnnatarHe AnnatarHe deleted the claude/add-ios-download-links-a9kwq branch March 20, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants