#!perl
use strict;
use warnings;
use App::bif::OptArgs;
use OptArgs qw/class_optargs/;

eval {
    my ( $class, $opts ) = class_optargs('App::bif');
    $class->new( opts => $opts )->run;
};

if ($@) {
    print STDERR $@;
    exit 1;
}

1;

__END__

=encoding utf-8

=head1 NAME

=for bif-doc #intro bif - the bif manual

bif - distributed bug tracking tool

=head1 VERSION

0.1.5_5 (2015-08-13)

=head1 SYNOPSIS

  bif COMMAND [...]

=head1 DESCRIPTION

Bif is a distributed bug tracker with a command-line interface. It
helps you manage tasks and issues using a local database, exchanging
updates with remote databases on demand.  The tool has several features
of interest to distributed project teams:

=over

=item Offline Operation

Many bif actions work offline; you can create and update tasks and
issues while disconnected from the network.

=item Inter-project Cooperation

Bif issues (and tasks) can be linked with (or copied to) multiple
projects, mirroring the inter-project relationships that exist in the
real world.

=back

This document is the B<bif> reference manual. Other reference documents
for bif commands have titles like I<bif-command-name>. If you are new
to B<bif> you will probably find one of the following a more helpful
starting point:

=over

=item L<bif-doc>

The table of contents for all bif documentation.

=item L<bif-doc-intro>

A hands-on introduction to bif.

=item L<bif-doc-faq>

A list of common questions and answers.

=back

=head2 Command Structure

Top-level bif commands are as follows:

    check             check all changeset UUIDs
    drop              remove an item from the database
    init              initialize a new repository
    list              list topics in the repository
    log               view comments and status history
    new               create a new topic
    pull              import topics from elsewhere
    push              export topics to somewhere else
    show              display a topic's current status
    signup            sign up with a hub provider
    sql               run an SQL command against the database
    sync              exchange changes with a hub
    update            comment on or modify a topic
    upgrade           upgrade a repository
    wlog              review entries in the work buffer
    work              work on a topic

Not all of the above commands result in an action on their own.
Sometimes a second-level bif command (usually bif-ACTION-TYPE) is
required, for example L<bif-push-issue>.

In addition, a couple of useful aliases are created by default:

    ls              list topics --status open --project-status run
    lsi             list identities
    lsp             list projects define plan run
    lss             list topics --status stalled --project-status run

=head2 Global Options

The following options are common to all commands:

=over

=item --debug, -D

Turn on debugging statements, which are included in the I<stdout>
stream.

=item --help, -h

Print a full usage message and exit. Some arguments and options are
only shown when this option is used; a normal usage/error message may
keep some rarely used options hidden.

=item --no-pager

Do not pipe a command's output to a pager.

=item --user-repo

Run commands against the user repository instead of the current
repository.

=back

=head2 Command Interaction

=over

=item Input

Some arguments and options not supplied on the command line are
prompted for.  An editor based on the C<$EDITOR> or C<$VISUAL>
environment variables may also be invoked for certain types of input.

=item Output

Normal output is printed to I<stdout> or sometimes paged with
L<less>(1) when I<stdout> is connected to a terminal.  Error messages
are sent to I<stderr>.

=item Connectivity

The only commands that (may) involve network communication are
L<bif-pull>, L<bif-push>, and L<bif-sync>. Everything else is a local
action.

=item Exit Status

An exit value of zero indicates success.

=back

=head1 FILES

=over

=item F<$HOME/.bifu/db.sqlite3>

User repository datatbase.

=item F<$HOME/.bifu/config>

User configuration file.

=item F<$PWD/.bif/config>

Curent repository configuration file.

=item F<$PWD/.bif/db.sqlite3>

Current repository database.

=back

=head1 SEE ALSO

L<bifsync>(1)

=head1 SUPPORT

Bif is community supported software, and the community expects (and
should offer) respectful communication with all of its members.

=over

=item Website:

L<http://bifax.org/bif/>

=item Code Repository:

git://bifax.org/bif.git/

=item Issue Tracker:

Doesn't exit yet.

=item Mailing List:

Subscribe via L<http://www.freelists.org/list/bif-devel> and then send
mail to <bif-devel@freelists.org>.

=back

If you have an issue with bif please first make the effort to read the
documentation and/or search for an answer to your issue in the
internet. If you are still stuck send us a message as if you were
answering the following questions:

=over

=item * What does C<bif show VERSION> print?

=item * What are goal you trying to achieve?

=item * What commands are you running?

=item * What (output) did you expect (to see)?

=item * What (output) actually occured?

=back

We will most likely need to ask for more information from you. You can
possibly speed things along by already running your commands with the
C<--debug> flag turned on.

=head1 AUTHOR

Mark Lawrence E<lt>nomad@null.netE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright 2013-2015 Mark Lawrence <nomad@null.net>

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.

