Skip to content

JacKane21/claude-profiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Profiler

Terminal launcher for claude with saved profiles, provider presets, and an Anthropic-to-OpenAI-compatible proxy.

Install

Requirements:

  • Rust stable
  • claude available in PATH
cargo install --path .
claude-profiler

Config Files

Profiles are stored in:

  • macOS: ~/Library/Application Support/claude-profiler/profiles.toml
  • Linux: ~/.config/claude-profiler/profiles.toml
  • Windows: %APPDATA%\claude-profiler\profiles.toml

Other files in the same directory:

  • openai-oauth.json: cached ChatGPT OAuth tokens
  • cache/: cached Codex instructions

The file is created automatically on first run. You can edit profiles in the UI or directly in profiles.toml.

Built-In Profiles

These are templates. Replace placeholder API keys before use.

Profile Purpose Current default models
default Use your existing shell environment whatever claude already sees
zai Direct Z.ai Anthropic-compatible endpoint glm-5-turbo, glm-5, glm-5.1
minimax Direct MiniMax Anthropic-compatible endpoint MiniMax-M2.7
OpenRouter Direct OpenRouter endpoint openai/gpt-5.4-mini, openai/gpt-5.4
OpenAI Codex OAuth ChatGPT OAuth + Codex backend proxy gpt-5.4, gpt-5.4-mini
custom example Example OpenAI-compatible proxy profile local-model

Models

Model values are just env vars. You can change them in the UI or directly in profiles.toml.

Main model-related variables:

Variable Meaning
ANTHROPIC_DEFAULT_HAIKU_MODEL Claude Haiku slot
ANTHROPIC_DEFAULT_SONNET_MODEL Claude Sonnet slot
ANTHROPIC_DEFAULT_OPUS_MODEL Claude Opus slot
ANTHROPIC_MODEL Fallback model / proxy override
ANTHROPIC_SMALL_FAST_MODEL Auxiliary model for lightweight proxy requests

Anthropic Models

If you are using Anthropic directly, current Claude model aliases are:

Slot Current example
Haiku claude-haiku-4-5
Sonnet claude-sonnet-4-6
Opus claude-opus-4-6

Example mapping:

ANTHROPIC_DEFAULT_HAIKU_MODEL = "claude-haiku-4-5"
ANTHROPIC_DEFAULT_SONNET_MODEL = "claude-sonnet-4-6"
ANTHROPIC_DEFAULT_OPUS_MODEL = "claude-opus-4-6"

Codex Models

The Codex profile currently defaults to:

  • main model: gpt-5.4
  • auxiliary model: gpt-5.4-mini

The in-app Codex model picker prefers the current set first:

  • gpt-5.4
  • gpt-5.4-mini
  • gpt-5.3-codex

It also includes the current older/live fallback set:

  • gpt-5.2
  • gpt-5.2-codex
  • gpt-5.1
  • gpt-5.1-codex
  • gpt-5.1-codex-max
  • gpt-5.1-codex-mini
  • gpt-5
  • gpt-5-codex
  • gpt-5-codex-mini

Reasoning suffixes are generated from the live Codex capability set, including minimal where supported.

Codex Fast Mode

Set this on the Codex profile to request fast mode:

SERVICE_TIER = "fast"

You can set this directly in profiles.toml or in the TUI profile editor. The proxy only sends fast mode for models that currently support it, and maps it to the upstream Responses API service tier used by the Codex backend.

Proxy Setup

Set PROXY_TARGET_URL to any OpenAI-compatible target to enable the local proxy.

Accepted forms:

  • base URL like http://localhost:1234/v1
  • full endpoint ending in /responses
  • full endpoint ending in /chat/completions
  • full endpoint ending in /completions

When enabled, Claude is pointed at:

  • http://localhost:4000/anthropic

Main proxy variables:

Variable Meaning
PROXY_TARGET_URL Upstream OpenAI-compatible base URL or endpoint
ANTHROPIC_AUTH_TOKEN Upstream API key or bearer token
OPENAI_OAUTH Enable ChatGPT OAuth for Codex
SERVICE_TIER Optional Responses service tier
API_TIMEOUT_MS Passed through to claude

Codex OAuth

The OpenAI Codex OAuth profile:

  • opens a browser on first use
  • listens on http://localhost:1455/auth/callback
  • stores tokens in openai-oauth.json

Key Bindings

Normal mode:

  • j / k or Up / Down: move
  • Enter: launch selected profile
  • e: edit profile
  • n: new profile
  • d: delete profile
  • r: reset profile, or clear Codex OAuth tokens
  • R: reset all profiles and tokens
  • ?: help
  • q or Esc: quit

Edit mode:

  • Tab / Shift+Tab or Up / Down: move fields
  • Ctrl+G: toggle API key visibility
  • Enter: save, or open Codex model picker on model fields
  • Esc: cancel

Model picker:

  • j / k or Up / Down: move
  • Enter: select
  • Esc: cancel

Troubleshooting

  • claude not found: install Claude Code and ensure it is in PATH
  • proxy does not start: check whether 127.0.0.1:4000 is already in use
  • Codex OAuth hangs: make sure http://localhost:1455/auth/callback is reachable locally
  • wrong models: update the model env vars in the profile instead of relying on old saved mappings
  • r on a Codex profile clears OAuth tokens; R resets everything

Security

See SECURITY.md.

License

MIT. See LICENSE.

About

Simple TUI for launching Claude Code with saved and configurable profiles and a built-in universal proxy for any endpoint (responses, completions, local, etc.)

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages