Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 36 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@ A CLI tool to set up developer tools and teach your AI coding assistants how to

## What This Does

1. **Installs CLI tools**: sqlcmd, GitHub CLI (gh), Atlassian CLI (atl), n8nctl, grafanactl, logcli, m365, esq, discordctl, playwright, hcloud
1. **Installs CLI tools**: sqlcmd, GitHub CLI (gh), Atlassian CLI (atl), n8nctl, gcx, m365, esq, discordctl, playwright, hcloud
2. **Configures sqlcmd contexts**: Named contexts for switching between database environments
3. **Teaches your AI assistants**: Injects CLI documentation into Claude Code, Antigravity, and Codex configs

| Tool | Purpose |
| -------------- | -------------------------------------------------------------- |
| **sqlcmd** | Microsoft SQL Server command-line tool with context management |
| **gh** | GitHub CLI for PR/issue management |
| **atl** | Atlassian CLI for Jira/Confluence |
| **n8nctl** | n8n workflow automation CLI |
| **grafanactl** | Grafana CLI for dashboard/resource management |
| **logcli** | Loki CLI for querying Grafana Loki logs |
| **m365** | Microsoft 365 CLI for SharePoint/Teams/OneDrive management |
| **esq** | Elasticsearch Query CLI for cross-environment cluster queries |
| **discordctl** | Discord CLI for REST API interactions (messages, reactions) |
| **playwright** | Browser automation for screenshots, PDFs, and web testing |
| **hcloud** | Hetzner Cloud CLI for servers, networks, volumes, firewalls |
| Tool | Purpose |
| -------------- | ----------------------------------------------------------------------------------- |
| **sqlcmd** | Microsoft SQL Server command-line tool with context management |
| **gh** | GitHub CLI for PR/issue management |
| **atl** | Atlassian CLI for Jira/Confluence |
| **n8nctl** | n8n workflow automation CLI |
| **gcx** | Unified Grafana Cloud CLI (dashboards, resources, metrics, logs, traces, SLOs, IRM) |
| **m365** | Microsoft 365 CLI for SharePoint/Teams/OneDrive management |
| **esq** | Elasticsearch Query CLI for cross-environment cluster queries |
| **discordctl** | Discord CLI for REST API interactions (messages, reactions) |
| **playwright** | Browser automation for screenshots, PDFs, and web testing |
| **hcloud** | Hetzner Cloud CLI for servers, networks, volumes, firewalls |

## Repository Overrides

Expand All @@ -34,6 +33,8 @@ export DISCORD_CLI_REPO="your-org/discordctl" # Default: enthus-appdev/discor
export DISCORD_CLI_DIR="/path/to/discordctl" # Default: ~/dev/discordctl
```

gcx installs from [grafana/gcx](https://github.com/grafana/gcx) GitHub releases by default. Override with `GCX_REPO` if needed. It is installed via a prebuilt binary download (no Go toolchain required).

The Go-based tools (atl, n8nctl, esq) are installed via `go install`. discordctl is installed via `npm link` from a local clone.

## Quick Start
Expand Down Expand Up @@ -63,8 +64,7 @@ llm-cli-setup --sql # Configure SQL tools only
llm-cli-setup --gh # Configure GitHub CLI only
llm-cli-setup --atl # Configure Atlassian CLI only
llm-cli-setup --n8n # Configure n8n CLI only
llm-cli-setup --grafana # Configure Grafana CLI only
llm-cli-setup --logcli # Configure Loki CLI only
llm-cli-setup --gcx # Configure Grafana Cloud CLI (gcx) only
llm-cli-setup --m365 # Configure Microsoft 365 CLI only
llm-cli-setup --esq # Configure Elasticsearch CLI only
llm-cli-setup --discord # Configure Discord CLI only
Expand Down Expand Up @@ -131,31 +131,19 @@ n8nctl variable list # List variables
n8nctl variable create k --value 'v' # Create (--value avoids shell expansion)
```

### Grafana CLI (grafanactl)
### Grafana Cloud CLI (gcx)

