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

> Easily configure enterprise managed settings across Windows macOS and Linux with Claude Code Templates. Automate proxy authentication and telemetry settings for your organization. Simplify deployment now.

- Repository: [Daniel Avila/claude-code-templates](https://github.com/davila7/claude-code-templates)
- Tags: how-to-guide
- Published: 2026-04-26

---

**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`](https://github.com/davila7/claude-code-templates/blob/main/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`](https://github.com/davila7/claude-code-templates/blob/main/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`](https://github.com/davila7/claude-code-templates/blob/main/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:

- **[`authentication/force-console-login.json`](https://github.com/davila7/claude-code-templates/blob/main/authentication/force-console-login.json)** — Forces usage through Anthropic Console accounts to enable enterprise-wide billing and access control
- **[`api/corporate-proxy.json`](https://github.com/davila7/claude-code-templates/blob/main/api/corporate-proxy.json)** — Routes all Claude Code requests through corporate proxy servers to maintain firewall compliance  
- **[`api/vertex-configuration.json`](https://github.com/davila7/claude-code-templates/blob/main/api/vertex-configuration.json)** — Connects to Google Vertex AI with enterprise-scale billing and security defaults
- **[`api/custom-headers.json`](https://github.com/davila7/claude-code-templates/blob/main/api/custom-headers.json)** — Injects organization-specific headers (SAML, API gateway tokens) into every request
- **[`telemetry/enable-telemetry.json`](https://github.com/davila7/claude-code-templates/blob/main/telemetry/enable-telemetry.json)** and **[`telemetry/disable-telemetry.json`](https://github.com/davila7/claude-code-templates/blob/main/telemetry/disable-telemetry.json)** — Controls usage telemetry collection across the entire fleet

## 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`](https://github.com/davila7/claude-code-templates/blob/main/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:

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

```

Under the hood, the CLI executes platform-specific logic from [`cli-tool/src/index.js`](https://github.com/davila7/claude-code-templates/blob/main/cli-tool/src/index.js):

```javascript
// 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:

```bash

# 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:

```javascript
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`](https://github.com/davila7/claude-code-templates/blob/main/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`](https://github.com/davila7/claude-code-templates/blob/main/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.