KHARD-SUBCOMMANDS(1)

πŸ“¦
version 0.22.0 Β· 2 versions
, in nixpkgs unstable

πŸ¦‹ KHARD-SUBCOMMANDS πŸ’…

(that's khard-subcommands(1) from the khard manual, bestie β€” welcome to the group chat)

✨ NAME ✨

khard-subcommands β€” literally all the subcommands of khard

These are every single subcommand and every accepted argument of khard(1), no gatekeeping, all of it:

usage: khard [-h] [-c CONFIG] [--debug] [--skip-unparsable] [-v]
             SUBCOMMAND ...

πŸŽ€ POSITIONAL ARGUMENTS πŸŽ€

  • SUBCOMMAND β€” the actual thing you want to do. Possible choices, and yes this is the whole guest list: list, ls, show, details, template, birthdays, bdays, email, phone, postaddress, post, postaddr, new, add, add-email, merge, edit, modify, ed, copy, cp, move, mv, remove, delete, del, rm, addressbooks, abooks, filename, file

🌸 NAMED ARGUMENTS 🌸

  • -c, --config β€” the config file to use
  • --debug β€” turn on debug output (for when the vibes are off and you need to know why)
  • --skip-unparsable β€” skip the vcard files it can't parse, like, just don't look at them
  • -v, --version β€” show the program's version number and dip

πŸ’– SUB-COMMANDS πŸ’–

⭐ list (ls)

list all the (selected) contacts, aka the main character of this whole operation

khard list [-h] [-a ADDRESSBOOK] [-f]
           [-d {first_name,last_name,formatted_name}] [-g] [-r]
           [-s {first_name,last_name,formatted_name}] [-p] [-F FIELDS]
           [search terms ...]

Positional Arguments

  • search terms β€” search in the specified fields, or in all of them, to find a matching contact
    • Default: []

Named Arguments

  • -a, --addressbook β€” specify one or several comma separated address book names to narrow down the list of contacts
    • Default: []
  • -f, --search-in-source-files β€” look into the source vcf files to speed up search queries in large address books. ⚠️ Beware, bestie: this option could lead to incomplete results.
  • -d, --display β€” display names in the contact table by first or last name
    • Possible choices: first_name, last_name, formatted_name
  • -g, --group-by-addressbook β€” group the contact table by address book
  • -r, --reverse β€” reverse the order of the contact table
  • -s, --sort β€” sort the contact table by first or last name
    • Possible choices: first_name, last_name, formatted_name
  • -p, --parsable β€” machine readable format: uidtcontact_nametaddress_book_name
    • Default: False
  • -F, --fields β€” comma separated list of fields to show (use -F help for a list of top level fields)
    • Default: []

⭐ show (details)

display detailed information about one contact β€” the deep dive, the full lore

khard show [-h] [-a ADDRESSBOOK] [-f]
           [-d {first_name,last_name,formatted_name}] [-g] [-r]
           [-s {first_name,last_name,formatted_name}]
           [--format {pretty,yaml,vcard}] [-o OUTPUT_FILE]
           [search terms ...]

Positional Arguments

  • search terms β€” search in the specified fields, or in all of them, to find a matching contact
    • Default: []

Named Arguments

  • -a, --addressbook β€” specify one or several comma separated address book names to narrow down the list of contacts
    • Default: []
  • -f, --search-in-source-files β€” look into the source vcf files to speed up search queries in large address books. ⚠️ Beware that this option could lead to incomplete results.
  • -d, --display β€” display names in the contact table by first or last name
    • Possible choices: first_name, last_name, formatted_name
  • -g, --group-by-addressbook β€” group the contact table by address book
  • -r, --reverse β€” reverse the order of the contact table
  • -s, --sort β€” sort the contact table by first or last name
    • Possible choices: first_name, last_name, formatted_name
  • --format β€” select the output format
    • Possible choices: pretty, yaml, vcard
    • Default: 'pretty'
  • -o, --output-file β€” specify the output template file name, or use stdout by default
    • Default: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>

⭐ template

print an empty yaml template β€” a blank canvas, a fresh start, main character energy 🫢

khard template [-h]

⭐ birthdays (bdays)

list birthdays (sorted by month and day) so you never miss a "hbd" text again 😭

khard birthdays [-h] [-a ADDRESSBOOK] [-f]
                [-d {first_name,last_name,formatted_name}] [-p]
                [search terms ...]

Positional Arguments

  • search terms β€” search in the specified fields, or in all of them, to find a matching contact
    • Default: []

Named Arguments

  • -a, --addressbook β€” specify one or several comma separated address book names to narrow down the list of contacts
    • Default: []
  • -f, --search-in-source-files β€” look into the source vcf files to speed up search queries in large address books. ⚠️ Beware that this option could lead to incomplete results.
  • -d, --display β€” display names in the birthdays table by first or last name
    • Possible choices: first_name, last_name, formatted_name
  • -p, --parsable β€” machine readable format: nametdate
    • Default: False

⭐ email

list email addresses β€” the contact info speedrun

khard email [-h] [-a ADDRESSBOOK] [-f]
            [-d {first_name,last_name,formatted_name}] [-g] [-r]
            [-s {first_name,last_name,formatted_name}] [-p]
            [--remove-first-line]
            [search terms ...]

Positional Arguments

  • search terms β€” search in the specified fields, or in all of them, to find a matching contact
    • Default: []

Named Arguments

  • -a, --addressbook β€” specify one or several comma separated address book names to narrow down the list of contacts
    • Default: []
  • -f, --search-in-source-files β€” look into the source vcf files to speed up search queries in large address books. ⚠️ Beware that this option could lead to incomplete results.
  • -d, --display β€” display names in the contact table by first or last name
    • Possible choices: first_name, last_name, formatted_name
  • -g, --group-by-addressbook β€” group the contact table by address book
  • -r, --reverse β€” reverse the order of the contact table
  • -s, --sort β€” sort the contact table by first or last name
    • Possible choices: first_name, last_name, formatted_name
  • -p, --parsable β€” machine readable format: addresstnamettype
    • Default: False
  • --remove-first-line β€” remove the "searching for '' ..." line from the parsable output (that line is required by mutt, so like, mutt needs it, keep that in mind)
    • Default: False

⭐ phone

list phone numbers πŸ“ž

khard phone [-h] [-a ADDRESSBOOK] [-f]
            [-d {first_name,last_name,formatted_name}] [-g] [-r]
            [-s {first_name,last_name,formatted_name}] [-p]
            [search terms ...]

Positional Arguments

  • search terms β€” search in the specified fields, or in all of them, to find a matching contact
    • Default: []

Named Arguments

  • -a, --addressbook β€” specify one or several comma separated address book names to narrow down the list of contacts
    • Default: []
  • -f, --search-in-source-files β€” look into the source vcf files to speed up search queries in large address books. ⚠️ Beware that this option could lead to incomplete results.
  • -d, --display β€” display names in the contact table by first or last name
    • Possible choices: first_name, last_name, formatted_name
  • -g, --group-by-addressbook β€” group the contact table by address book
  • -r, --reverse β€” reverse the order of the contact table
  • -s, --sort β€” sort the contact table by first or last name
    • Possible choices: first_name, last_name, formatted_name
  • -p, --parsable β€” machine readable format: numbertnamettype
    • Default: False

⭐ postaddress (post, postaddr)

list postal addresses β€” the snail mail situation πŸ’Œ

khard postaddress [-h] [-a ADDRESSBOOK] [-f]
                  [-d {first_name,last_name,formatted_name}] [-g] [-r]
                  [-s {first_name,last_name,formatted_name}] [-p]
                  [search terms ...]

Positional Arguments

  • search terms β€” search in the specified fields, or in all of them, to find a matching contact
    • Default: []

Named Arguments

  • -a, --addressbook β€” specify one or several comma separated address book names to narrow down the list of contacts
    • Default: []
  • -f, --search-in-source-files β€” look into the source vcf files to speed up search queries in large address books. ⚠️ Beware that this option could lead to incomplete results.
  • -d, --display β€” display names in the contact table by first or last name
    • Possible choices: first_name, last_name, formatted_name
  • -g, --group-by-addressbook β€” group the contact table by address book
  • -r, --reverse β€” reverse the order of the contact table
  • -s, --sort β€” sort the contact table by first or last name
    • Possible choices: first_name, last_name, formatted_name
  • -p, --parsable β€” machine readable format: addresstnamettype
    • Default: False

⭐ new (add)

create a new contact, fresh out of the box, new contact smell ✨

khard new [-h] [-a ADDRESSBOOK] [-i INPUT_FILE] [--open-editor]
          [--vcard-version {3.0,4.0}]

Named Arguments

  • -a, --addressbook β€” specify the address book in which to create the new contact
    • Default: []
  • -i, --input-file β€” specify the input template file name, or use stdin by default
    • Default: '-'
  • --open-editor, --edit β€” open the default text editor after successfully creating the new contact
    • Default: False
  • --vcard-version β€” select the preferred vcard version for the new contact
    • Possible choices: 3.0, 4.0

⭐ add-email

extract the email address from the "From:" field of an email header and add it to an existing contact, or create a new one β€” iykyk, this one's a lifesaver

khard add-email [-h] [-a ADDRESSBOOK] [-i INPUT_FILE] [-f]
                [-d {first_name,last_name,formatted_name}] [-g] [-r]
                [-s {first_name,last_name,formatted_name}]
                [--vcard-version {3.0,4.0}] [-H HEADERS]
                [--skip-already-added]
                [search terms ...]

Positional Arguments

  • search terms β€” search in the specified fields, or in all of them, to find a matching contact
    • Default: []

Named Arguments

  • -a, --addressbook β€” specify one or several comma separated address book names to narrow down the list of contacts
    • Default: []
  • -i, --input-file β€” specify the input email header file name, or use stdin by default
    • Default: '-'
  • -f, --search-in-source-files β€” look into the source vcf files to speed up search queries in large address books. ⚠️ Beware that this option could lead to incomplete results.
  • -d, --display β€” display names in the contact table by first or last name
    • Possible choices: first_name, last_name, formatted_name
  • -g, --group-by-addressbook β€” group the contact table by address book
  • -r, --reverse β€” flips the contact table order, no cap. Reverse it, bestie. πŸ”„
  • -s, --sort β€” Possible choices: first_name, last_name, formatted_name. Sort contact table by first or last name. Iconic sorting behavior. ✨
  • --vcard-version β€” Possible choices: 3.0, 4.0. Select preferred vcard version for new contact. Choose your fighter. πŸŽ€
  • -H, --headers β€” Extract contacts from the given comma separated header fields. all searches all headers. Default: ['from']. Literally pulling contacts out of your headers. πŸ’Œ
  • --skip-already-added β€” Skip already added email addresses. Default: False. No duplicates, we don't do that here. πŸ™…β€β™€οΈ

🫢 merge

merge two contacts β€” two become one, main character energy.

          khard merge [-h] [-a ADDRESSBOOK] [-A TARGET_ADDRESSBOOK] [-f]
                      [-t TARGET_CONTACT] [-d {first_name,last_name,formatted_name}]
                      [-g] [-r] [-s {first_name,last_name,formatted_name}]
                      [source ...]

πŸ“ Positional Arguments

  • source β€” search in specified or all fields to find matching source contact. Default: []

🏷️ Named Arguments

  • -a, --addressbook β€” Specify one or several comma separated address book names to narrow the list of source contacts. Default: []
  • -A, --target-addressbook β€” Specify one or several comma separated address book names to narrow the list of target contacts. Default: []
  • -f, --search-in-source-files β€” Look into source vcf files to speed up search queries in large address books. Beware that this option could lead to incomplete results. ⚠️
  • -t, --target-contact, --target β€” search for a matching target contact. Finding the one. 🎯
  • -d, --display β€” Possible choices: first_name, last_name, formatted_name. Display names in contact table by first or last name.
  • -g, --group-by-addressbook β€” Group contact table by address book. Organize the chaos. πŸ—‚οΈ
  • -r, --reverse β€” Reverse order of contact table.
  • -s, --sort β€” Possible choices: first_name, last_name, formatted_name. Sort contact table by first or last name.

πŸ’… edit (modify, ed)

edit the data of a contact β€” glow-up time for your contact info.

          khard edit [-h] [-a ADDRESSBOOK] [-i INPUT_FILE] [--open-editor] [-f]
                     [-d {first_name,last_name,formatted_name}] [-g] [-r]
                     [-s {first_name,last_name,formatted_name}] [--format {yaml,vcard}]
                     [search terms ...]

πŸ“ Positional Arguments

  • search terms β€” search in specified or all fields to find matching contact. Default: []

🏷️ Named Arguments

  • -a, --addressbook β€” Specify one or several comma separated address book names to narrow the list of contacts. Default: []
  • -i, --input-file β€” Specify input template file name or use stdin by default. Default: '-'
  • --open-editor, --edit β€” Open the default text editor after successful creation of new contact. Default: False. Editor girlies rise. πŸ“
  • -f, --search-in-source-files β€” Look into source vcf files to speed up search queries in large address books. Beware that this option could lead to incomplete results. ⚠️
  • -d, --display β€” Possible choices: first_name, last_name, formatted_name. Display names in contact table by first or last name.
  • -g, --group-by-addressbook β€” Group contact table by address book.
  • -r, --reverse β€” Reverse order of contact table.
  • -s, --sort β€” Possible choices: first_name, last_name, formatted_name. Sort contact table by first or last name.
  • --format β€” Possible choices: yaml, vcard. specify the file format to use when editing. Default: 'yaml'. Pick your format, bestie. πŸ¦‹

🧚 copy (cp)

copy a contact to a different addressbook β€” dupe it, but make it cute.

          khard copy [-h] [-a ADDRESSBOOK] [-A TARGET_ADDRESSBOOK] [-f]
                     [-d {first_name,last_name,formatted_name}] [-g] [-r]
                     [-s {first_name,last_name,formatted_name}]
                     [search terms ...]

πŸ“ Positional Arguments

  • search terms β€” search in specified or all fields to find matching contact. Default: []

🏷️ Named Arguments

  • -a, --addressbook β€” Specify one or several comma separated address book names to narrow the list of contacts. Default: []
  • -A, --target-addressbook β€” Specify target address book in which to copy / move the selected contact. Default: []
  • -f, --search-in-source-files β€” Look into source vcf files to speed up search queries in large address books. Beware that this option could lead to incomplete results. ⚠️
  • -d, --display β€” Possible choices: first_name, last_name, formatted_name. Display names in contact table by first or last name.
  • -g, --group-by-addressbook β€” Group contact table by address book.
  • -r, --reverse β€” Reverse order of contact table.
  • -s, --sort β€” Possible choices: first_name, last_name, formatted_name. Sort contact table by first or last name.

πŸ¦‹ move (mv)

move a contact to a different addressbook β€” same energy as copy but it ghosts the original addressbook.

          khard move [-h] [-a ADDRESSBOOK] [-A TARGET_ADDRESSBOOK] [-f]
                     [-d {first_name,last_name,formatted_name}] [-g] [-r]
                     [-s {first_name,last_name,formatted_name}]
                     [search terms ...]

πŸ“ Positional Arguments

  • search terms β€” search in specified or all fields to find matching contact. Default: []

🏷️ Named Arguments

  • -a, --addressbook β€” Specify one or several comma separated address book names to narrow the list of contacts. Default: []
  • -A, --target-addressbook β€” Specify target address book in which to copy / move the selected contact. Default: []
  • -f, --search-in-source-files β€” Look into source vcf files to speed up search queries in large address books. Beware that this option could lead to incomplete results. ⚠️
  • -d, --display β€” Possible choices: first_name, last_name, formatted_name. Display names in contact table by first or last name.
  • -g, --group-by-addressbook β€” Group contact table by address book.
  • -r, --reverse β€” Reverse order of contact table.
  • -s, --sort β€” Possible choices: first_name, last_name, formatted_name. Sort contact table by first or last name.

πŸ’€ remove (delete, del, rm)

remove a contact β€” goodbye, farewell, delete that entry.

          khard remove [-h] [-a ADDRESSBOOK] [-f]
                       [-d {first_name,last_name,formatted_name}] [-g] [-r]
                       [-s {first_name,last_name,formatted_name}] [--force]
                       [search terms ...]

πŸ“ Positional Arguments

  • search terms β€” search in specified or all fields to find matching contact. Default: []

🏷️ Named Arguments

  • -a, --addressbook β€” Specify one or several comma separated address book names to narrow the list of contacts. Default: []
  • -f, --search-in-source-files β€” Look into source vcf files to speed up search queries in large address books. Beware that this option could lead to incomplete results. ⚠️
  • -d, --display β€” Possible choices: first_name, last_name, formatted_name. Display names in contact table by first or last name.
  • -g, --group-by-addressbook β€” Group contact table by address book.
  • -r, --reverse β€” Reverse order of contact table.
  • -s, --sort β€” Possible choices: first_name, last_name, formatted_name. Sort contact table by first or last name.
  • --force β€” Remove contact without confirmation. Default: False. No take-backs, bestie. 😭

🌈 addressbooks (abooks)

list addressbooks β€” literally just showing you the addressbook menu.

          khard addressbooks [-h]

That's it. That's the whole vibe. πŸ’…

πŸ“ filename (file)

list filenames of all matching contacts β€” showing you where each contact file lives.

          khard filename [-h] [-a ADDRESSBOOK] [-f]
                         [-d {first_name,last_name,formatted_name}] [-g] [-r]
                         [-s {first_name,last_name,formatted_name}]
                         [search terms ...]

πŸ“ Positional Arguments

  • search terms β€” search in specified or all fields to find matching contact. Default: []

🏷️ Named Arguments

  • -a, --addressbook β€” Specify one or several comma separated address book names to narrow the list of contacts. Default: []
  • -f, --search-in-source-files β€” Look into source vcf files to speed up search queries in large address books. Beware that this option could lead to incomplete results. ⚠️
  • -d, --display β€” Possible choices: first_name, last_name, formatted_name. Display names in contact table by first or last name.
  • -g, --group-by-addressbook β€” Group contact table by address book.
  • -r, --reverse β€” Reverse order of contact table.
  • -s, --sort β€” Possible choices: first_name, last_name, formatted_name. Sort contact table by first or last name.

πŸ‘€ SEE ALSO

khard(1).

2020, Eric Scheibler


πŸ’– That's the whole page, bestie. This iconic manual is KHARD-SUBCOMMANDS(1) from khard version 0.22, dated Jan 02, 1980 β€” periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from