create world object, repl script
[scpubgit/Tak.git] / bin / tak-repl
diff --git a/bin/tak-repl b/bin/tak-repl
new file mode 100644 (file)
index 0000000..7bc5d3e
--- /dev/null
@@ -0,0 +1,15 @@
+#!/usr/bin/env perl
+
+use Tak::WorldHandle;
+use Tak::REPL;
+use strictures 1;
+
+my $world = do {
+  if (my $ssh_target = $ARGV[0]) {
+    Tak::WorldHandle->new_remote($ssh_target);
+  } else {
+    Tak::WorldHandle->new_local;
+  }
+};
+
+Tak::REPL->new(world => $world)->run;