DEV Community

CodeKing
CodeKing

Posted on

"I Got Tired of Rewriting 4 AI CLI Config Files. So I Put Setup Behind One Button"

I like trying new AI coding tools.

I do not like reconfiguring them.

That was the part that kept getting old: every new CLI came with a different config file, different base URL setting, and a different way to point it at my local gateway.

After doing this a few too many times, I added a small feature to CliGate: a dashboard page that can install and configure the tools for me.

The annoying part

The tools are similar, but the setup is not:

  • Claude Code wants env vars
  • Codex wants ~/.codex/config.toml
  • Gemini CLI has its own proxy setup path
  • OpenClaw wants a JSON provider config

That means one simple goal:

"Point all of them at localhost:8081"

turns into four different setup chores.

What I changed

CliGate now has a Tools page that does two jobs:

  1. detect whether Node.js and the CLI tools are installed
  2. write the proxy config for each tool from the same UI

The code behind it is pretty direct.

The installer knows the official npm package for each tool:

codex: {
  name: 'Codex CLI',
  command: 'codex',
  npmPackage: '@openai/codex'
}
Enter fullscreen mode Exit fullscreen mode

and the dashboard exposes actions like:

await this.api('/codex/config/proxy', { method: 'POST' });
await this.api('/api/tools/install/codex', { method: 'POST' });
Enter fullscreen mode Exit fullscreen mode

So instead of editing files manually, I can open the panel, click install if a tool is missing, then click configure.

The part I wanted most

I did not want a generic "tool manager."

I wanted a very specific workflow:

  • install Claude Code, Codex, Gemini CLI, or OpenClaw
  • point each one at the same local gateway
  • launch the tool without leaving the dashboard

That is what the page does now.

For example, the Codex side boils down to these settings:

chatgpt_base_url = "http://localhost:8081/backend-api/"
openai_base_url = "http://localhost:8081"
Enter fullscreen mode Exit fullscreen mode

Claude Code gets its localhost base URL, Gemini CLI gets patched for proxy mode, and OpenClaw gets its provider block written with the same target.

Why this is better than another README section

I already had setup docs.

The problem was not missing information. The problem was repetition.

Every time I switched machines, reset a config, or wanted to try another CLI, I was doing the same boring setup work again.

Once I moved that into the product, the project became easier to try and easier to keep using.

Who this is actually for

If you use one tool with one API key, this is probably unnecessary.

If you keep bouncing between Claude Code, Codex, Gemini CLI, or OpenClaw, the friction adds up fast. That is the use case this page fixes.

If you've built a similar setup layer for AI tooling, I'm curious what you automated first: install, auth, config, or routing.

Top comments (0)