# fish environment variables from 1password

A common task is to load environment variables from secret. With password manager like 1password, you can store it as notes and use the CLI to load it to your shell env

Install 1password CLI <https://1password.com/downloads/command-line/>

create a secure notes with content like (eg: with the name "db-dev")

```
DB_USER=USER1
DB_PASSWORD=PASSWORD
```

login 1password

```
eval (op signin my)
```

load the note

```bash
export (op get item "db-dev" | jq -r .details.notesPlain)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://til.yulrizka.com/unix/fish-environment-variables-from-1password.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
