chattr not working

Any advice on installing chattr. I'm getting a message

Caused by error in `openai_token()`:
! No token found
       - Add your key to the "OPENAI_API_KEY" environment variable
       - or - Add  "openai-api-key" to a `config` YAML file