-my $usage = "public-inbox-index INBOX_DIR";
-use PublicInbox::Admin;
-PublicInbox::Admin::require_or_die('-index');
-use PublicInbox::Xapcmd;
+my $usage = 'public-inbox-index [options] INBOX_DIR';
+my $help = <<EOF; # the following should fit w/o scrolling in 80x24 term:
+usage: $usage
+
+ Create and update search indices
+
+options:
+
+ --no-fsync speed up indexing, risk corruption on power outage
+ -L LEVEL `basic', `medium', or `full' (default: full)
+ --all index all configured inboxes
+ --compact | -c run public-inbox-compact(1) after indexing
+ --sequential-shard index Xapian shards sequentially for slow storage
+ --jobs=NUM set or disable parallelization (NUM=0)
+ --batch-size=BYTES flush changes to OS after a given number of bytes
+ --max-size=BYTES do not index messages larger than the given size
+ --reindex index previously indexed data (if upgrading)
+ --rethread regenerate thread IDs (if upgrading, use sparingly)
+ --prune prune git storage on discontiguous history
+ --verbose | -v increase verbosity (may be repeated)
+ --help | -? show this help