App-FirefoxMultiAccountContainersUtils

 view release on metacpan or  search on metacpan

script/open-firefox-container  view on Meta::CPAN

    read_config => 0,
    read_env => 0,
);

$cmdline->run;

# ABSTRACT: CLI to open URL in a new Firefox tab, in a specific multi-account container
# PODNAME: open-firefox-container

__END__

=pod

=encoding UTF-8

=head1 NAME

open-firefox-container - CLI to open URL in a new Firefox tab, in a specific multi-account container

=head1 VERSION

This document describes version 0.019 of open-firefox-container (from Perl distribution App-FirefoxMultiAccountContainersUtils), released on 2026-03-25.

=head1 SYNOPSIS

B<open-firefox-container> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)

B<open-firefox-container> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)

B<open-firefox-container> [B<L<--debug|/"--debug">>|B<L<--log-level|/"--log-level=s">>=I<level>|B<L<--quiet|/"--quiet">>|B<L<--trace|/"--trace">>|B<L<--verbose|/"--verbose">>] [(B<L<--extra-firefox-options-after|/"--extra-firefox-options-after=s@">>=...



See examples in the L</EXAMPLES> section.

=head1 DESCRIPTION

This utility opens a new firefox tab in a specific multi-account container. This
requires the Firefox Multi-Account Containers add-on, as well as another add-on
called "Open external links in a container",
L<https://addons.mozilla.org/en-US/firefox/addon/open-url-in-container/>.

The way it works, because add-ons currently do not have hooks to the CLI, is via
a custom protocol handler. For example, if you want to open
L<http://www.example.com/> in a container called C<mycontainer>, you ask Firefox
to open this URL:

 ext+container:name=mycontainer&url=http://www.example.com/

Ref: L<https://github.com/mozilla/multi-account-containers/issues/365>

B<Related topics>

In Google Chrome browser, profiles is what you would use to separate
sessions/cookies (and other things). Opening a URL in a specific profile from
the command-line is easier with Chrome:

 % google-chrome --profile-directory="PROFILEDIRNAME" URL

where C<PROFILEDIRNAME> is a directory name under the profiles directory,
typically C<~/.config/google-chrome/> on Unix. You can use the
L<list-chrome-profiles> (with option C<-l>) (from L<App::ChromeUtils>) to
list Chrome profiles.

=head1 OPTIONS

C<*> marks required options.

=head2 Main options

=over

=item B<--container>=I<s>*

(No description)


Can also be specified as the 1st command-line argument.

=item B<--extra-firefox-options-after-json>=I<s>, B<-a>

Additional options (arguments) to put after the URLs (JSON-encoded).

See C<--extra-firefox-options-after>.

=item B<--extra-firefox-options-after>=I<s@>

Additional options (arguments) to put after the URLs.

Can be specified multiple times.

=item B<--extra-firefox-options-before-json>=I<s>, B<-b>

Additional options (arguments) to put before the URLs (JSON-encoded).

See C<--extra-firefox-options-before>.

=item B<--extra-firefox-options-before>=I<s@>

Additional options (arguments) to put before the URLs.

Can be specified multiple times.

=item B<--new-window>

(No description)


=item B<--profile>=I<s>

(No description)


=item B<--url>=I<s@>

(No description)


Can also be specified as the 2nd command-line argument and onwards.

Can be specified multiple times.



( run in 1.158 second using v1.01-cache-2.11-cpan-64ef6c95b5d )