This file provides guidance to Claude Code when working with this repository.
llm-cli-setup serves two purposes:
- Standalone CLI (
npm start/llm-cli-setup) - interactive menu for developers to install and configure CLI tools - Library (
import from 'llm-cli-setup') - consumed byenvironment-setupto provide CLI tool setup as part of the broader dev environment onboarding
This project has two separate entry points that BOTH need updating when adding features:
| File | Purpose | Who uses it |
|---|---|---|
bin/cli.js |
Standalone CLI menu, --flags, step counter |
Developers running npm start or llm-cli-setup directly |
lib/index.js |
Library exports, configureShellEnv(), CLI_TOOLS array, status display |
environment-setup via import { configureShellEnv } from 'llm-cli-setup' |
lib/index.js contains configureShellEnv() which is what environment-setup calls. This function has its own CLI_TOOLS array with status checks, configure functions, and the tool selection menu. This is SEPARATE from bin/cli.js.
npm install # Install dependencies
npm start # Run the standalone CLI
npm link # Link globally for testing (use in environment-setup: npm link llm-cli-setup)- Interactive menu with tool selection
--flagshortcuts (e.g.,--sql,--gh,--esq)- Full setup wizard with step counter
- Imports individual configure functions from
lib/installers/
- Re-exports all installer functions, status checks, and utilities
- Contains
configureShellEnv()- the main function environment-setup calls - Contains
CLI_TOOLSarray - defines tool status display and selection menu - This is what developers see when they pick "Configure CLI tools" in environment-setup
Each tool has its own module following the same pattern:
findBinary()- locate installed binary (PATH + common locations)is*Installed()/is*Configured()- status checksinstall*()- installation viago installor package managerconfigure*()- interactive setup flow (install prompt, config, status display)
Current tools: sqlcmd.js, gh.js, atl.js, n8n.js, gcx.js, m365.js, esq.js, discord.js, hcloud.js, ovhcloud.js, playwright.js
CLI_DOCS- per-tool documentation map (each entry hasfilename,name,purpose,content)writeDocFiles()- writes individual doc files to~/.<tool>/docs/cli-*.mdgenerateCliToolsBlock()- generates slim routing table pointing to doc filesconfigureLlmTools()- writes doc files and injects routing table into main config- Uses block markers:
<!-- === CLI Tools === -->...<!-- === End CLI Tools === -->
platform.js- package manager detection, command executionshell.js- shell profile detection, block marker operations, file utilities
You must update ALL of these files:
lib/installers/<tool>.js- Create installer module (copyn8n.jsoresq.jsas template)lib/installers/index.js- Add exportslib/index.js- Add to top-level exports AND add entry toCLI_TOOLSarray (status check + configure function)lib/llm/index.js- Add entry toCLI_DOCSmap withfilename,name,purpose, andcontentbin/cli.js- Add import, menu entry,--flag, switch case, full setup step (update step count!)
Missing any of these (especially lib/index.js) will cause the tool to not appear in environment-setup.
- Add entry to
GLOBAL_LLM_TOOLSinlib/llm/index.jswithname,dir, andfile - Add display entry to
SUPPORTED_TOOLSarray - The block marker injection will automatically handle the new tool
Tools installed via go install from private repos (atl, n8n, esq) need:
GOPRIVATE=github.com/enthus-appdev/*- Git SSH config:
url."git@github.com:".insteadOf "https://github.com/" - Repo configurable via env var (e.g.,
ESQ_CLI_REPO)
LLM config is injected between HTML comment markers for safe updates. Consuming packages (e.g., environment-setup) may use their own SEPARATE marker pair for additional internal content.