Claude Code with Smarter: Adding Anthropic and Getting Started
Northern Aurora Power & Light (NAPL) — Custom Programming Area
This tutorial covers two things in one place: how to register Anthropic as an LLM provider in Smarter, and how NAPL programmers get up and running with Claude Code as a virtual CoPilot pair-programming partner.
Part 1 — Adding Anthropic as an LLM Provider
Goal
Register Anthropic and its claude-sonnet-4-6 model in the Smarter
platform so that Claude Code is available as a managed LLM resource for
all NAPL developers.
Note
Anthropic is one of the officially supported “legacy” providers in Smarter and is stable. The steps below apply equally to any new third-party provider you may want to onboard in the future.
Prerequisites
The Smarter platform is installed and reachable (see the Smarter Installation Guide).
The Smarter CLI (
smarter) is installed and configured. Verify with:smarter version smarter whoami
You hold a Smarter Account with provider-management permissions.
You have an Anthropic API key (
sk-ant-…). Obtain one at console.anthropic.com.
Overview
Adding a provider involves three Smarter resources, applied in order:
Secret — stores your Anthropic API key securely.
Provider — registers Anthropic as an LLM provider and links it to the Secret.
ProviderModel — registers
claude-sonnet-4-6as the default model.
All resources are declared as YAML manifest files and applied with
smarter apply.
Step 1 — Create the API Key Secret
Create a file named anthropic-secret.yaml:
apiVersion: smarter.sh/v1
kind: Secret
metadata:
name: anthropic-api-key
description: Anthropic API key for Claude models
version: 1.0.0
tags:
- anthropic
- llm
spec:
config:
description: "Production Anthropic API key. Keep this value private."
value: sk-ant-YOUR_API_KEY_HERE # replace with your real key
Apply it:
smarter apply -f anthropic-secret.yaml
Warning
Never commit a manifest that contains a real API key to version control. Use an environment variable or a secrets-management tool to substitute the value at apply time.
Step 2 — Create the Provider Manifest
Create a file named anthropic-provider.yaml:
apiVersion: smarter.sh/v1
kind: Provider
metadata:
name: Anthropic
description: >
Anthropic PBC — AI safety company and maker of the Claude family of
large language models.
version: 1.0.0
tags:
- anthropic
- claude
- llm
spec:
base_url: https://api.anthropic.com
connectivity_test_path: /v1/models
website_url: https://www.anthropic.com
docs_url: https://docs.anthropic.com
contact_email: support@anthropic.com
support_email: support@anthropic.com
terms_of_service_url: https://www.anthropic.com/legal/terms
privacy_policy_url: https://www.anthropic.com/legal/privacy
api_key: anthropic-api-key # references the Secret created above
Apply it:
smarter apply -f anthropic-provider.yaml
After applying, Smarter runs automated verification checks (API connectivity, contact email, ToS URL, etc.). Confirm the provider is verified:
smarter describe provider Anthropic
Step 3 — Register the Claude Code Model
Create a file named anthropic-claude-code-model.yaml:
apiVersion: smarter.sh/v1
kind: ProviderModel
metadata:
name: claude-sonnet-4-6
description: >
Claude Sonnet 4.6 — the model powering Claude Code.
Optimised for agentic coding tasks, tool use, and long-context
reasoning.
version: 1.0.0
spec:
provider: Anthropic
is_default: true
max_completion_tokens: 8096
temperature: 1.0
top_p: 1.0
supports_text_input: true
supports_text_generation: true
supports_streaming: true
supports_tools: true
supports_summarization: true
supports_translation: true
supports_image_input: false
supports_audio_input: false
supports_embedding: false
supports_fine_tuning: false
supports_search: false
supports_code_interpreter: true
supports_image_generation: false
supports_audio_generation: false
Apply it:
smarter apply -f anthropic-claude-code-model.yaml
Step 4 — Verify the Full Provider Setup
List all registered providers to confirm Anthropic appears:
smarter get providers
Inspect the Anthropic provider in detail:
smarter describe provider Anthropic -o yaml
List models registered under Anthropic:
smarter get providers Anthropic models
The describe command should return a status block showing:
status:
is_active: true
is_verified: true
status: verified
Troubleshooting (Provider)
Symptom |
Resolution |
|---|---|
|
Check that |
|
Apply |
|
The API key may be inactive. Rotate the key in the Anthropic console
and update the Secret: |
Provider stuck at |
Verification runs asynchronously. Wait 60 seconds, then re-run
|
Part 2 — Getting Started: Claude Code for NAPL Programmers
Goal
Use Claude Code with the NAPL Smarter platform to create an AI-assisted coding environment in which every developer has a virtual CoPilot pair-programming partner powered by Anthropic’s Claude family of models.
By the end of this section you will:
Connect your local development environment to the NAPL Smarter instance.
Verify that Anthropic / Claude Code is available as a provider.
Deploy a personal LLMClient and chat with Claude Code from the terminal.
Prerequisites
You are assumed to be comfortable with:
The Unix/Windows command line and basic shell scripting.
A code editor — VS Code is recommended; install the Smarter Manifest Extension for YAML syntax highlighting.
gitbasics (clone, commit, push).REST APIs — knowing what a base URL and API key are is sufficient.
You do not need prior Kubernetes or cloud infrastructure experience. The infrastructure team has already deployed Smarter; your job is to connect to it.
Setup
Obtain your Smarter account credentials
Your manager or the Smarter platform administrator will provide:
The NAPL Smarter API endpoint URL (e.g.,
https://smarter.napl.internal).Your personal Smarter API key (a long alphanumeric string).
Install the Smarter CLI
Follow the instructions at smarter.sh/cli for your operating system (Windows, macOS, or Linux).
Confirm the install:
smarter versionConfigure the CLI
smarter configureWhen prompted, enter:
API key — your personal Smarter API key.
Environment —
prod(default; only change if told otherwise by IT).
This writes
~/.smarter/config.yaml. Verify it works:smarter whoamiYou should see your NAPL user name and account details.
Install Claude Code (optional local client)
Claude Code is Anthropic’s AI coding assistant CLI. Install it globally via npm:
npm install -g @anthropic-ai/claude-code
Point it at your Smarter instance so requests route through the corporate platform instead of directly to Anthropic:
export ANTHROPIC_BASE_URL=https://smarter.napl.internal/api/v1/anthropic export ANTHROPIC_API_KEY=<your-smarter-api-key>
Add these exports to your
~/.bashrcor~/.zshrcto make them permanent.
Concept Overview
Smarter is an enterprise-grade, on-premise LLM hosting and orchestration platform. Before using Claude Code you should understand four core ideas:
Smarter API Manifests (SAM)
All Smarter resources — providers, llm_clients, plugins, secrets — are declared as human-readable YAML manifest files (think Kubernetes manifests). You apply them with the CLI:
smarter apply -f my-manifest.yaml
The kind field selects the resource type:
Secret, Provider, ProviderModel, LLMClient, Plugin, etc.
Providers and Models
A Provider represents a third-party LLM API (e.g., Anthropic).
A ProviderModel is a specific model offered by that provider
(e.g., claude-sonnet-4-6). Smarter stores the API credentials in a
Secret resource so they are never hard-coded in application code.
The Smarter CLI
The CLI uses a verb-noun pattern identical to kubectl:
smarter [command] [resource] [name] [flags]
Key commands you will use daily:
smarter apply -f <file>— create or update a resource.smarter get providers— list available LLM providers.smarter describe provider Anthropic— inspect a provider.smarter chat <llm_client-name>— start an interactive chat session.
Claude Code and Smarter
Claude Code is Anthropic’s terminal-native AI coding assistant. When integrated with Smarter it routes all LLM requests through the corporate Smarter instance. This means:
API key management is centralised — you use your Smarter key, not a personal Anthropic key.
Cost tracking is automatic — token consumption is billed against NAPL’s cost codes, not individual employee accounts.
Access control is enforced — the platform team can grant, revoke, or rate-limit access without touching individual workstations.
Step-by-Step
Step 1 — Verify Anthropic is Available
Confirm the IT team has already registered Anthropic as a provider:
smarter get providers
Expected output (abbreviated):
NAME STATUS VERIFIED
Anthropic active true
OpenAI active true
If Anthropic is missing or not verified, contact the platform team and
reference Part 1 of this tutorial.
Step 2 — Inspect the Claude Code Model
smarter describe provider Anthropic -o yaml
Look for claude-sonnet-4-6 in the models list. Note the
is_default flag — this is the model used unless you specify another.
Step 3 — Generate a LLMClient Manifest
Use the CLI to scaffold a LLMClient manifest pre-filled with defaults:
smarter manifest llm_client -o yaml > my-claude-llm_client.yaml
Open my-claude-llm_client.yaml in your editor and update the key fields:
apiVersion: smarter.sh/v1
kind: LLMClient
metadata:
name: my-claude-llm_client
description: Personal Claude Code llm_client for NAPL dev work
version: 1.0.0
spec:
provider: Anthropic
model: claude-sonnet-4-6
system_prompt: >
You are an expert software engineer helping NAPL developers write
clean, secure, and well-documented code. Prefer Python and follow
PEP 8. Always explain what changed and why.
Step 4 — Apply and Deploy the LLMClient
smarter apply -f my-claude-llm_client.yaml
smarter deploy llm_client my-claude-llm_client
Confirm it was created:
smarter get llm_clients
Step 5 — Chat with Claude Code
Start an interactive terminal session:
smarter chat my-claude-llm_client
Type a prompt to test:
> Write a Python function that reads a CSV file and returns a list of dicts.
You should receive a complete, working code snippet from Claude.
For day-to-day coding, start Claude Code directly in your project directory (after setting the environment variables from Setup step 4):
cd ~/my-project
claude
Proof of Concept
A successful integration produces output like this when you run
smarter chat my-claude-llm_client and send a test prompt:
You: Write a one-line Python function that returns True if a number is even.
Claude: is_even = lambda n: n % 2 == 0
You can also verify platform health with:
smarter status
Troubleshooting
Symptom |
Resolution |
|---|---|
|
Re-run |
|
The provider has not been registered. Contact the platform admin and reference Part 1 of this tutorial. |
|
The model manifest may not have been applied. Ask the admin to run
|
LLMClient applies but |
Check your network route to the Smarter endpoint. Run
|
Claude Code CLI says |
Add the export lines from Setup step 4 to your shell profile and
restart the terminal, or run |
Responses are slow or time out |
This is normal under heavy platform load. Contact the platform team if latency exceeds 30 seconds consistently. |