Requires Grafana 12+. Installs via `go install` or binary download.
Installs the latest [gcx](https://github.com/grafana/gcx) release binary from GitHub (no Go toolchain required). gcx is the unified Grafana Cloud CLI and replaces the old `grafanactl` (Grafana) and `logcli` (Loki) CLIs.

```bash
grafanactl config check # Verify configuration
grafanactl config use-context prod # Switch context
grafanactl resources list # List resource types
grafanactl resources get dashboards # Get all dashboards
grafanactl resources pull dashboards -o ./dashboards/ # Backup
grafanactl resources push ./dashboards/ # Restore
```

### Loki CLI (logcli)

Installs from [grafana/loki](https://github.com/grafana/loki) GitHub releases.

```bash
# Set up environment variables
export LOKI_ADDR="<GRAFANA_URL>/api/datasources/proxy/<DATASOURCE_ID>"
export LOKI_BEARER_TOKEN="<GRAFANA_TOKEN>"

# Query logs
logcli labels k8s_deployment_name
logcli query '{k8s_deployment_name="myapp"}' --limit=20 --since=1h
gcx --version # Show version
gcx login prod --server <url> # Log in (browser OAuth) & create context
gcx config check # Verify configuration
gcx config use-context prod # Switch context
gcx resources list-types # List resource types
gcx logs query '{service_name="myapp"}' --since=1h # Query Loki logs
gcx metrics query 'rate(http_requests_total[5m])' # Query Prometheus
gcx dashboards list # List dashboards
```

### Microsoft 365 CLI (m365)
Expand Down Expand Up @@ -211,7 +199,7 @@ This tool teaches your AI coding assistants how to use these CLI tools by inject

The documentation includes:

- Command syntax and examples for sqlcmd, gh, atl, n8nctl, grafanactl, logcli, m365, esq, discordctl, playwright, and hcloud
- Command syntax and examples for sqlcmd, gh, atl, n8nctl, gcx, m365, esq, discordctl, playwright, and hcloud
- Safety guidelines (e.g., confirm before SQL writes)
- Formatting guides (Jira wiki markup, Confluence HTML)

Expand All @@ -237,8 +225,7 @@ llm-cli-setup/
│ │ ├── gh.js # GitHub CLI setup
│ │ ├── atl.js # Atlassian CLI setup
│ │ ├── n8n.js # n8n CLI setup
│ │ ├── grafanactl.js # Grafana CLI setup
│ │ ├── logcli.js # Loki CLI setup
│ │ ├── gcx.js # Grafana Cloud CLI setup
│ │ ├── m365.js # Microsoft 365 CLI setup
│ │ ├── esq.js # Elasticsearch Query CLI setup
│ │ └── discord.js # Discord CLI setup
Expand Down Expand Up @@ -269,9 +256,15 @@ npm start # Run the CLI

First-time users must run `atl auth setup` before `atl auth login`. This creates the OAuth app configuration.

### Go binaries not in PATH
### gcx binary not in PATH

gcx installs to `~/.local/bin`. Add to your shell profile if not already on PATH:

```bash
export PATH="$PATH:$HOME/.local/bin"
```

All Go-based tools (atl, n8nctl, grafanactl) install to `~/go/bin`. Add to your shell profile:
The Go-based tools (atl, n8nctl, esq) install to `~/go/bin`:

```bash
export PATH="$PATH:$HOME/go/bin"
Expand Down
69 changes: 28 additions & 41 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { installSqlcmd, configureSqlEnv } from '../lib/installers/sqlcmd.js';
import { configureGitHubCli } from '../lib/installers/gh.js';
import { configureAtlassianCli } from '../lib/installers/atl.js';
import { configureN8nCli } from '../lib/installers/n8n.js';
import { configureGrafanaCli } from '../lib/installers/grafanactl.js';
import { configureLogcli } from '../lib/installers/logcli.js';
import { configureGcx } from '../lib/installers/gcx.js';
import { configureM365Cli } from '../lib/installers/m365.js';
import { configureEsqCli } from '../lib/installers/esq.js';
import { configureDiscordCli } from '../lib/installers/discord.js';
Expand Down Expand Up @@ -59,52 +58,48 @@ const runFullSetup = async () => {
console.log(chalk.gray('This will configure all CLI tools and LLM integrations.\n'));

// Step 1: sqlcmd
console.log(chalk.cyan.bold('\n[1/12] SQL Server Tools'));
console.log(chalk.cyan.bold('\n[1/11] SQL Server Tools'));
await installSqlcmd();
await configureSqlEnv();

// Step 2: GitHub CLI
console.log(chalk.cyan.bold('\n[2/12] GitHub CLI'));
console.log(chalk.cyan.bold('\n[2/11] GitHub CLI'));
await configureGitHubCli();

// Step 3: Atlassian CLI
console.log(chalk.cyan.bold('\n[3/12] Atlassian CLI'));
console.log(chalk.cyan.bold('\n[3/11] Atlassian CLI'));
await configureAtlassianCli();

// Step 4: n8n CLI
console.log(chalk.cyan.bold('\n[4/12] n8n CLI'));
console.log(chalk.cyan.bold('\n[4/11] n8n CLI'));
await configureN8nCli();

// Step 5: Grafana CLI
console.log(chalk.cyan.bold('\n[5/12] Grafana CLI'));
await configureGrafanaCli();
// Step 5: Grafana Cloud CLI
console.log(chalk.cyan.bold('\n[5/11] Grafana Cloud CLI (gcx)'));
await configureGcx();

// Step 6: Loki CLI
console.log(chalk.cyan.bold('\n[6/12] Loki CLI'));
await configureLogcli();

// Step 7: Microsoft 365 CLI
console.log(chalk.cyan.bold('\n[7/12] Microsoft 365 CLI'));
// Step 6: Microsoft 365 CLI
console.log(chalk.cyan.bold('\n[6/11] Microsoft 365 CLI'));
await configureM365Cli();

// Step 8: Elasticsearch Query CLI
console.log(chalk.cyan.bold('\n[8/12] Elasticsearch Query CLI'));
// Step 7: Elasticsearch Query CLI
console.log(chalk.cyan.bold('\n[7/11] Elasticsearch Query CLI'));
await configureEsqCli();

// Step 9: Discord CLI
console.log(chalk.cyan.bold('\n[9/12] Discord CLI'));
// Step 8: Discord CLI
console.log(chalk.cyan.bold('\n[8/11] Discord CLI'));
await configureDiscordCli();

// Step 10: Playwright
console.log(chalk.cyan.bold('\n[10/12] Playwright'));
// Step 9: Playwright
console.log(chalk.cyan.bold('\n[9/11] Playwright'));
await configurePlaywright();

// Step 11: Hetzner Cloud CLI
console.log(chalk.cyan.bold('\n[11/12] Hetzner Cloud CLI'));
// Step 10: Hetzner Cloud CLI
console.log(chalk.cyan.bold('\n[10/11] Hetzner Cloud CLI'));
await configureHcloudCli();

// Step 12: LLM Configuration
console.log(chalk.cyan.bold('\n[12/12] LLM Configuration'));
// Step 11: LLM Configuration
console.log(chalk.cyan.bold('\n[11/11] LLM Configuration'));
await configureLlmTools();

// Final summary
Expand All @@ -127,8 +122,7 @@ const runMenu = async () => {
{ name: '🐙 Configure GitHub CLI', value: 'gh' },
{ name: '📋 Configure Atlassian CLI', value: 'atl' },
{ name: '🔄 Configure n8n CLI', value: 'n8n' },
{ name: '📊 Configure Grafana CLI', value: 'grafana' },
{ name: '📜 Configure Loki CLI (logcli)', value: 'logcli' },
{ name: '📊 Configure Grafana Cloud CLI (gcx)', value: 'gcx' },
{ name: '☁️ Configure Microsoft 365 CLI', value: 'm365' },
{ name: '🔍 Configure Elasticsearch CLI (esq)', value: 'esq' },
{ name: '💬 Configure Discord CLI', value: 'discord' },
Expand Down Expand Up @@ -159,11 +153,8 @@ const runMenu = async () => {
case 'n8n':
await configureN8nCli();
break;
case 'grafana':
await configureGrafanaCli();
break;
case 'logcli':
await configureLogcli();
case 'gcx':
await configureGcx();
break;
case 'm365':
await configureM365Cli();
Expand Down Expand Up @@ -238,9 +229,8 @@ ${chalk.bold('Usage:')}
llm-cli-setup --gh Configure GitHub CLI only
llm-cli-setup --atl Configure Atlassian CLI only
llm-cli-setup --n8n Configure n8n CLI only
llm-cli-setup --grafana Configure Grafana CLI only
llm-cli-setup --logcli Configure Loki CLI only
llm-cli-setup --m365 Configure Microsoft 365 CLI only
llm-cli-setup --gcx Configure Grafana Cloud CLI (gcx) only
llm-cli-setup --m365 Configure Microsoft 365 CLI only
llm-cli-setup --esq Configure Elasticsearch CLI only
llm-cli-setup --discord Configure Discord CLI only
llm-cli-setup --playwright Configure Playwright only
Expand All @@ -265,8 +255,7 @@ ${chalk.bold('Options:')}
gh: args.includes('--gh'),
atl: args.includes('--atl'),
n8n: args.includes('--n8n'),
grafana: args.includes('--grafana'),
logcli: args.includes('--logcli'),
gcx: args.includes('--gcx'),
m365: args.includes('--m365'),
esq: args.includes('--esq'),
discord: args.includes('--discord'),
Expand Down Expand Up @@ -297,10 +286,8 @@ const main = async () => {
await configureAtlassianCli();
} else if (args.n8n) {
await configureN8nCli();
} else if (args.grafana) {
await configureGrafanaCli();
} else if (args.logcli) {
await configureLogcli();
} else if (args.gcx) {
await configureGcx();
} else if (args.m365) {
await configureM365Cli();
} else if (args.esq) {
Expand Down
37 changes: 12 additions & 25 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ export {
isN8nInstalled,
isN8nConfigured,
N8N_CLI_REPO,
configureGrafanaCli,
isGrafanactlInstalled,
isGrafanactlConfigured,
getCurrentContext as getGrafanaContext,
configureLogcli,
isLogcliInstalled,
configureGcx,
isGcxInstalled,
isGcxConfigured,
getCurrentContext as getGcxContext,
configureM365Cli,
isM365Installed,
isM365Authenticated,
Expand Down Expand Up @@ -95,12 +93,10 @@ import {
isN8nInstalled,
isN8nConfigured,
getCurrentInstance,
configureGrafanaCli,
isGrafanactlInstalled,
isGrafanactlConfigured,
configureGcx,
isGcxInstalled,
isGcxConfigured,
getCurrentContext,
configureLogcli,
isLogcliInstalled,
configureM365Cli,
isM365Installed,
isM365Authenticated,
Expand Down Expand Up @@ -178,25 +174,16 @@ const CLI_TOOLS = [
},
},
{
id: 'grafana',
name: 'Grafana CLI (grafanactl)',
configure: configureGrafanaCli,
id: 'gcx',
name: 'Grafana Cloud CLI (gcx)',
configure: configureGcx,
getStatus: () => {
if (!isGrafanactlInstalled()) return chalk.red('not installed');
if (!isGrafanactlConfigured()) return chalk.yellow('not configured');
if (!isGcxInstalled()) return chalk.red('not installed');
if (!isGcxConfigured()) return chalk.yellow('not configured');
const ctx = getCurrentContext();
return chalk.green(`configured (${ctx || 'default'})`);
},
},
{
id: 'logcli',
name: 'Loki CLI (logcli)',
configure: configureLogcli,
getStatus: () => {
if (!isLogcliInstalled()) return chalk.red('not installed');
return chalk.green('installed');
},
},
{
id: 'm365',
name: 'Microsoft 365 CLI (m365)',
Expand Down
Loading