setup-alias

setup-alias is a command for coding agents from uppinote20/claude-dashboard. It costs 10 tokens per session (1,590 once invoked), scanned A, original, MIT.

A setup command that adds a check-ai shell function to macOS, Linux, or Windows Git Bash. The function provides quick terminal checks of AI CLI usage, with readable or JSON output.

In plain words
What is it for?
Install the shell function in the appropriate configuration file and run check-ai or check-ai --json from the terminal.
Why use it?
It avoids repeatedly locating and invoking the underlying usage-check script by hand.

Command

Part of the claude-dashboard plugin — 4 commands, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/uppinote20/claude-dashboard/setup-alias
Clone the repo
git clone --depth 1 https://github.com/uppinote20/claude-dashboard

Or install claude-dashboard, the plugin that ships this one along with the rest of its 4 commands, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setup-alias

README.md
[![agentmods](https://agentmods.dev/badge/commands/uppinote20/claude-dashboard/setup-alias.svg)](https://agentmods.dev/commands/uppinote20/claude-dashboard/setup-alias)
Your own site
<a href="https://agentmods.dev/commands/uppinote20/claude-dashboard/setup-alias"><img src="https://agentmods.dev/badge/commands/uppinote20/claude-dashboard/setup-alias.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,590 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00010 $0.01590
Opus 5 $0.00005 $0.00795
Sonnet 5 $0.00002 $0.00318
Haiku 4.5 $0.00001 $0.00159

Measured 5d ago against content hash faef8b26fdd3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup-alias scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/setup-alias.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Setup Shell Alias

Add a check-ai command to quickly check all AI CLI usage from your terminal.

What it does

After setup, you can run:

check-ai          # Pretty output
check-ai --json   # JSON output for scripting

Tasks

1. Detect OS and shell

uname -s
  • Darwin → macOS
  • Linux → Linux
  • MINGW* or MSYS* → Windows Git Bash
  • Otherwise check if PowerShell is available for Windows

2. Based on OS, add the appropriate function

macOS / Linux (bash/zsh)

Check current shell and config file:

echo $SHELL
  • If contains zsh → use ~/.zshrc
  • If contains bash → use ~/.bashrc

Check if already exists:

grep -q "^check-ai()" ~/.zshrc 2>/dev/null && echo "exists" || echo "not found"

Function to add (resolves the newest installed version in node rather than shelling out to sort -V, which is a GNU/BSD extension, not POSIX; re-reads CLAUDE_CONFIG_DIR on every call, so it follows account switches instead of freezing the path at definition time):

# Claude Dashboard - check-ai alias
check-ai() {
  local cfgdir="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
  local script
  script="$(CFGDIR="$cfgdir" node -e '
const fs = require("fs");
const path = require("path");
const cfgDir = process.env.CFGDIR;
const cacheRoot = path.join(cfgDir, "plugins/cache/claude-dashboard/claude-dashboard");
let entries = [];
try {
  entries = fs.readdirSync(cacheRoot, { withFileTypes: true });
} catch {}
const versions = entries
  .filter((e) => e.isDirectory() && /^\d+\.\d+\.\d+$/.test(e.name))
  .map((e) => e.name)
  .filter((v) => fs.existsSync(path.join(cacheRoot, v, "dist/check-usage.js")))
  .sort((a, b) => {
    const pa = a.split(".").map(Number);
    const pb = b.split(".").map(Number);
    return pa[0] - pb[0] || pa[1] - pb[1] || pa[2] - pb[2];
  });
if (versions.length === 0) {
  console.error("claude-dashboard is not installed in " + cfgDir);
  process.exit(1);
}
console.log(path.join(cacheRoot, versions[versions.length - 1], "dist/check-usage.js"));
')" || return 1
  node "$script" "$@"
}

Read the full file on GitHub · 197 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 197 lines · 10 tokens per session scan A faef8b26fdd3

Subscribe to this mod's changes

setup-alias is a command published in the GitHub repository uppinote20/claude-dashboard (564 stars, last pushed 12d ago), licensed MIT. It adds 10 tokens to every session and 1,590 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.