le-claude
v0.1.7
Published
Use Claude Code with France's Albert API — one command, zero config
Maintainers
Readme
le-claude
Use Claude Code with France's Albert API — the government-approved LLM service.
One command. Zero config after first run. Complete privacy.
npx le-claudeWhat is this?
Claude Code is Anthropic's AI coding assistant that runs in your terminal. It normally requires an Anthropic API subscription. le-claude lets you use Claude Code with Albert, the French government's LLM platform operated by DINUM/Etalab, instead.
It works by running a lightweight local translation proxy that converts between the Anthropic API format (which Claude Code speaks) and the OpenAI-compatible API format (which Albert speaks). Everything runs on your machine — no data is sent anywhere except directly to the Albert API.
Prerequisites
- Node.js 22+ — required to run the proxy
- Claude Code — install with:
Verify with# macOS / Linux curl -fsSL https://claude.ai/install.sh | bash # or via Homebrew brew install --cask claude-codeclaude --version. See full install docs. - An Albert API key — see below
Getting an Albert API key
Albert is available to French state public servants (agents de la fonction publique d'État).
- Request access on the Albert website — you will receive your credentials by email within 24 hours
- Once you have your credentials, log in to the Albert playground to generate an API key
- Keep this key safe — you'll need it during setup
If you're unsure about access, contact your organization's IT department or refer to the DINUM documentation.
Quick start
npx le-claudeOn first run, you'll be prompted for your API key and asked to choose a model. Configuration is saved to ~/.config/le-claude/config.json for subsequent runs.
$ npx le-claude
le-claude - Use Claude Code with Albert API
No configuration found. Let's set things up!
Albert API Key: ****
Testing connection... ok
Available models:
1. openai/gpt-oss-120b (text-generation)
Select model [1]: 1
Configuration saved to ~/.config/le-claude/config.json
Starting proxy... ok (port 52341)
Launching Claude Code...Every subsequent run just works:
npx le-claudeMake it a single command
Add an alias to your shell config so you can just type le-claude:
# Add to ~/.bashrc or ~/.zshrc:
alias le-claude="npx le-claude"Then reload your shell (source ~/.zshrc) and from now on:
le-claudeAlternatively, install globally to skip npx entirely:
npm install -g le-claude
le-claudeOptions
npx le-claude [options] [-- claude-args...]
Options:
--setup Configure le-claude (API key and/or default model)
--model Choose which model to use for this session
--debug Enable proxy debug logging
-h, --help Show helpExamples:
npx le-claude --debug # See request/response details
npx le-claude --model # Choose a model for this session
npx le-claude --setup # Change API key or default model
npx le-claude -- -p "Fix the bug" # Pass arguments to Claude CodeHow it works
Claude Code ──[Anthropic API]──▶ Local proxy (127.0.0.1) ──[OpenAI API]──▶ Albert API
◀───────────────── (translates between formats) ◀──────────────le-claude starts a translation proxy on a random localhost port, then launches Claude Code pointed at it. The proxy translates:
- Requests: Anthropic Messages format → OpenAI Chat Completions format
- Responses: OpenAI format → Anthropic format (including streaming SSE)
- Tool use: Full bidirectional translation of tool definitions and tool calls
When Claude Code exits, the proxy stops automatically.
Security
- Localhost only — the proxy binds to
127.0.0.1, never exposed to the network - No data logging — message content and API keys are never logged (even in debug mode, content is truncated)
- Zero dependencies — no npm packages, no supply chain risk. Pure Node.js builtins
- Your API key is stored in
~/.config/le-claude/config.jsonwith600permissions (owner-only read) - Direct connection — your data goes from your machine straight to Albert API. Nothing in between
- SecNumCloud certification — Albert API ensures all data are processed in a secure cloud environment
Important notes
- Claude Code is designed for Claude models. The experience with other models depends on their capability with structured tool calling and complex system prompts
- Some Claude Code features that rely on Claude-specific capabilities may not work with all Albert models
- This is an unofficial community tool, not endorsed by Anthropic or DINUM
License
MIT
