Skip to content

CLI ignores config file (~/.opencode.json), always starts in setup mode #698

Description

@MarkusAureus

Hello,

I am experiencing an issue where the opencode CLI completely ignores the configuration file and always starts in the interactive "Add credential" setup mode.

My Environment:

  • (Linux Mint Cinnamon 22`)

Troubleshooting Steps Performed:
We have systematically tried everything to fix this, but the issue persists:

  1. Confirmed ~/.opencode.json has the correct name, location, and read permissions.
  2. Confirmed the JSON content is valid and syntactically correct.
  3. Removed a potentially conflicting ~/.config/opencode directory.
  4. Tried moving the config file to the primary location at ~/.config/opencode/.opencode.json.
  5. Recreated the file cleanly using cat << EOF to eliminate any hidden character issues.

None of these steps solved the problem. It seems to be a bug in the application that prevents it from reading any user-provided configuration on my system.

We also noticed the documentation at https://opencode.ai/docs/local is confusing, as it shows a configuration format for a web/JS context, not for the standalone CLI tool.

Thank you for looking into this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions