#!/usr/bin/env perl
# ABSTRACT: Run Statocles commands
package statocles;
$statocles::VERSION = '0.036';
# Mojolicious::Commands currently calls GetOptions and clobbers a few of
# our command-line options. Since I don't want to rely on the envvars
# that get set in that process, we'll do this little dance here.
#
# This happens because we build a Mojolicious app inside the Statocles::Command
# module, which loads Mojolicious, which loads Mojolicious::Commands, which
# calls GetOptions on @ARGV
my @argv;
BEGIN { @argv = @ARGV };

use Statocles::Command;
exit Statocles::Command->main( @argv );

__END__

=pod

=head1 NAME

statocles - Run Statocles commands

=head1 VERSION

version 0.036

=head1 SYNOPSIS

    statocles [-v] [--config <file>] [--site <site>] <command>
    statocles -h|--help

=head1 DESCRIPTION

The Statocles command-line interface. This command manages Statocles
sites: building, testing, and deploying.

This command also helps to manage content in Statocles apps.

=head1 ARGUMENTS

=head2 <command>

The command to run. Available commands:

    build                       - Build the site
    daemon                      - Run an HTTP daemon to test the site
    deploy                      - Deploy the site
    bundle theme <name> <dir>   - Bundle a theme in the given directory
    apps                        - List the applications in this site
    <app> help                  - Get help for a specific application

=head1 OPTIONS

=head2 config <file>

The configuration file to read for Sites. Defaults to C<site.yml>.

The configuration file is a L<Beam::Wire> container file.

=head2 site <name>

The site to use, which is the name of an object in the config file. Defaults to
C<site>.

=head2 -v | --verbose

Display diagnostic information:

=head2 -h | --help

Display this help file

=head1 AUTHOR

Doug Bell <preaction@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Doug Bell.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut
