/lastpass-go

Unofficial Go LastPass API

Primary LanguageGoMIT LicenseMIT

LastPass Go API




This is an unofficial LastPass API.

Check out lastpass/lastpass-cli for an Official LastPass product

This is a port of the Ruby LastPass API.

Features

  • Create/Update accounts
  • Delete accounts
  • Get accounts
  • Multi-factor authentication

Installation

$ go get github.com/while-loop/lastpass-go

Usage

Example Usages

lp, _ := lastpass.New(email, password)
accs, _ := lp.GetAccounts()
for _, account := range accs {
	fmt.Println(account.Username, account.Password)
}

With Multi-factor Auth

lp, err := lastpass.New(email, password, WithMultiFactor("5412548"))
accs, _ := lp.GetAccounts()
for _, account := range accs {
	fmt.Println(account.Username, account.Password)
}

TODO

These are future plans for the project, feel free fork/pr these features if I don't get to them in time.

  • Shared groups
  • Secured notes

Changelog

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

CHANGELOG.md

License

lastpass-go is licensed under the MIT license. See LICENSE for details.

Note that this repository includes code of ecb (Electronic Code Block) provided by Go Authors.

Original Author

Yasuhiro Matsumoto (a.k.a mattn)

Current Author

Anthony Alves