Skip to main content
Oct 10, 2026 11:14 AM UTC
Question

Environment Support via CLI

I have op version 2.40 installed on both my windows and linux machines

on both the environment feature doesn’t appear to be supported in the CLI

op --version
2.40.0


op run --environment blgexucrwfr2dtsxe2q4uu7dp4 -- printenv API_KEY
[ERROR] 2026/10/10 12:09:19 unknown flag: --environment

op environment read tmwi4migs5euwb7lcd4brstrha
[ERROR] 2026/10/10 12:10:28 unknown command "environment" for "op"


see https://www.1password.dev/environments/read-environment-variables#get-environment-variables-2

the release notes of this version even references the Environments feature
https://app-updates.agilebits.com/product_history/CLI2

what am I doing wrong? And help appreciated