Installation

Get up and running with App Config.json in minutes. Choose your language or platform, install the SDK, and start syncing configurations instantly.

📋 Prerequisites

1. Install the SDK

Add the official App Config.json package to your project.

Terminal
npm install @appconfig/json-sdk

2. Initialize in your code

Import and initialize the client with your API key.

index.js
import { AppConfig } from '@appconfig/json-sdk'; const config = new AppConfig({ apiKey: process.env.APP_CONFIG_KEY, environment: 'production', syncInterval: 5000 }); await config.init();

1. Install via Pip

Install the Python client using your preferred package manager.

Terminal
pip install appconfig-json

2. Initialize & Load

Configure the client and fetch your configuration tree.

config_loader.py
from appconfig import Client client = Client( api_key=os.environ['APP_CONFIG_KEY'], env=os.environ.get('APP_ENV', 'development') ) config_data = client.load_sync()

1. Fetch Module

Add the Go module to your project dependencies.

Terminal
go get github.com/appconfig/json-sdk-go/v3

2. Wire it up

Initialize the provider and watch for changes.

main.go
import "github.com/appconfig/json-sdk-go/v3" client := appconfig.New(appconfig.Config{ APIKey: os.Getenv("APP_CONFIG_KEY"), Environment: "staging", }) err := client.Init() if err != nil { log.Fatal("Failed to init config: %v", err) }

1. Install CLI

Use Homebrew, npm, or direct binary download.

Terminal
# macOS / Linux brew install appconfig/tap/appconfig-cli # npm / yarn npm install -g @appconfig/cli

2. Authenticate

Log in to link the CLI to your workspace.

Terminal
appconfig auth login --token $APP_CONFIG_KEY

1. Pull the Agent

Use the official sidecar or init container image.

Terminal
docker pull ghcr.io/appconfig/agent:latest

2. Run as Sidecar

Mount a shared volume to sync configs to your app container.

docker-compose.yml
services: config-agent: image: ghcr.io/appconfig/agent:latest environment: - APP_CONFIG_KEY=your-api-key - APP_ENV=production volumes: - ./config:/shared/config:rw

⚙️ Quick Configuration

After installation, define your environment variables. The SDK will automatically handle fallbacks and hot-reloading.

.env
APP_CONFIG_KEY=ac_live_xxxxxxxxxxxx APP_ENV=production APP_CONFIG_DEBUG=false APP_CONFIG_ENDPOINT=https://api.appconfig.json/v3
config.schema.json
{ "feature_flags": { "enable_dark_mode": true, "max_upload_mb": 25 }, "api": { "rate_limit": 100, "timeout": "5s" } }

🔍 Verify Installation

✔️

Health Check Command

Run this to ensure the SDK is connected and syncing properly.

Terminal
appconfig health --env production # Output: ✅ Connected | Latency: 24ms | Sync: Active

🚀 Next Steps

You're all set! Explore these resources to unlock the full power of App Config.json.

"}