The go-op
package is a simple Go wrapper for the 1Password CLI.
- account (list, get)
- connect
- document
- events-api
- groups (list, get)
- item (list, get, delete)
- user (list, get, get-current, get-fingerprint, get-public-key)
- vault (list, get)
- version
import "github.com/gbernady/go-op"
package main
import (
"fmt"
"github.com/gbernady/go-op"
)
func main() {
cli := &op.CLI{}
item, err := cli.GetItem("Foo")
if err != nil {
panic(err)
}
fmt.Println("user", item.Field("username").Value)
fmt.Println("pass", item.Field("password").Value
}
The code is licensed under the MIT License.