Skip to content

Conversation

@sij411
Copy link
Contributor

@sij411 sij411 commented Jan 21, 2026

Summary

  • Adds --tunnel-service option to fedify lookup, fedify inbox, and fedify relay commands to select the tunneling service (localhost.run, serveo.net, or pinggy.io)
  • Adds --tunnel-service as an alias to the existing -s/--service option in the fedify tunnel command for consistency
  • Uses Optique's or() combinator to make --tunnel-service only available when tunneling is enabled (mutually exclusive with --no-tunnel)

Closes #525

Test plan

  • Run fedify lookup --help and verify --tunnel-service option appears
  • Run fedify inbox --help and verify --tunnel-service option appears
  • Run fedify relay --help and verify --tunnel-service option appears
  • Run fedify tunnel --help and verify --tunnel-service alias works
  • Test fedify lookup -a --tunnel-service serveo.net acct:hongminhee@hollo.social to verify the option works
  • Verify that --tunnel-service cannot be used together with --no-tunnel

🤖 Generated with Claude Code

This provides a consistent way to select the tunneling service
(localhost.run, serveo.net, or pinggy.io) across all CLI commands
that use tunneling. Also adds --tunnel-service as an alias to
the existing -s/--service option in the tunnel command.

The option is only available when tunneling is enabled, using
Optique's or() combinator for mutually exclusive option groups.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @sij411, 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 fedify CLI by providing users with greater control over the tunneling services used for ephemeral servers. It introduces a dedicated option to select from popular tunneling providers for lookup, inbox, and relay commands, while also improving command-line consistency by aliasing this option in the tunnel command. This change allows for more flexible and explicit management of public exposure for local development and testing environments.

Highlights

  • New --tunnel-service option: Introduced a new --tunnel-service option to the fedify lookup, fedify inbox, and fedify relay commands, allowing users to specify the tunneling service (localhost.run, serveo.net, or pinggy.io) when tunneling is enabled.
  • Mutual exclusivity with --no-tunnel: Implemented logic using Optique's or() combinator to ensure that the --tunnel-service option is only available and can only be used when tunneling is enabled (i.e., it is mutually exclusive with the --no-tunnel flag).
  • Alias for fedify tunnel command: Added --tunnel-service as an alias to the existing -s/--service option in the fedify tunnel command for improved consistency across the CLI.
  • Temporary server tunneling service selection: Updated the spawnTemporaryServer utility to accept a service option, enabling the selection of a specific tunneling provider when creating ephemeral servers.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

@issues-auto-labeler issues-auto-labeler bot added component/cli CLI tools related component/federation Federation object related component/inbox Inbox related component/relay Relay related (@fedify/relay) labels Jan 21, 2026
@sij411
Copy link
Contributor Author

sij411 commented Jan 21, 2026

/gemini review

Copy link
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

The pull request successfully introduces the --tunnel-service option across the lookup, inbox, and relay commands, and adds it as an alias to the tunnel command. The implementation correctly uses Optique's or() combinator to ensure --tunnel-service is only available when tunneling is enabled, providing a clean and mutually exclusive option handling. The changes are consistent across affected files and integrate well with the existing spawnTemporaryServer utility.

Copy link
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 --tunnel-service option to the lookup, inbox, and relay commands, allowing users to select a specific tunneling service. It also adds --tunnel-service as an alias for the tunnel command for consistency. The implementation correctly uses optique's or combinator to ensure that --tunnel-service is mutually exclusive with --no-tunnel, which is a nice improvement.

The changes are well-implemented and consistent across the different commands. I have one suggestion to improve maintainability by refactoring the duplicated tunnelService option definition into a shared constant. This would also be a good opportunity to ensure consistency in the CLI help messages.

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 9 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/cli/src/tempserver.ts 0.00% 4 Missing ⚠️
packages/cli/src/lookup.ts 75.00% 3 Missing ⚠️
packages/cli/src/options.ts 94.73% 2 Missing ⚠️
Files with missing lines Coverage Δ
packages/cli/src/tunnel.ts 93.18% <100.00%> (+0.58%) ⬆️
packages/cli/src/options.ts 94.73% <94.73%> (ø)
packages/cli/src/lookup.ts 39.25% <75.00%> (+0.34%) ⬆️
packages/cli/src/tempserver.ts 5.40% <0.00%> (-0.23%) ⬇️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Extract duplicated tunnel service option definitions into a new
options.ts module:

- TUNNEL_SERVICES constant for the list of available services
- tunnelServiceOption for commands where tunneling is implicit
- tunnelOption for commands with optional tunneling (--no-tunnel)

Use valueSet() for consistent description formatting across all
commands.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@sij411
Copy link
Contributor Author

sij411 commented Jan 21, 2026

/gemini review

Copy link
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 successfully introduces the --tunnel-service option across lookup, inbox, and relay commands, and establishes it as an alias for the existing -s/--service in the tunnel command. The refactoring of tunneling options into a dedicated options.ts file, leveraging Optique's or() combinator, significantly enhances code reusability and consistency. The changes are well-implemented and align with the stated objectives, improving the flexibility and user experience of the CLI tools.

sij411 and others added 2 commits January 21, 2026 22:48
Extract duplicated tunnel service option definitions into a new
options.ts module:

- TUNNEL_SERVICES constant for the list of available services
- tunnelServiceOption for commands where tunneling is implicit
- tunnelOption for commands with optional tunneling (--no-tunnel)

Use valueSet() for consistent description formatting across all
commands.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Member

@dahlia dahlia left a comment

Choose a reason for hiding this comment

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

We need to document these new options in docs/cli.md.

@sij411
Copy link
Contributor Author

sij411 commented Jan 21, 2026

We need to document these new options in docs/cli.md.

Oh yes, got it.

sij411 and others added 2 commits January 22, 2026 03:59
Add documentation for the new --tunnel-service option:

- fedify lookup: for use with -a/--authorized-fetch
- fedify inbox: for specifying tunneling service
- fedify tunnel: add --tunnel-service as alias to -s/--service

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Member

@dahlia dahlia left a comment

Choose a reason for hiding this comment

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

Thanks as always. Great work!

@dahlia dahlia merged commit 84aa16b into fedify-dev:main Jan 21, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/cli CLI tools related component/federation Federation object related component/inbox Inbox related component/relay Relay related (@fedify/relay)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --tunnel-service option to fedify lookup and fedify inbox commands

2 participants