index-cmd

index-cmd is a command for Claude Code from eduardoabreu81/livewiki. It costs 0 tokens per session (1,228 once invoked), scanned A, original, MIT.

A command-line command that reindexes a code repository and updates a record of tracked symbols, file hashes, and unresolved anchor changes. A repository is the project folder and its version-controlled files.

In plain words
What is it for?
Use it to refresh an index, limit which files are scanned, produce human-readable or JSON output, and inspect ledger changes for automation or review.
Why use it?
It refreshes the repository's searchable structure and shows what tracked code references changed or moved.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit Use it to refresh an index, limit which files are scanned, produce human-readable or JSON output, and inspect ledger changes for automation or review.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/eduardoabreu81/livewiki/index-cmd
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.

Clone the repo
git clone --depth 1 https://github.com/eduardoabreu81/livewiki

Made for: Claude Code.

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 index-cmd

README.md
[![agentmods](https://agentmods.dev/badge/commands/eduardoabreu81/livewiki/index-cmd.svg)](https://agentmods.dev/commands/eduardoabreu81/livewiki/index-cmd)
Your own site
<a href="https://agentmods.dev/commands/eduardoabreu81/livewiki/index-cmd"><img src="https://agentmods.dev/badge/commands/eduardoabreu81/livewiki/index-cmd.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 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,228 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.01228
Opus 5 $0.00000 $0.00614
Sonnet 5 $0.00000 $0.00246
Haiku 4.5 $0.00000 $0.00123

Measured 7d ago against content hash 569a6f89b193, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

index-cmd 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 7d 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.

livewiki/commands/index-cmd.md · 89 lines

How it starts

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

Indexing and ledger command

The index command reindexes a repository and synchronizes its anchor ledger while selecting human-readable, JSON, or quiet output.

When to use this page

  • Run livewiki index to refresh extracted symbols, hashes, and anchor debt for a repository.
  • Combine configured ignore patterns with repeatable --ignore options for a narrower indexing walk.
  • Select JSON output or quiet operation when integrating the command with automation.
  • Inspect ledger changes and moved pairs from the command's human-readable report.

How it fits

This module is the command-line adapter for the repository indexer and anchor-ledger services. It sits at packages/cli/src/commands/index-cmd.ts in the CLI command layer, translates Commander options into service inputs, and renders the results for a terminal or automation consumer. The excerpt does not establish the complete call graph beyond these direct service and configuration interactions.

Diagram

%% livewiki/diagrams/commands-index-cmd.mmd

Command registration and option preparation

livewiki index needs a single command surface that gathers the repository path, ignore patterns, and output preferences before invoking the indexing pipeline.

export function registerIndex(program: Command): void {

This function takes a Commander command tree and returns no value.

registerIndex registers the index command and its --ignore, --no-ledger, and --quiet options. The action resolves the repository from the current working directory and an optional --repo path, loads configuration, combines configured and command-line ignores, and then runs the indexer. The ledger runs afterward unless --no-ledger sets the derived ledger option to false.

When the ledger reports status: "aborted" the command sets process.exitCode = 1. The ledger wrote nothing in that case, so exiting zero would tell a script the wiki is reconciled when it is not.

Read the full file on GitHub · 89 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. 7d ago First seen · 89 lines · 0 tokens per session scan A 569a6f89b193

Subscribe to this mod's changes

index-cmd is a command published in the GitHub repository eduardoabreu81/livewiki (0 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,228 tokens. 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-31.