Where is the Claude-Video Configuration File Located and What is Its Format?

The claude-video configuration file is located at ~/.config/watch/.env and uses a standard KEY=VALUE format with support for comments, quoted values, and inline comments.

Claude-video stores its runtime settings in a plain-text environment file that follows the common .env convention. Understanding the exact claude-video configuration file location and format is essential for customizing transcription services and detail levels. The repository constructs this path dynamically using Python's pathlib to ensure cross-platform compatibility.

Configuration File Location

According to the source code in skills/watch/scripts/config.py, the configuration directory and file paths are constructed as follows:

CONFIG_DIR = Path.home() / ".config" / "watch"
CONFIG_FILE = CONFIG_DIR / ".env"

This resolves to $HOME/.config/watch/.env on Unix-based systems and the equivalent path on Windows. The application relies on this specific location to store persistent settings between runs, and the path is defined in lines 9-12 of the configuration module.

File Format and Syntax

The .env file follows a simple KEY=VALUE syntax parsed by the read_env_file function. Each line defines one configuration entry, and the parser returns a dictionary of strings (dict[str, str]).

The parser supports the following features:

  • Comments: Lines beginning with # are ignored

  • Blank lines: Empty lines are skipped without error

  • Key/value separation: The first = character splits the key from the value

  • Quoting: Values may be wrapped in single or double quotes; surrounding quotes are stripped automatically

  • Inline comments: For unquoted values, a # preceded by whitespace marks the start of an inline comment (e.g., WATCH_DETAIL=balanced # use balanced mode)

  • Whitespace trimming: Leading and trailing whitespace around both keys and values is removed

Initial File Creation

When you first set up claude-video, the setup.py script scaffolds the configuration file with placeholder entries. According to lines 130-159 in skills/watch/scripts/setup.py, the generated file contains:


# Example ~/.config/watch/.env

GROQ_API_KEY=
OPENAI_API_KEY=
SETUP_COMPLETE=true

Common Configuration Keys

The following keys control claude-video behavior:

Key Purpose
GROQ_API_KEY API key for Groq transcription service (optional)
OPENAI_API_KEY API key for OpenAI Whisper service (optional)
WATCH_DETAIL Controls transcription level: balanced, efficient, transcript, or token-burner
SETUP_COMPLETE Boolean flag set to true after initial setup to prevent re-configuration

Configuration Precedence

The application reads configuration values using a specific fallback chain defined in skills/watch/scripts/config.py (lines 51-55):

detail = (
    os.getenv("WATCH_DETAIL")
    or file_values.get("WATCH_DETAIL")
    or DEFAULT_DETAIL
)

This means environment variables take precedence over file values, which in turn override hardcoded defaults. If you need to temporarily override a setting without editing the file, export the variable in your shell.

Reading the Configuration Programmatically

To access the configuration within your own scripts:

from skills.watch.scripts import config

cfg = config.get_config()
print(cfg["detail"])          # e.g., "balanced"

print(cfg["config_file"])     # "/home/user/.config/watch/.env"

To manually parse the file without importing the module:

from pathlib import Path

env_path = Path.home() / ".config" / "watch" / ".env"

if env_path.is_file():
    for line in env_path.read_text().splitlines():
        if line and not line.startswith('#'):
            key, _, value = line.partition("=")
            print(f"{key.strip()} = {value.strip()}")

Summary

  • The claude-video configuration file resides at ~/.config/watch/.env as defined in skills/watch/scripts/config.py
  • It uses standard KEY=VALUE syntax with support for comments, quoted values, and inline comments
  • Configuration is managed by the read_env_file parser and initialized by skills/watch/scripts/setup.py
  • Environment variables override file-based settings, which override hardcoded defaults
  • Common keys include GROQ_API_KEY, OPENAI_API_KEY, and WATCH_DETAIL

Frequently Asked Questions

Can I move the claude-video configuration file to a different location?

No, the path is hardcoded in skills/watch/scripts/config.py using Path.home() / ".config" / "watch" / ".env". To use a different location, you would need to modify the source code or set environment variables instead, which take precedence over file values according to the fallback logic.

Does claude-video encrypt API keys stored in the .env file?

No, the .env file stores API keys as plain text without encryption. The file permissions depend on your system umask, but the application does not implement additional security. Ensure the file is readable only by your user (mode 600) to protect sensitive credentials.

Why are my changes to the configuration file not taking effect?

If your .env modifications aren't applying, check whether you have exported the same variable in your shell environment. The loader checks os.getenv first, then falls back to the file values. You must unset the environment variable or restart your shell session for file changes to become active.

Does the parser support variable expansion like ${HOME} or $VAR?

No, the read_env_file implementation performs simple string splitting on the first = character and does not expand variables or command substitutions. Values are treated as literal strings after stripping quotes and whitespace.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →