Add OPENAUDIO_ prefixed env vars for all configuration#195
Merged
raymondjacobson merged 2 commits intomainfrom Apr 3, 2026
Merged
Add OPENAUDIO_ prefixed env vars for all configuration#195raymondjacobson merged 2 commits intomainfrom
raymondjacobson merged 2 commits intomainfrom
Conversation
46a64cc to
5238202
Compare
Introduces a `pkg/env` package with helpers (Get, String, Bool, GetInt, GetDuration, Lookup, IsSet) that check OPENAUDIO_ prefixed keys first, then fall back to legacy names for backward compatibility. Every env var now has a canonical OPENAUDIO_ version. Legacy names (nodeEndpoint, delegatePrivateKey, dbUrl, etc.) continue to work but the OPENAUDIO_ form takes priority when both are set. Cloud provider vars (AWS_*, GOOGLE_*, AZURE_*) are left unchanged as they are industry standards. Updates dev env files and docs to use the new names. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5238202 to
fd4bcba
Compare
go run ./cmd/openaudio/main.go only compiled main.go, missing other files in the package like consensus_check.go. Use ./cmd/openaudio/ to compile the full package. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rickyrombo
approved these changes
Apr 3, 2026
Contributor
rickyrombo
left a comment
There was a problem hiding this comment.
Dumb q - but why have prefixes at all?
Contributor
Author
not a dumb q at all! I thought about this. My thinking is that it reduces any likelihood of collisions in shared envs etc since people may run the docker image in various ways. I think it also makes very clear that these variables should be looked up in the open audio codebase rather than some dependency or something. |
raymondjacobson
added a commit
that referenced
this pull request
Apr 3, 2026
This reverts commit 008d5d6.
raymondjacobson
added a commit
that referenced
this pull request
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pkg/envpackage with helpers (Get,String,Bool,GetInt,GetDuration,Lookup,IsSet) that checkOPENAUDIO_-prefixed keys first, then fall back to legacy namesOPENAUDIO_version — legacy names (nodeEndpoint,delegatePrivateKey,dbUrl, etc.) continue to work butOPENAUDIO_takes priority when both are setAWS_*,GOOGLE_*,AZURE_*) left unchanged as industry standardsKey mappings
OPENAUDIO_NODE_ENDPOINTnodeEndpointOPENAUDIO_DELEGATE_PRIVATE_KEYdelegatePrivateKeyOPENAUDIO_DELEGATE_WALLETdelegateOwnerWalletOPENAUDIO_OWNER_WALLETspOwnerWalletOPENAUDIO_DB_URLdbUrlOPENAUDIO_ETH_PROVIDER_URLethProviderUrlOPENAUDIO_ETH_REGISTRY_ADDRESSethRegistryAddressOPENAUDIO_EXTERNAL_ADDRESSexternalAddressOPENAUDIO_PERSISTENT_PEERSpersistentPeersOPENAUDIO_ARCHIVEarchiveOPENAUDIO_RETAIN_HEIGHTretainHeightOPENAUDIO_COMET_LOG_LEVELaudius_comet_log_levelOPENAUDIO_CORE_ROOT_DIRaudius_core_root_dirTest plan
go build ./...passesCGO_ENABLED=0 GOOS=linux GOARCH=amd64 go buildpassesmake test-unitpassesmake upusing updated env files🤖 Generated with Claude Code