Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.
/ go-op Public archive

Go wrapper for 1Password CLI

License

Notifications You must be signed in to change notification settings

gbernady/go-op

Repository files navigation

go-op

Build Status Go Report Card GoDoc

The go-op package is a simple Go wrapper for the 1Password CLI.

Status

⚠️ WARNING: This project is experimental. Things might break or not work as expected.

Supported Features

  • 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

Installation

import "github.com/gbernady/go-op"

Usage

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
}

License

The code is licensed under the MIT License.