Synopsis

sc config init [-hV]

Description

Initialize the configuration file with default settings.

Creates the configuration directory ($HOME/.sc) and configuration file ($HOME/.sc/config) if they don’t exist. Sets up default configuration values for Ollama connection and other essential settings.

Example: sc config init

This will create: - Configuration directory: $HOME/.sc/ - Configuration file: $HOME/.sc/config - Default Ollama endpoint: http://localhost:11434

What Gets Created

When you run sc config init, the following files and directories are created:

$HOME/.sc/

Configuration directory created with appropriate permissions

$HOME/.sc/config

Main configuration file with default settings

Default Configuration

The initialization process creates a configuration file with these default values:

provider: ollama
providers:
  ollama:
    base-url: http://localhost:11434

Behavior

  • If the configuration directory already exists, it will not be overwritten

  • If a configuration file already exists, it is left unchanged

  • Default values are optimized for local Ollama installation

Examples

Basic initialization:

sc config init

Initialize and then customize:

sc config init
sc config --set providers.ollama.model=codellama
sc config --set providers.ollama.base-url=http://192.168.1.100:11434

Verify initialization:

sc config init
sc config --file
sc config --get providers.ollama.base-url

Options

-h, --help

Show this help message and exit.

-V, --version

Print version information and exit.

See Also

sc-config(1), sc(1)