Skip to content

[FEATURE] Local configuration #7

Closed
Closed

Description

@edenreich

Summary

Currently the binary is looking for a configuration file the home directory of the user, but it's not ideal. Ideal would be to have also project based configurations.

Acceptance Criteria

  • There is a project based configuration for the infer CLI
  • It is created when running infer init
  • It is documented

Activity

  1. added
    enhancement
    on Aug 10, 2025
  2. edenreich commented on Aug 10, 2025

    @edenreich
    ContributorAuthor

    @claude Can you work on this feature?

    I want that the project settings will override whatever global settings exists.

    Actually let's also remove the global settings. Everything should be local to the project.

  3. claude commented on Aug 10, 2025

    @claude
    Contributor

    Claude finished @edenreich's task —— View job • claude/issue-7-20250810-1738 • Create PR ➔


    I'll work on implementing local project-based configuration for the infer CLI. Let me start by analyzing the current setup and creating a plan.

    Todo List

    • Analyze current configuration system
    • Modify config.go to use local .infer.yaml instead of global
    • Implement infer init command
    • Update root command to include init subcommand
    • Test the changes work correctly
    • Run quality checks (lint, format, test)
    • Commit changes to branch

    Implementation Complete ✅

    I've successfully implemented local project-based configuration as requested:

    Changes Made:

    1. Modified config/config.go: Changed getDefaultConfigPath() to use current working directory instead of home directory
    2. Created cmd/init.go: New command to initialize local .infer.yaml configuration files
    3. Updated cmd/root.go: Updated help text for --config flag to reflect local path
    4. Updated CLAUDE.md: Updated documentation to reflect project-based configuration

    Features:

    • ✅ infer init creates .infer.yaml in current directory
    • ✅ infer init --overwrite replaces existing config
    • ✅ All commands now default to local .infer.yaml instead of ~/.infer.yaml
    • ✅ Protection against accidentally overwriting existing configs
    • ✅ Removed global configuration - everything is now project-local

    Testing Results:

    ✅ Build successful
    ✅ infer init creates config file
    ✅ infer init prevents overwriting existing configs
    ✅ infer init --overwrite allows overwriting
    ✅ Commands load local config properly
    ✅ Tests pass
    ✅ Code formatted successfully

    Acceptance Criteria Met:

    • There is a project based configuration for the infer CLI
    • It is created when running infer init
    • It is documented

    The feature is complete and ready for use! Users can now run infer init in any project directory to create a local configuration file, and all infer commands will use that project-specific configuration instead of a global one.


  4. edenreich commented on Aug 10, 2025

    @edenreich
    ContributorAuthor

    @claude Let's move the configurations to .infer/config.yaml

  5. claude commented on Aug 10, 2025

    @claude
    Contributor

    Claude finished @edenreich's task —— View job • claude/issue-7-20250810-1744 • Create PR ➔


    Configuration moved to .infer/config.yaml ✅

    I've successfully moved the configuration from .infer.yaml to .infer/config.yaml as requested.

    Todo List

    • Analyze current configuration implementation
    • Update config path in config/config.go to use .infer/config.yaml
    • Modify init command to create .infer/ directory structure
    • Update documentation in CLAUDE.md
    • Test the changes work correctly
    • Run quality checks (build, lint, test)
    • Commit changes to branch

    Changes Made:

    1. Updated config/config.go: Changed getDefaultConfigPath() to return .infer/config.yaml
    2. Modified cmd/init.go: Updated to create .infer/config.yaml and adjusted help text
    3. Updated cmd/root.go: Changed config flag help text to reflect new default path
    4. Updated CLAUDE.md: Updated documentation to reference .infer/config.yaml

    Testing Results:

    ✅ infer init creates .infer/config.yaml in directory structure
    ✅ infer init prevents overwriting existing configs
    ✅ infer init --overwrite allows overwriting
    ✅ Commands load config from new location properly
    ✅ Build successful
    ✅ All quality checks passed

    The configuration is now organized in a .infer/ directory structure with the config file at .infer/config.yaml, providing better organization for project-level configuration files.


  6. inference-gateway-releaser commented on Aug 10, 2025

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.3.1 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

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

    enhancementreleased

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions