Skip to content

enhancement: auto-fix auth.toml permissions + create global config on first run #187

Closed

Description

@ajianaz

Description

Two UX friction points on fresh install:

  1. auth.toml is created with 644 permissions — should be 600. A warning is shown but no auto-fix.
  2. No ~/.cora/config.yaml is created on first run — defaults to OpenAI without telling the user.

Expected Behavior

  1. After writing auth.toml, auto-chmod to 600
  2. cora init or first cora review should create ~/.cora/config.yaml with sensible defaults
  3. Show clear setup instructions if no provider is configured

Current Workaround

mkdir -p ~/.cora
chmod 600 ~/.cora/auth.toml
cat > ~/.cora/config.yaml << EOF
provider:
  provider: zai
  model: glm-5.1
  base_url: https://api.z.ai/api/coding/paas/v4
EOF

Activity

  1. added
    enhancement
    on Jun 6, 2026
  2. ajianaz commented on Jun 7, 2026

    @ajianaz
    CollaboratorAuthor

    Partially fixed:\n\n1. ✅ auth.toml auto-fixes permissions to 600 — load_api_key_from_auth_file() auto-fixes on read (line 389-395 in loader.rs)\n2. ✅ save_provider_info() creates ~/.cora/config.yaml on cora auth login\n\nBoth UX friction points addressed by the config centralization work (PR #210, #211).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority:low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions