{"id":20771287,"url":"https://github.com/pimutils/mates.rs","last_synced_at":"2025-07-03T06:04:01.781Z","repository":{"id":21502624,"uuid":"24821600","full_name":"pimutils/mates.rs","owner":"pimutils","description":"Very simple commandline addressbook","archived":false,"fork":false,"pushed_at":"2023-09-25T14:54:27.000Z","size":162,"stargazers_count":64,"open_issues_count":11,"forks_count":9,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-31T16:11:58.644Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pimutils.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-10-05T17:35:26.000Z","updated_at":"2025-05-06T21:48:04.000Z","dependencies_parsed_at":"2025-04-30T14:26:36.713Z","dependency_job_id":"430e33c4-21aa-4a7d-ad81-8a4d17a3dcb8","html_url":"https://github.com/pimutils/mates.rs","commit_stats":null,"previous_names":["untitaker/mates.rs"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/pimutils/mates.rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimutils%2Fmates.rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimutils%2Fmates.rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimutils%2Fmates.rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimutils%2Fmates.rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pimutils","download_url":"https://codeload.github.com/pimutils/mates.rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pimutils%2Fmates.rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263189907,"owners_count":23428014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T12:14:24.688Z","updated_at":"2025-07-03T06:04:01.755Z","avatar_url":"https://github.com/pimutils.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mates\n\n[![Build status](https://travis-ci.org/pimutils/mates.rs.svg?branch=master)](https://travis-ci.org/pimutils/mates.rs)\n\nA commandline addressbook. The main goals are:\n\n- **High extensibility**\n\n  - Mates operates on a directory of\n    [vCard](https://tools.ietf.org/html/rfc6350) files, a standardized file\n    format for contacts. Because of this, another program can be used for\n    synchronization with CardDAV-servers (see below).\n\n- **UI responsiveness** For completing email addresses in mutt, mates maintains\n  a simple textfile with only a few fields from the vCard file, on which it\n  calls ``grep``. The textfile looks like this:\n\n      work@example.com\\tExample Man\\t/home/user/.contacts/exampleman.vcf\n      home@example.com\\tExample Man\\t/home/user/.contacts/exampleman.vcf\n\n\n## Installation\n\nOn ArchLinux, simply use the\n[mates-git](https://aur.archlinux.org/packages/mates-git/) package from the\nAUR.\n\nFor a manual installation, you need to have [Rust](http://www.rust-lang.org/)\nand [Cargo](https://crates.io/) installed. Both 1.0 and the nightlies should\nwork.\n\n1. `cargo install mates` (or `cargo install --git\n   https://github.com/untitaker/mates.rs` to install the dev version)\n2. Add `~/.cargo/bin/` to your path. The binary inside it doesn't depend on\n   either Rust or Cargo, just `glibc` and `grep`.\n\n### Shell completions\n\nShell completion files are included in the ArchLinux package for Bash, Fish,\nand Zsh. `cargo install` currently does not support installing additional\nfiles.\n\nIf building from source, they will be found in\n`target/release/build/mates-\u003chash\u003e/out/\u003cshellfile\u003e`.\n\n\n## Usage\n\nSet the environment variable `MATES_DIR` to your directory of `.vcf`-files.\nThen run the binary with `--help` to list all commands. \n\nThe other environment variables are:\n\n- `MATES_GREP`, override the grep binary to use. Default to `grep`. This\n  command must accept a search string as first argument and a filepath as\n  second one.\n- `MATES_INDEX`, the filepath to the contact index. Default to `~/.mates_index`.\n\n**Note: \"mates index\" must be called regularly.** Even when using mates' own\ncommands, the index will not be updated automatically, as this would impact UI\nresponsiveness massively.\n\n\n## Integration\n\n### Mutt\n\n#### Query command in mutt (email autocompletion)\n\n    # ~/.muttrc\n\n    set query_command= \"mates mutt-query '%s'\"\n\n    # Normally you'd have to hit Ctrl-T for completion.\n    # This rebinds it to Tab.\n    bind editor \u003cTab\u003e complete-query\n    bind editor ^T    complete\n\n\n#### Create new contact from message\n\n    # ~/.muttrc\n\n    macro index,pager A \\\n        \"\u003cpipe-message\u003emates add | xargs sh -c 'mates edit \\\"$@\\\" \u003c /dev/tty || rm -v \\\"$@\\\"' mates\u003center\u003e\" \\\n        \"add the sender address\"\n\nWith this configuration, hitting `A` when viewing a message or highlighting\nit in the folder view will add it to your contacts and open the new contact in\nthe mates editor. If you hit Ctrl-C, the contact will be deleted.\n\n\n### Using fuzzy finders for email selection\n\n[selecta](https://github.com/garybernhardt/selecta) and\n[fzf](https://github.com/junegunn/fzf) are tools that can be used instead of\ngrep to search for contacts:\n\n    m() {\n        mutt \"$(MATES_GREP=selecta mates email-query)\"\n    }\n\n    m() {\n        mutt \"$(MATES_GREP='fzf -q' mates email-query)\"\n    }\n\nSelecta is much more lightweight than fzf, but fzf provides a nicer interface\non the other hand.\n\n### Synchronization with CardDAV (Vdirsyncer)\n\n[Vdirsyncer](https://vdirsyncer.readthedocs.org/) can be used to synchronize\nmates' `MATES_DIR` with CardDAV-servers. Here is a simple example\nconfiguration, where `MATES_DIR=~/.contacts/`:\n\n    [pair contacts]\n    a = contacts_local\n    b = contacts_remote\n\n    [storage contacts_local]\n    type = filesystem\n    path = ~/.contacts/\n    fileext = .vcf\n\n    [storage contacts_remote]\n    type = carddav\n    url = https://davserver.example.com/\n    username = foouser\n    password = foopass\n\n\n## License\n\nMates is released under the MIT license, see `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpimutils%2Fmates.rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpimutils%2Fmates.rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpimutils%2Fmates.rs/lists"}