shell

A command that records code-quality measurements for each commit over time in Parquet files, a format commonly used for analytical data. The records include file and symbol metrics, duplicate-function pairs, violations, and capture details.

In plain words
What is it for?
Use it to capture the current commit, create snapshots for past commits, and query the collected history to track duplication, architecture violations, and high-risk areas.
Why use it?
A single comparison explains one change, but a history of measurements reveals whether the codebase is improving or accumulating problems over weeks and months.

Command

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/agentis-tools/ctx/shell
Clone the repo
git clone --depth 1 https://github.com/agentis-tools/ctx
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,075 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.00000 $0.01075
Opus 5 $0.00000 $0.00537
Sonnet 5 $0.00000 $0.00215
Haiku 4.5 $0.00000 $0.00108

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

Security

Grade A, and why

shell 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 yesterday.

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.

docs/commands/shell.md · 185 lines

How it starts

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

ctx shell

Interactive shell for exploring your codebase.

Synopsis

ctx shell [OPTIONS]

Description

The shell command starts an interactive REPL for exploring your indexed codebase. It provides:

  • Quick searches - Find symbols without typing full commands
  • Tab completion - Auto-complete commands and arguments
  • History - Navigate previous commands with arrow keys
  • Vi/Emacs modes - Choose your preferred editing style

Prerequisites

Index your codebase first:

ctx index

Options

Option Description Default
--history <PATH> History file location ~/.ctx_history
--no-history Disable command history false
--vi Use vi editing mode false (emacs)

Shell Commands

Command Description Example
find <pattern> Search symbols by name find auth
search <query> Semantic search search "user login"
callers <symbol> Show callers callers handleRequest
callees <symbol> Show callees callees main
deps <symbol> Show dependencies deps UserService
source <symbol> Show source code source authenticate
explain <symbol> Detailed symbol info explain Config
files List indexed files files
stats Show codebase stats stats
help Show available commands help
exit / quit Exit the shell exit

Built-in Commands

Command Description
cd <path> Change working directory
pwd Show current directory
history Show command history
clear Clear screen

Examples

Start Shell

ctx shell

Output:

ctx shell - Interactive codebase explorer
Type 'help' for available commands, 'exit' to quit.

ctx> _

Find Symbols

ctx> find handle
Found 12 symbols:
  handleRequest     function  src/server.rs:45
  handleAuth        function  src/auth.rs:23
  handleError       function  src/error.rs:12
  RequestHandler    struct    src/types.rs:89
  ...

Read the full file on GitHub · 185 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. yesterday First seen · 185 lines · 0 tokens per session scan A e6e6ef911546

Subscribe to this mod's changes

shell is a command published in the GitHub repository agentis-tools/ctx (11 stars, last pushed 15d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,075 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-30.