NAME

App::karr::Cmd::Import - Import a tasks/ file view back into the ref-backed board

VERSION

version 0.500

SYNOPSIS

karr import --yes
karr import --yes --dir path/to/repo
karr import --yes --json

DESCRIPTION

Reads the file view at the repository root -- a config.yml plus a tasks/ directory of Markdown cards, as written by karr materialize or by kanban-md tooling -- back into the canonical refs/karr/* board. Original task timestamps are preserved verbatim, so importing an unchanged view is a no-op on the updated field.

This is the destructive inverse of karr materialize: task refs are replaced by the file view, and task refs with no matching file are deleted. It therefore requires an explicit --yes acknowledgement, and, because it mutates refs, it pulls before and pushes after like the other writing commands.

The config is the one thing it does not replace. A config.yml that has been through another tool is not the whole board config any more -- kanban-md rewrites the file as soon as it loads it and keeps only what its own schema knows -- so the view is read as a set of changes rather than as the truth. Keys it carries and karr models are adopted; keys it cannot express, foundation and lock_timeout among them, keep what refs/karr/config already said. Without that, karr disable was undone by a tool that never heard of it (ticket #87). See "reconcile_view_config" in App::karr::Config.

The task id counter moves forward across the bridge and never backwards: it ends up at whichever is higher, one past the highest imported card or the view's own next_id (ticket #90).

Two things it will not do. An empty tasks/ is refused rather than read as "delete every task" -- deleting the whole board is what karr delete is for. And the import is all-or-nothing: every card is parsed before any ref is written, so a malformed file aborts the run with each offending file named and the board left exactly as it was.

OPTIONS

  • --yes

    Required acknowledgement for the destructive replacement of refs from files.

  • --json

    Print the imported tasks as a JSON array instead of a human-readable summary.

SEE ALSO

karr, App::karr, App::karr::Cmd::Materialize, App::karr::Cmd::Restore, App::karr::BoardStore

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/karr/issues.

IRC

Join #langertha on irc.perl.org or message Getty directly.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <getty@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.

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