---
name: "lei-add-external"
section: "1"
platform: "linux"
package: "lei"
version: "2.1.0-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/lei-add-external"
---

# lei-add-external(1)

add inbox or external index

## NAME

lei-add-external - add inbox or external index

## SYNOPSIS

lei add-external \[OPTIONS\] LOCATION

## DESCRIPTION

Configure lei to search against an external (an inbox or external index).  When `"LOCATION"` is an existing local path, it should point to a directory that is a `"publicinbox.$NAME.inboxdir"` or `"extindex.$NAME.topdir"` value in ~/.public-inbox/config.

## OPTIONS

- \--boost=NUMBER

  Set priority of a new or existing location.

  Default: 0

- \--mirror=URL

  Create `"LOCATION"` by mirroring the public-inbox at `"URL"`. `"LOCATION"` will have a Makefile with a `"make update"` target to update the external.

- \--epoch=RANGE

  Restrict clones of [**public-inbox-v2-format**(5)](/public-inbox-v2-format/5.md) inboxes to the given range of epochs.  The range may be a single non-negative integer or a (possibly open-ended) `"LOW..HIGH"` range of non-negative integers.  `"~"` may be prefixed to either (or both) integer values to represent the offset from the maximum possible value.

  For example, `"--epoch=~0"` alone clones only the latest epoch, `"--epoch=~2.."` clones the three latest epochs.

  Default: `"0..~0"` or `0..` or `"..~0"` (all epochs, all three examples are equivalent)

- \-v

  - \--verbose

  Provide more feedback on stderr.

- \-q

  - \--quiet

  Suppress feedback messages.

### MIRRORING

- \--torsocks=auto\|no\|yes

  - \--no-torsocks

  Whether to wrap [**git**(1)](/git/1.md) and [**curl**(1)](/curl/1.md) commands with [**torsocks**(1)](/torsocks/1.md).

  Default: `"auto"`

- \--inbox-version=NUM

  Force a remote public-inbox version (must be `1` or `2`). This is auto-detected by default, and this option exists mainly for testing.

The following options are passed to [**public-inbox-init**(1)](/public-inbox-init/1.md):

- \-j JOBS, --jobs=JOBS

  - \-L LEVEL, --indexlevel=LEVEL

  The following options are passed to [**public-inbox-index**(1)](/public-inbox-index/1.md):

- \--batch-size=SIZE

  - \--compact

  - \-j JOBS, --jobs=JOBS

  - \--max-size=SIZE

  - \--sequential-shard

  - \--skip-docdata

  ## FILES

The configuration for lei resides at `"$XDG_CONFIG_HOME/lei/config"`.

## CONTACT

Feedback welcome via plain-text mail to \<mailto:meta@public-inbox.org\>

The mail archives are hosted at \<https://public-inbox.org/meta/\> and \<http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/\>

## COPYRIGHT

Copyright 2021 all contributors \<mailto:meta@public-inbox.org\>

License: AGPL-3.0+ \<https://www.gnu.org/licenses/agpl-3.0.txt\>

## SEE ALSO

[**lei-forget-external**(1)](/lei-forget-external/1.md), [**lei-ls-external**(1)](/lei-ls-external/1.md), [**lei-import**(1)](/lei-import/1.md), [**public-inbox-index**(1)](/public-inbox-index/1.md), [**public-inbox-extindex**(1)](/public-inbox-extindex/1.md), [**public-inbox-extindex-format**(5)](/public-inbox-extindex-format/5.md)
