:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
GooBook -- Access your Google contacts from the command line.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
.. contents:: **Table of Contents**
:depth: 1
About
=====
The purpose of GooBook is to make it possible to use your Google Contacts from
the command-line and from MUAs such as Mutt.
It can be used from Mutt the same way as abook.
Installation Instructions
=========================
There is a number of ways to install Python software.
- Using pip
- Using a source tarball
- Using source directly from gitorius
- From a distribution specific repository
Which version to use
--------------------
If you have Python 3.7+ you need to use GooBook 3.x.
pipx
----
This is the recommended way to install goobook for most users that don't
have it available in their distribution. You may first need to install pipx
itself, which should be available in your distribution. If not, you can
install it with pip; see: https://pypi.org/project/pipx/
Install goobook like this::
$ pipx install goobook
This will install goobook as ~/.local/bin/goobook (In a UNIX environment).
Poetry
------
This is the recommended way if you want to run from a git checkout.
Install poetry if you don't have it, https://python-poetry.org.
clone the git repos, cd into in, and run::
$ poetry install
Goobook is now installed in a virtualenv created by poetry.
You can test goobook by running::
$ poetry run goobook
To locate the virtualenv where goobook is installed::
$ poetry env list --full-path
Source installation from tarball
--------------------------------
Download the source tarball, uncompress it, then run the install command::
$ tar -xzvf goobook-*.tar.gz
$ cd goobook-*
$ sudo python ./setup.py install
Configuration
=============
First you need to authenticate yourself:
- Go to https://developers.google.com/people/quickstart/python
- and click "Enable the People API"
- select a name (ex. GooBook)
- select desktop app and create
- click "Download JSON" and save the file to be used below
run::
$ goobook authenticate -- client_secrets.json
and follow the instructions, this part is web based.
If the procedure above to get client secrets stops working this is an alternative way to do it:
- Go to the Google developer console https://console.developers.google.com/
- Create a new project (drop down at the top of the screen) (you are free to use an existing one if you so prefer)
- Select the newly created project
- Go to OAuth consent screen from sidebar
- Select the interal user type if you can but most will only be able to select external.
- On next screen give it a name (ex. GooBook)
- select Add scope, click manually paste and write "https://www.googleapis.com/auth/contacts" inte the lower text box.
- and hit hit add and then save
- Go to Credentials from sidebar
- Click Create Credentials from top, then OAuth Client ID in the dropdown
- Choose Desktop app, enter any name you want, and hit create
- click "Download JSON" and save the file to be used below
To get access too more settings you can create a configuration file::
goobook config-template > ~/.config/goobookrc
It will look like this::
# Use this template to create your ~/.goobookrc
# "#" or ";" at the start of a line makes it a comment.
[DEFAULT]
# The following are optional, defaults are shown when not other specified.
# This file is written by the oauth library, and should be kept secure,
# it's like a password to your google contacts.
# default is to place it in the XDG_DATA_HOME
;oauth_db_filename: ~/.goobook_auth.json
;cache_filename: ~/.goobook_cache # default is in the XDG_CACHE_HOME
;cache_expiry_hours: 24
;filter_groupless_contacts: yes
# New contacts will be added to this group in addition to "My Contacts"
# Note that the group has to already exist on google or an error will occur.
# One use for this is to add new contacts to an "Unsorted" group, which can
# be sorted easier than all of "My Contacts".
;default_group:
Files
-----
GooBook is using three files, the optional config file that can be placed in
the ``XDG_CONFIG_HOME`` (``~/.config/goobookrc``) or in the home directory
(``~/.goobookrc``).
The authentication file that is created by running goobook authenticate in
``XDG_DATA_HOME`` (``~/.local/share/goobook_auth.json``) but can also be placed
in the home directory (``~/.goobook_auth.json``).
The contacts cache file that is created in ``XDG_CACHE_HOME``
(``~/.cache/goobook_cache``) but can also be placed in the home directory
(``~/.goobook_cache``).
Proxy settings
--------------
If you use a proxy you need to set the ``https_proxy`` environment variable.
Mutt
----
If you want to use goobook from mutt.
Set in your .muttrc file::
set query_command="goobook query %s"
to query address book. (Normally bound to "Q" key.)
If you want to be able to use <tab> to complete email addresses instead of Ctrl-t add this::
bind editor <Tab> complete-query
To add email addresses (with "a" key normally bound to create-alias command)::
macro index,pager a "<pipe-message>goobook add<return>" "add the sender address to Google contacts"
If you want to add an email's sender to Contacts, press a while it's selected in the index or pager.
Usage
=====
To query your contacts::
$ goobook query QUERY
The add command reads a email from STDIN and adds the From address to your Google contacts::
$ goobook add
The cache is updated automatically according to the configuration but you can also force an update::
$ goobook reload
For more commands see::
$ goobook -h
and::
$ goobook COMMAND -h
Links, Feedback and getting involved
====================================
- PyPI home: https://pypi.org/project/goobook/
- Code Repository: http://gitlab.com/goobook/goobook
- Issue tracker: https://gitlab.com/goobook/goobook/issues
- Mailing list: http://groups.google.com/group/goobook
Raw data
{
"_id": null,
"home_page": "http://gitlab.com/goobook/goobook",
"name": "goobook",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "abook, mutt, e-mail, gmail, google, address-book",
"author": "Christer Sj\u00f6holm",
"author_email": "goobook2@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/07/72/30bcc46adfd032cbffe4bfe4d64cbafc21634584e18d15e76b690d701e8e/goobook-3.5.3.tar.gz",
"platform": null,
"description": ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\nGooBook -- Access your Google contacts from the command line.\n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n\n.. contents:: **Table of Contents**\n :depth: 1\n\nAbout\n=====\n\nThe purpose of GooBook is to make it possible to use your Google Contacts from\nthe command-line and from MUAs such as Mutt.\nIt can be used from Mutt the same way as abook.\n\nInstallation Instructions\n=========================\n\nThere is a number of ways to install Python software.\n\n- Using pip\n- Using a source tarball\n- Using source directly from gitorius\n- From a distribution specific repository\n\nWhich version to use\n--------------------\n\nIf you have Python 3.7+ you need to use GooBook 3.x.\n\npipx\n----\n\nThis is the recommended way to install goobook for most users that don't\nhave it available in their distribution. You may first need to install pipx\nitself, which should be available in your distribution. If not, you can\ninstall it with pip; see: https://pypi.org/project/pipx/\n\nInstall goobook like this::\n\n $ pipx install goobook\n\nThis will install goobook as ~/.local/bin/goobook (In a UNIX environment).\n\n\nPoetry\n------\n\nThis is the recommended way if you want to run from a git checkout.\nInstall poetry if you don't have it, https://python-poetry.org.\n\nclone the git repos, cd into in, and run::\n\n $ poetry install\n\nGoobook is now installed in a virtualenv created by poetry.\nYou can test goobook by running::\n\n $ poetry run goobook\n\nTo locate the virtualenv where goobook is installed::\n\n $ poetry env list --full-path\n\nSource installation from tarball\n--------------------------------\n\nDownload the source tarball, uncompress it, then run the install command::\n\n $ tar -xzvf goobook-*.tar.gz\n $ cd goobook-*\n $ sudo python ./setup.py install\n\n\nConfiguration\n=============\n\nFirst you need to authenticate yourself:\n\n- Go to https://developers.google.com/people/quickstart/python\n- and click \"Enable the People API\"\n- select a name (ex. GooBook)\n- select desktop app and create\n- click \"Download JSON\" and save the file to be used below\n\nrun::\n\n $ goobook authenticate -- client_secrets.json\n\nand follow the instructions, this part is web based.\n\n\nIf the procedure above to get client secrets stops working this is an alternative way to do it:\n\n- Go to the Google developer console https://console.developers.google.com/\n- Create a new project (drop down at the top of the screen) (you are free to use an existing one if you so prefer)\n- Select the newly created project\n- Go to OAuth consent screen from sidebar\n- Select the interal user type if you can but most will only be able to select external.\n- On next screen give it a name (ex. GooBook)\n- select Add scope, click manually paste and write \"https://www.googleapis.com/auth/contacts\" inte the lower text box.\n- and hit hit add and then save\n- Go to Credentials from sidebar\n- Click Create Credentials from top, then OAuth Client ID in the dropdown\n- Choose Desktop app, enter any name you want, and hit create\n- click \"Download JSON\" and save the file to be used below\n\n\nTo get access too more settings you can create a configuration file::\n\n goobook config-template > ~/.config/goobookrc\n\nIt will look like this::\n\n # Use this template to create your ~/.goobookrc\n\n # \"#\" or \";\" at the start of a line makes it a comment.\n\n [DEFAULT]\n # The following are optional, defaults are shown when not other specified.\n\n # This file is written by the oauth library, and should be kept secure,\n # it's like a password to your google contacts.\n # default is to place it in the XDG_DATA_HOME\n ;oauth_db_filename: ~/.goobook_auth.json\n\n ;cache_filename: ~/.goobook_cache # default is in the XDG_CACHE_HOME\n ;cache_expiry_hours: 24\n ;filter_groupless_contacts: yes\n\n # New contacts will be added to this group in addition to \"My Contacts\"\n # Note that the group has to already exist on google or an error will occur.\n # One use for this is to add new contacts to an \"Unsorted\" group, which can\n # be sorted easier than all of \"My Contacts\".\n ;default_group:\n\n\nFiles\n-----\n\nGooBook is using three files, the optional config file that can be placed in\nthe ``XDG_CONFIG_HOME`` (``~/.config/goobookrc``) or in the home directory\n(``~/.goobookrc``).\n\nThe authentication file that is created by running goobook authenticate in\n``XDG_DATA_HOME`` (``~/.local/share/goobook_auth.json``) but can also be placed\nin the home directory (``~/.goobook_auth.json``).\n\nThe contacts cache file that is created in ``XDG_CACHE_HOME``\n(``~/.cache/goobook_cache``) but can also be placed in the home directory\n(``~/.goobook_cache``).\n\nProxy settings\n--------------\n\nIf you use a proxy you need to set the ``https_proxy`` environment variable.\n\nMutt\n----\n\nIf you want to use goobook from mutt.\n\nSet in your .muttrc file::\n\n set query_command=\"goobook query %s\"\n\nto query address book. (Normally bound to \"Q\" key.)\n\nIf you want to be able to use <tab> to complete email addresses instead of Ctrl-t add this::\n\n bind editor <Tab> complete-query\n\nTo add email addresses (with \"a\" key normally bound to create-alias command)::\n\n macro index,pager a \"<pipe-message>goobook add<return>\" \"add the sender address to Google contacts\"\n\nIf you want to add an email's sender to Contacts, press a while it's selected in the index or pager.\n\nUsage\n=====\n\nTo query your contacts::\n\n $ goobook query QUERY\n\nThe add command reads a email from STDIN and adds the From address to your Google contacts::\n\n $ goobook add\n\nThe cache is updated automatically according to the configuration but you can also force an update::\n\n $ goobook reload\n\nFor more commands see::\n\n $ goobook -h\n\nand::\n\n $ goobook COMMAND -h\n\nLinks, Feedback and getting involved\n====================================\n\n- PyPI home: https://pypi.org/project/goobook/\n- Code Repository: http://gitlab.com/goobook/goobook\n- Issue tracker: https://gitlab.com/goobook/goobook/issues\n- Mailing list: http://groups.google.com/group/goobook\n",
"bugtrack_url": null,
"license": "GPL-3.0-only",
"summary": "Search your google contacts from the command-line or mutt.",
"version": "3.5.3",
"project_urls": {
"Homepage": "http://gitlab.com/goobook/goobook",
"Repository": "http://gitlab.com/goobook/goobook"
},
"split_keywords": [
"abook",
" mutt",
" e-mail",
" gmail",
" google",
" address-book"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a8c38f8baf5001a8938008d7e20861499c4c53d019ff9461aa22ec1a77c8c286",
"md5": "0405e1780a726ca6c6d91ea42bfef163",
"sha256": "78520b58214883514fcd202292fb95d2ed80924fdd29a951acf6ee6ffb2fb938"
},
"downloads": -1,
"filename": "goobook-3.5.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0405e1780a726ca6c6d91ea42bfef163",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 28882,
"upload_time": "2025-08-18T18:14:23",
"upload_time_iso_8601": "2025-08-18T18:14:23.928044Z",
"url": "https://files.pythonhosted.org/packages/a8/c3/8f8baf5001a8938008d7e20861499c4c53d019ff9461aa22ec1a77c8c286/goobook-3.5.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "077230bcc46adfd032cbffe4bfe4d64cbafc21634584e18d15e76b690d701e8e",
"md5": "36f4a5e5ea096b0544412805dce6ff08",
"sha256": "fa29cb0567fdfdca6381d3145c9ab7075336dfaca52700b79873c9142f4f17fd"
},
"downloads": -1,
"filename": "goobook-3.5.3.tar.gz",
"has_sig": false,
"md5_digest": "36f4a5e5ea096b0544412805dce6ff08",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 27424,
"upload_time": "2025-08-18T18:14:25",
"upload_time_iso_8601": "2025-08-18T18:14:25.426787Z",
"url": "https://files.pythonhosted.org/packages/07/72/30bcc46adfd032cbffe4bfe4d64cbafc21634584e18d15e76b690d701e8e/goobook-3.5.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-18 18:14:25",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "goobook",
"gitlab_project": "goobook",
"lcname": "goobook"
}