Getting Started: Using Claude Code with Smarter at NAPL
Goal
We will use Claude Code with Smarter to create a virtual CoPilot coding pair for day-to-day development work at Northern Aurora Power & Light (NAPL). By the end of this tutorial, you will have configured Anthropic as an LLM provider in Smarter, created a LLMClient resource backed by Claude, connected Claude Code to route through Smarter, and verified the full pipeline with a working proof-of-concept prompt.
Prerequisites
This tutorial assumes you already have the following:
A Smarter account (provided by your team lead) and the ability to log in to the Smarter web console
The Smarter CLI (
smarter) installed and authenticated on your workstation — see Smarter CLI documentationClaude Code installed (
npm install -g @anthropic-ai/claude-code)A terminal emulator (PowerShell, bash, or zsh)
gitinstalled and configured with your GitHub credentialsFamiliarity with YAML syntax and command-line tooling
Note
Infrastructure provisioning of the Smarter Kubernetes cluster, IDE integration, and accounting cost-code setup are handled by other teams and are out of scope for this tutorial.
Setup
Before you begin the step-by-step workflow, confirm the following items are ready on your machine.
Verify Smarter CLI connectivity. Run:
smarter version
You should see the server version and your authenticated username. If not, re-authenticate with
smarter login.Verify Claude Code is installed. Run:
claude --version
You should see a version string such as
claude-cli/2.x.x.Obtain an Anthropic API key. Navigate to console.anthropic.com, create an API key for your NAPL project, and store it securely. You will need this key in Step 2 below.
Confirm network access. Your workstation must be able to reach both the NAPL Smarter endpoint and
api.anthropic.com(or the on-premise proxy address provided by the infrastructure team).
Concept Overview
Understanding the following concepts will make the step-by-step section much easier to follow.
Smarter Manifests
Smarter manages all AI resources — llm_clients, plugins, models, users — through YAML manifests. A manifest is a declarative document, inspired by Kubernetes, with four main sections:
apiVersionIdentifies the manifest schema version (e.g.,
smarter.sh/v1).kindThe type of resource (e.g.,
LLMClient,Plugin,User).metadataHuman-readable identifiers:
name,description,version.specThe configuration payload — LLM provider details, prompt settings, functions, plugins, and appearance.
statusRead-only state managed by the Smarter API.
You author manifests locally, then apply them with the Smarter CLI. Smarter reconciles the desired state in the manifest with the actual state of your cloud resources.
LLM Providers in Smarter
Smarter is LLM-provider-agnostic. Out of the box it integrates with
OpenAI, Google, and HuggingFace, among others. Adding a new provider — such as
Anthropic — means telling Smarter how to reach the provider’s API, which model
to use, and what credentials to present. All of this is expressed in the
spec section of a LLMClient manifest.
Key data points Smarter needs for any LLM provider:
Provider name — a label Smarter uses internally (e.g.,
anthropic).Model identifier — the specific model string (e.g.,
claude-sonnet-4-5-20250929).API base URL — the endpoint Smarter calls (e.g.,
https://api.anthropic.com/v1).API key — authentication credential, stored as a Smarter secret.
Default parameters —
temperature,max_tokens, and other tuning knobs surfaced in the manifest’sdefault*fields.
Claude Code
Claude Code is Anthropic’s agentic coding assistant. It runs in your terminal, reads and modifies files in your working directory, executes shell commands, and manages Git workflows — all through natural-language conversation. When routed through Smarter, every Claude Code request benefits from Smarter’s centralized authentication, cost tracking, audit logging, and prompt moderation.
Step-by-Step
Step 1 — Scaffold a LLMClient Manifest
Use the Smarter CLI to generate a blank LLMClient manifest:
smarter manifest llm_client -o yaml > napl-claude-copilot.yaml
This produces a YAML file pre-populated with every available field and sensible defaults. Open it in your editor.
Step 2 — Configure Anthropic as the LLM Provider
Edit napl-claude-copilot.yaml so that the metadata and spec
sections reflect the Anthropic / Claude configuration. Below is a minimal
working example — adjust values to match your NAPL environment:
apiVersion: smarter.sh/v1
kind: LLMClient
metadata:
name: NAPLClaudeCopilot
description: >-
Claude-powered CoPilot for NAPL custom programming.
version: 1.0.0
spec:
# ---- LLM provider settings ----
defaultProvider: anthropic
defaultModel: claude-sonnet-4-5-20250929
defaultTemperature: 0.2
defaultMaxTokens: 4096
# ---- Appearance (optional) ----
appName: NAPL CoPilot
appWelcomeMessage: >-
Welcome to the NAPL Claude CoPilot.
Ask me anything about our codebase.
appExamplePrompts:
- "Refactor the billing module to use async I/O."
- "Write unit tests for the outage-report parser."
- "Explain the legacy VB6 COM bridge in plain English."
# ---- State ----
state: deployed
Important
Do not paste your Anthropic API key directly into the manifest. Smarter manages secrets separately. You will register the key in the next step.
Step 3 — Register Your Anthropic API Key
Store your API key as a Smarter secret so Smarter can authenticate with Anthropic on your behalf:
smarter create secret anthropic-api-key \
--value "sk-ant-XXXXXXXXXXXXXXXXXXXX"
Replace the placeholder with your actual key from
console.anthropic.com.
Step 4 — Apply the Manifest
Deploy your new LLMClient resource:
smarter apply -f napl-claude-copilot.yaml
Smarter will validate the manifest, create the LLMClient, and set its state to
deployed. Confirm with:
smarter get llm_clients
You should see NAPLClaudeCopilot listed with a deployed status.
Step 5 — Point Claude Code at Smarter
Claude Code needs two environment variables to route its requests through Smarter instead of calling Anthropic directly:
export ANTHROPIC_BASE_URL="https://smarter.napl.internal/v1"
export ANTHROPIC_API_KEY="sk-ant-XXXXXXXXXXXXXXXXXXXX"
Tip
For persistence across terminal sessions, add these exports to your shell
profile (~/.bashrc, ~/.zshrc, or your PowerShell $PROFILE).
Smarter acts as an LLM gateway: it receives the Anthropic-formatted request from Claude Code, applies enterprise policies (audit, cost tracking, content moderation), and forwards the call to the Anthropic API.
Step 6 — Verify in the Smarter Web Console
Open the Smarter web console, navigate to your NAPLClaudeCopilot LLMClient,
and enter the Sandbox. Type a test prompt such as:
Explain what a Smarter manifest is in two sentences.
In the Sandbox you can inspect the full request/response cycle — prompt pre-processing, token counts, LLM response, and any function or plugin invocations. This visibility is invaluable during development.
Proof of Concept
With everything wired up, open a terminal in one of your NAPL project repositories and launch Claude Code:
cd ~/repos/napl-billing-service
claude
At the Claude Code prompt, type:
Read the README and summarize what this project does, then suggest three
improvements to the test suite.
Expected result:
Claude Code reads files from your working directory.
The request routes through Smarter (visible in Smarter’s audit log).
Claude responds with a project summary and actionable test-suite recommendations.
Running
smarter logs NAPLClaudeCopilotshows the prompt, token usage, and cost for the interaction.
If you see all of the above, your Claude Code + Smarter integration is fully operational. You are now ready to use Claude as your virtual CoPilot.
Troubleshooting
- “Unable to connect to API (ConnectionRefused)”
Claude Code cannot reach Smarter. Verify
ANTHROPIC_BASE_URLis set correctly. Check that your VPN or network proxy allows traffic to the Smarter endpoint. Runcurl -s $ANTHROPIC_BASE_URL/healthto test connectivity.- “Authentication error” or 401 responses
Your API key may be invalid or the Smarter secret was not created. Re-run
smarter create secret anthropic-api-key --value "..."with a valid key. Also confirm Claude Code’sANTHROPIC_API_KEYmatches what Smarter expects.- Manifest validation fails on apply
Double-check YAML indentation — YAML is whitespace-sensitive. Use the
smarter manifest llm_client -o yamloutput as a reference. EnsureapiVersionissmarter.sh/v1andkindisLLMClient.- Claude Code responds but Smarter shows no logs
Claude Code may be bypassing Smarter and calling Anthropic directly. Confirm
ANTHROPIC_BASE_URLis set in the same terminal session where you launchedclaude. Runenv | grep ANTHROPICto verify.- High latency or timeouts
If Smarter is deployed on-premise, confirm the Kubernetes cluster has adequate resources. Check
smarter statusfor service health. IncreasedefaultMaxTokensonly if needed — larger values increase response time and cost.- “Model not found” error
Verify the model string in your manifest matches a model available on your Anthropic plan. At the time of writing, recommended models include
claude-sonnet-4-5-20250929andclaude-haiku-4-5-20251001. Consult Anthropic’s model documentation for the current list.
Saving Your Work to GitHub
Once your tutorial RST file and any supporting manifests are complete, push them to your fork of the Smarter repository:
cd /path/to/your/smarter-fork
git add .
git commit -m "docs: add Sphinx tutorials for UBC FENT20"
git push
Your work is now synchronized with your remote repository on GitHub.
See also
Created with help from ClaudeAI