App-karr
view release on metacpan or search on metacpan
lib/App/karr.pm view on Meta::CPAN
This module gives the architectural overview. If you want day-to-day command
usage, command groups, and command-by-command navigation, start with L<karr>.
=head1 ARCHITECTURE
=over 4
=item * C<refs/karr/config>
Sparse board configuration overrides layered onto code defaults from
L<App::karr::Config>.
=item * C<refs/karr/meta/next-id>
Dedicated metadata ref for numeric id allocation.
=item * C<refs/karr/tasks/*/data>
Task payloads stored in the same Markdown plus YAML frontmatter shape used by
L<App::karr::Task>.
=item * C<refs/karr/log/*>
Append-style activity log entries written as per-agent JSON lines.
=back
L<App::karr::Git> provides the low-level Git ref operations, while
L<App::karr::BoardStore> handles the higher-level board model: merged config,
task loading, materialization, serialization, snapshots, and restore.
=head1 CLI ENTRY POINT
The installed executable is L<karr>. Running C<karr> without a subcommand shows
the board summary by default, and the command-specific modules under
C<App::karr::Cmd::*> implement the individual operations.
Use L<karr> when you want to learn:
=over 4
=item * which command to run for a task
=item * how backup, restore, destroy, and helper refs fit together
=item * which module implements each subcommand
=item * how to use the Docker-wrapped CLI day to day
=back
=head1 DOCKER RUNTIME
Perl installation remains the normal development path, but Docker is a
first-class runtime option for vendoring C<karr> into other repositories or
tooling environments.
The default C<raudssus/karr:latest> image starts as root only long enough to
inspect the mounted F</work> directory and then drops to the matching numeric
uid and gid before running C<karr>. This prevents root-owned project files when
the image is used through a shell alias. The companion C<raudssus/karr:user>
image is the fixed-user variant for environments that prefer a predictable
non-root runtime without that auto-adjustment.
See L<karr> and F<README.md> for the shell alias form and operator-focused
examples.
=head1 PROGRAMMATIC USAGE
Although the distribution is centered on the CLI, the lower-level modules are
usable from Perl when you want to inspect or manipulate board refs directly.
Reading the current board state:
use App::karr::Git;
use App::karr::BoardStore;
my $git = App::karr::Git->new(dir => '.');
my $store = App::karr::BoardStore->new(git => $git);
my $config = $store->load_config;
my @tasks = $store->load_tasks;
Creating a task and writing it back:
use App::karr::Task;
my $id = $store->allocate_next_id;
my $task = App::karr::Task->new(
id => $id,
title => 'Document the release process',
status => 'backlog',
priority => 'high',
);
$store->save_task($task);
$git->push;
Taking a full board snapshot for export logic:
my $snapshot = $store->snapshot;
These modules are more appropriate for Perl automation than instantiating
L<App::karr> itself, which mainly exists as the MooX::Cmd dispatcher for the
CLI.
=head1 BOARD DISCOVERY
Most commands automatically search upward from the current directory for a Git
repository that contains C<refs/karr/*>. The C<--dir> option overrides the
starting directory used for that repository discovery and is accepted in either
position: before the subcommand (C<karr --dir PATH list>) or on the subcommand
itself (C<karr list --dir PATH>). Both forms behave identically. The upward walk
still applies from the given path, so C<--dir> names any directory inside the
target repository, not necessarily its root. If no Git repository is found from
the given path, the command fails loudly rather than falling back to the current
directory.
=head1 DEFAULT BEHAVIOUR
( run in 1.140 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )