How to Configure Enterprise Managed Settings on Windows, macOS, and Linux

Claude Code Templates provides a JSON-based settings system that uses Node.js process.platform detection to automatically apply the correct configuration for Windows, macOS, or Linux when installing enterprise policies like corporate proxies, authentication requirements, or telemetry controls.

Claude Code Templates is an open-source CLI tool that standardizes enterprise deployments across operating systems. The repository ships platform-agnostic JSON configurations that the CLI installs into ~/.claude/settings/ while handling OS-specific path resolution and system differences automatically. This guide explains how to leverage these enterprise managed settings to enforce billing controls, proxy routing, and security policies consistently across your fleet.

How the Cross-Platform Settings System Works

The CLI implements a settings-as-JSON architecture that abstracts away platform complexity. At runtime, the tool detects the host environment and merges version-controlled configurations into the user's local settings directory.

OS Detection Mechanism

The CLI determines the operating system using Node.js built-in detection in cli-tool/src/index.js. The code checks process.platform against three values:

  • win32 for Windows environments
  • darwin for macOS systems
  • linux for Linux distributions (including WSL)

This detection occurs at lines 32-53 of cli-tool/src/index.js, providing a single source of truth that branches installation logic for path handling and system-specific configuration options.

JSON Configuration Structure

Enterprise settings live as immutable JSON files under cli-tool/components/settings/ in the repository. When you request a setting, the CLI:

  1. Constructs a GitHub raw URL for the specific JSON file (e.g., force-console-login.json) at lines 751-754
  2. Downloads the configuration to ~/.claude/settings/
  3. Resolves OS-dependent fields during the installation loop (lines 874-886) using the same process.platform check

The system treats these as managed assets—they remain version-controlled, auditable, and never contain hardcoded secrets (which should reside in vaults).

Available Enterprise Managed Settings

Claude Code Templates provides pre-built configurations for common enterprise requirements:

Step-by-Step Configuration Guide

Follow this workflow to deploy settings consistently across Windows, macOS, and Linux machines:

  1. Identify the required enterprise policy from the available JSON configurations
  2. Install via the CLI using the --setting flag, which automatically resolves the correct OS branch
  3. Verify platform handling by checking that OS-specific fields (like windowsProxy or linuxProxy) are correctly interpreted
  4. Mirror to internal repositories (optional) by overriding CLI_BASE_URL to point to your private setting catalog
  5. Repeat for additional policies such as authentication requirements or telemetry controls

The installIndividualSetting function in cli-tool/src/index.js handles all platform abstraction—you only need to specify the setting name, and the CLI manages Windows path separators, macOS permission contexts, and Linux configuration locations automatically.

Practical Implementation Examples

Installing a Corporate Proxy on Any Platform

Run this command to deploy proxy settings across your fleet:

npx claude-code-templates@latest --setting api/corporate-proxy

Under the hood, the CLI executes platform-specific logic from cli-tool/src/index.js:

// Simplified platform branching from the installer
if (process.platform === 'win32') {
  // Apply Windows-specific proxy configuration
} else if (process.platform === 'darwin') {
  // Apply macOS network settings
} else {
  // Linux and WSL configuration handling
}

This single command works identically on Windows PowerShell, macOS Terminal, and Linux bash shells.

Creating Machine-Specific Overrides

For development machines requiring custom proxy endpoints:


# Create local settings directory

mkdir -p ~/.claude/settings/api

# Copy the base configuration

cp $(npx claude-code-templates@latest --print-path api/corporate-proxy) \
   ~/.claude/settings/api/corporate-proxy.json

# Add Linux-specific override using jq

jq '.linuxProxy = "http://dev-proxy.corp.local:3128"' \
   ~/.claude/settings/api/corporate-proxy.json > tmp.json && \
   mv tmp.json ~/.claude/settings/api/corporate-proxy.json

Automating Fleet Deployment

Deploy configurations programmatically in Node.js deployment scripts:

import { execSync } from 'child_process';

// Install Vertex AI enterprise configuration
execSync('npx claude-code-templates@latest --setting api/vertex-configuration', {
  stdio: 'inherit',
});

// Disable telemetry across the fleet
execSync('npx claude-code-templates@latest --setting telemetry/disable-telemetry', {
  stdio: 'inherit',
});

Summary

  • cli-tool/src/index.js contains the core logic for detecting Windows (win32), macOS (darwin), and Linux via process.platform
  • Enterprise settings are stored as JSON in cli-tool/components/settings/ and installed to ~/.claude/settings/
  • The installIndividualSetting function automatically handles OS-specific paths and configuration formats
  • Authentication, proxy, Vertex AI, custom headers, and telemetry settings ship as predefined JSON templates
  • Override CLI_BASE_URL to point the CLI at private enterprise repositories instead of the public GitHub source

Frequently Asked Questions

How does the CLI detect which operating system I'm using?

The CLI uses Node.js process.platform detection at lines 32-53 of cli-tool/src/index.js. This returns win32 for Windows, darwin for macOS, and linux for Linux systems (including WSL). The installer uses this value to branch logic for file paths, permission handling, and OS-specific configuration fields.

Can I store these settings in a private repository?

Yes. Set the CLI_BASE_URL environment variable to point to your internal Git repository or CDN endpoint before running the CLI. The tool constructs raw URLs using this base path instead of the default GitHub location, allowing you to maintain enterprise-specific policy forks behind your firewall.

Where are the configuration files stored on each platform?

The CLI writes all settings to ~/.claude/settings/ regardless of platform. On Windows, this resolves to C:\Users\<username>\.claude\settings\; on macOS and Linux, it expands to /home/<username>/.claude/settings/ (or /Users/<username> on macOS). The installer handles path separator differences automatically.

How do I override a specific setting for one developer's machine?

Copy the managed JSON file from the repository to ~/.claude/settings/<category>/<setting-name>.json and edit the values locally. The CLI merges these local files at runtime, with local copies taking precedence over defaults. You can add OS-specific overrides like windowsProxy or linuxProxy directly in the JSON object.

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 →