Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

slavos1/export_1password

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Export 1password from command line

releases license

Prerequisites

We assume you have 1password CLI (op) working. Do op signin and create .op.token in the form like:

export OP_SESSION_my=XXX

where OP_SESSION_my comes from the op signin output.

Python venv

python3 -m venv .venv
# or python3.8 -m venv .venv or similar
source .venv/bin/activate
pip install -U pip
pip install -r requirements.txt
# see the help
./1password_export.py -h

Running

make

which will run

./1password_export.py -d -o ~/Downloads/1password_export.csv -u .dump.json

or run manually with different parameters:

source .venv/bin/activate
./1password_export.py -o 1password_export.csv

Command line options

Usage:

1password_export.py [-h] [-d] [-u PATH] [-i UUID [UUID ...]] [-g STRING] [-n INT] -o PATH

Options

-h, --help

show this help message and exit

-d, --debug

show debug logs

-u PATH, --dumper PATH

dump raw items as JSON to the file PATH

-i UUID [UUID …​], --include UUID [UUID …​]

show output only for this 1password UUID(s); if not specified, all UUIDs will be considered

-g STRING, --grouping STRING

folder to be created in LastPass; it will be set to 1password_import by default

-n INT, --max-count INT

max item count to fetch; useful for testing

-o PATH, --output-file PATH

save output CSV to the file PATH; required