### Quick Start Supermodel CLI in a Repository Source: https://github.com/supermodeltools/cli/blob/main/README.md Navigates to your repository and starts the Supermodel CLI. On the first run, it launches the setup wizard and then begins watching for code changes to update graph files. ```bash cd your/repo supermodel # first run: launches setup wizard, then watches for changes ``` -------------------------------- ### Supermodel Setup Wizard Source: https://context7.com/supermodeltools/cli/llms.txt The `supermodel setup` command launches an interactive wizard for browser-based authentication, repository selection, shard mode enablement, and automatic installation of the Claude Code `PostToolUse` hook. ```bash # First-run: launches setup wizard when no API key is configured and stdin is a TTY supermodel setup ``` ```text # Expected output: # Opening browser for authentication… # ✓ Authenticated as user@example.com # ✓ Shard mode enabled # ✓ Claude Code hook installed at .claude/settings.json ``` -------------------------------- ### Start Graph Analysis Job via Supermodel API Source: https://context7.com/supermodeltools/cli/llms.txt Upload a repository ZIP file and start a graph analysis job using a POST request to the Supermodel API. Includes example headers for API Key and Idempotency. ```bash # Upload a repository ZIP and start a graph analysis job ZIP=$(git archive --format=zip HEAD -o /tmp/repo.zip && echo /tmp/repo.zip) curl -X POST https://api.supermodeltools.com/v1/graphs/supermodel \ -H "X-Api-Key: smsk_live_..." \ -H "Idempotency-Key: my-project-$(git rev-parse HEAD)" \ -F "file=@/tmp/repo.zip" ``` -------------------------------- ### Python Test Runner Setup Source: https://github.com/supermodeltools/cli/blob/main/benchmark/results/naked.txt This Python script sets up the test environment, including Django imports and warning configurations. It ensures Django is installed and configures warning filters for deprecation and resource warnings. ```python #!/usr/bin/env python import argparse import atexit import copy import gc import multiprocessing import os import shutil import socket import subprocess import sys import tempfile import warnings from pathlib import Path try: import django except ImportError as e: raise RuntimeError( "Django module not found, reference tests/README.rst for instructions." ) from e else: from django.apps import apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import connection, connections from django.test import TestCase, TransactionTestCase from django.test.runner import get_max_test_processes, parallel_type from django.test.selenium import SeleniumTestCaseBase from django.test.utils import NullTimeKeeper, TimeKeeper, get_runner from django.utils.deprecation import ( RemovedInDjango51Warning, RemovedInDjango60Warning, ) from django.utils.log import DEFAULT_LOGGING from django.utils.version import PY312 try: import MySQLdb except ImportError: pass else: # Ignore informational warnings from QuerySet.explain(). warnings.filterwarnings("ignore", r"\(1003, *", category=MySQLdb.Warning) # Make deprecation warnings errors to ensure no usage of deprecated features. warnings.simplefilter("error", RemovedInDjango60Warning) warnings.simplefilter("error", RemovedInDjango51Warning) # Make resource and runtime warning errors to ensure no usage of error prone # patterns. ``` -------------------------------- ### Supermodel CLI Tool Examples Source: https://context7.com/supermodeltools/cli/llms.txt Examples of tools that can be invoked directly by the agent after the MCP server is running. ```bash # Tool: analyze — upload repo and run full analysis # Tool: dead_code — find functions with no callers # Tool: blast_radius — find files affected by a change # Tool: get_graph — return a filtered graph slice ``` -------------------------------- ### Install Supermodel CLI via npm (Cross-platform) Source: https://github.com/supermodeltools/cli/blob/main/README.md Installs the Supermodel CLI globally using npm, providing a cross-platform installation method. ```bash npm install -g @supermodeltools/cli ``` -------------------------------- ### Start MCP Server with Supermodel CLI Source: https://context7.com/supermodeltools/cli/llms.txt Start the MCP server for stdio transport. You can also point it to a specific repository root. ```bash supermodel mcp ``` ```bash supermodel mcp --repo /path/to/my-project ``` -------------------------------- ### Clone and Install Public API Dependencies Source: https://github.com/supermodeltools/cli/blob/main/benchmark/agent-impact/results/real-impact-ranking-opt-in-50c6ae58/README.md Steps to clone the supermodel-public-api repository and install its data-plane dependencies. ```bash git clone git@github.com:supermodeltools/supermodel-public-api.git cd supermodel-public-api git checkout impact-analysis-api-fixes git rev-parse HEAD cd src/data-plane npm install ``` -------------------------------- ### Start MCP Server Source: https://context7.com/supermodeltools/cli/llms.txt Starts the MCP server with stdio transport. This allows agents to interact with Supermodel tools. ```APIDOC ## Start the MCP server manually (stdio transport) supermodel mcp ## Point at a specific repository root supermodel mcp --repo /path/to/my-project ``` -------------------------------- ### Install Supermodel CLI via curl (Linux/Mac) Source: https://github.com/supermodeltools/cli/blob/main/README.md Installs the Supermodel CLI using curl on Linux or macOS systems. This is a common method for quick installation. ```bash curl -fsSL https://supermodeltools.com/install | sh ``` -------------------------------- ### Install Supermodel CLI Source: https://context7.com/supermodeltools/cli/llms.txt Choose one of the following installation methods: Linux/macOS via curl, macOS via Homebrew, or cross-platform via npm. You can also build from source. ```bash # Linux / macOS (curl installer) curl -fsSL https://supermodeltools.com/install | sh ``` ```bash # macOS (Homebrew) brew install supermodeltools/tap/supermodel ``` ```bash # Cross-platform (npm) npm install -g @supermodeltools/cli ``` ```bash # From source git clone https://github.com/supermodeltools/cli cd cli go build -o supermodel . ``` -------------------------------- ### Install Supermodel CLI via Homebrew (macOS) Source: https://github.com/supermodeltools/cli/blob/main/README.md Installs the Supermodel CLI on macOS using the Homebrew package manager. ```bash brew install supermodeltools/tap/supermodel ``` -------------------------------- ### Example .graph.ts Sidecar File Content Source: https://context7.com/supermodeltools/cli/llms.txt This is an example of the content found in a .graph.ts sidecar file, which is placed next to its source file. ```plaintext # src/api.graph.ts (example content) [deps] imports: src/config.ts, src/types.ts imported-by: src/checkout.ts, src/cart.ts [calls] fetchUser (src/api.ts:14) → http.get (node:http:42) createOrder (src/api.ts:31) → fetchUser (src/api.ts:14) createOrder (src/api.ts:31) → validateCart (src/cart.ts:88) [impact] risk: HIGH affected-domains: checkout, reporting direct-dependents: 3 transitive-dependents: 11 ``` -------------------------------- ### Run Supermodel Hook for Live Graph Updates Source: https://context7.com/supermodeltools/cli/llms.txt The `supermodel hook` command forwards changed file paths from AI agent edits to the Supermodel daemon via UDP for live `.graph.*` file updates. It can be run manually with a specified port or is installed automatically by the setup wizard. Verify the hook is firing by running the daemon in one terminal and simulating an event in another. ```bash # The hook is installed automatically by the setup wizard. # Manual registration: supermodel hook --port 7734 # default UDP port matches the daemon ``` ```bash # Verify hook is firing (run in one terminal): supermodel # starts daemon # In another terminal, simulate a hook event: echo '{"tool":"Write","path":"src/api.ts"}' | supermodel hook ``` -------------------------------- ### Run Supermodel Analyze in CI Source: https://github.com/supermodeltools/cli/blob/main/README.md Use environment variables to configure Supermodel for non-interactive environments like CI/CD pipelines. This example sets the API key and runs the analyze command. ```bash SUPERMODEL_API_KEY=smsk_live_... supermodel analyze ``` -------------------------------- ### Configure Supermodel Settings Source: https://github.com/supermodeltools/cli/blob/main/README.md Store Supermodel configuration in a YAML file. Environment variables can override these settings. This example shows API key, base URL, output format, and file writing preferences. ```yaml api_key: smsk_... # or SUPERMODEL_API_KEY api_base: https://... # or SUPERMODEL_API_BASE (default: https://api.supermodeltools.com) output: human # human | json files: true # set false to disable .graph.* writing globally (or SUPERMODEL_FILES=false) ``` -------------------------------- ### Get Agent Awareness Prompt Source: https://context7.com/supermodeltools/cli/llms.txt The `supermodel skill` command prints a prompt that teaches AI coding agents how to interpret `.graph.*` sidecar files. This prompt can be piped into an agent's instruction file to automatically configure it for Supermodel's graph data. ```bash # Append to Claude Code instructions supermodel skill >> CLAUDE.md ``` ```bash # Append to OpenAI Codex / Agents SDK instructions supermodel skill >> AGENTS.md ``` ```bash # Append to Cursor rules supermodel skill >> .cursorrules ``` ```bash # Print to stdout (review before adding) supermodel skill ``` ```text # Output: # This repository has .graph.* files next to source files containing code # relationship data from Supermodel. # The naming convention: for src/Foo.py the graph file is src/Foo.graph.py # … ``` -------------------------------- ### Run Impact Analysis Benchmark Source: https://github.com/supermodeltools/cli/blob/main/benchmark/impact-analysis/README.md Execute the impact analysis benchmark using the TypeScript fixture. Dependencies for the data-plane may need to be installed separately. ```bash node benchmark/impact-analysis/run-impact-benchmark.mjs ``` -------------------------------- ### Clone and Build Supermodel CLI Source: https://github.com/supermodeltools/cli/blob/main/CONTRIBUTING.md Clone the repository, navigate to the directory, and build the project. ```sh git clone https://github.com/supermodeltools/cli cd cli go mod tidy make build ``` -------------------------------- ### Django Default Installed Apps Source: https://github.com/supermodeltools/cli/blob/main/benchmark/results/naked.txt Lists the applications that are always installed in a Django project. These are fundamental for core Django functionality. ```python ALWAYS_INSTALLED_APPS = [ "django.contrib.contenttypes", "django.contrib.auth", "django.contrib.sites", "django.contrib.sessions", "django.contrib.messages", "django.contrib.admin.apps.SimpleAdminConfig", "django.contrib.staticfiles", ] ``` -------------------------------- ### Generate Static Architecture Documentation Source: https://context7.com/supermodeltools/cli/llms.txt The `supermodel docs` command generates a browsable HTML site documenting your codebase's architecture. Customize the output directory, site name, canonical URL, and GitHub repository slug. The generated site can be served locally or deployed to any static host. ```bash # Generate docs for current directory (output: ./docs-output) supermodel docs ``` ```bash # Specify project and output directory supermodel docs ./my-project --output ./docs-site ``` ```bash # Set canonical URL and GitHub repo slug for source links supermodel docs --repo owner/repo --base-url https://owner.github.io/repo ``` ```bash # Custom site name supermodel docs --site-name "My App Architecture" --output /var/www/html ``` ```bash # Serve locally after generation supermodel docs && python3 -m http.server --directory docs-output 8080 ``` ```bash # Deploy to GitHub Pages supermodel docs --repo myorg/myrepo --base-url https://myorg.github.io/myrepo --output ./docs git add docs && git commit -m "Update architecture docs" && git push ``` -------------------------------- ### Build Docker Image Source: https://github.com/supermodeltools/cli/blob/main/benchmark/agent-impact/README.md Builds the Docker image for the supermodel-agent-impact tool. Use this command before running benchmarks. ```bash docker build -t supermodel-agent-impact:local benchmark/agent-impact ``` -------------------------------- ### Generate .graph files for your repo Source: https://github.com/supermodeltools/cli/blob/main/npm/README.md Use the 'analyze' command to generate `.graph` files for your entire repository. These files contain pre-computed context for your codebase. ```bash supermodel analyze ``` -------------------------------- ### Check for Supermodel CLI updates Source: https://github.com/supermodeltools/cli/blob/main/npm/README.md Use the 'update' command to check for and install the latest version of the Supermodel CLI. ```bash supermodel update ``` -------------------------------- ### Compact Repository with Supermodel CLI Source: https://context7.com/supermodeltools/cli/llms.txt Use `supermodel compact` to reduce the token size of a repository. Specify an output directory with `--output` or perform a dry-run with `--dry-run` to see potential savings without writing files. The command can also pipe output directly to other tools. ```bash supermodel compact . ``` ```bash supermodel compact . --output ./dist/compacted ``` ```bash # Dry-run: show token savings without writing files supermodel compact --dry-run . # → 142 files 87432 → 61203 bytes (30.0% reduction, ~21858 → ~15301 tokens) ``` ```bash # Compact and pipe directly to an agent supermodel compact src/checkout.ts | pbcopy ``` -------------------------------- ### Restore Project Context with Supermodel CLI Source: https://context7.com/supermodeltools/cli/llms.txt Use `supermodel restore` to generate a high-level project summary, useful after AI agents compact their context. It can run locally using a file tree scan or leverage an API for richer context. Adjust the token budget with `--max-tokens` and specify the project directory with `--dir`. ```bash # Generate a context summary (API-powered if authenticated) supermodel restore ``` ```bash # Local mode — no API call, uses file tree scan supermodel restore --local ``` ```bash # Increase token budget for large projects supermodel restore --max-tokens 4000 ``` ```bash # Specify project directory supermodel restore --dir ./my-project ``` ```bash # Pipe into Claude Code as a restore prompt supermodel restore | cat ``` ```text # Example output: # # Project: my-project (142 files, Go) # ## Domains # - **api**: HTTP client primitives (internal/api/) # - **analyze**: Upload & full analysis pipeline (internal/analyze/) # - **auth**: Login / logout / token storage (internal/auth/) ``` -------------------------------- ### Run Impact Analysis Benchmark with Custom TSC Source: https://github.com/supermodeltools/cli/blob/main/benchmark/impact-analysis/README.md Run the impact analysis benchmark, specifying a local TypeScript compiler binary. This is useful if the data-plane dependencies are not installed in the current worktree. ```bash export SUPERMODEL_PUBLIC_API_REPO=/path/to/supermodel-public-api TSC_BIN="$SUPERMODEL_PUBLIC_API_REPO/src/data-plane/node_modules/.bin/tsc" \ node benchmark/impact-analysis/run-impact-benchmark.mjs ``` -------------------------------- ### Build Supermodel CLI from Source Source: https://github.com/supermodeltools/cli/blob/main/README.md Builds the Supermodel CLI from its source code. This method is useful for development or when you need the latest unreleased changes. ```bash git clone https://github.com/supermodeltools/cli cd cli go build -o supermodel . ``` -------------------------------- ### Clone CLI Benchmark Harness Source: https://github.com/supermodeltools/cli/blob/main/benchmark/agent-impact/results/real-impact-ranking-opt-in-50c6ae58/README.md Steps to clone the supermodel-cli repository and check out the specified branch. ```bash git clone git@github.com:supermodeltools/cli.git cd cli git checkout impact-analysis-benchmark git rev-parse HEAD ``` -------------------------------- ### Supermodel Watch Daemon Source: https://context7.com/supermodeltools/cli/llms.txt The `supermodel` command starts a daemon that generates `.graph.*` files, then watches for file changes via UDP notifications from `supermodel hook` to incrementally re-render affected files. Press Ctrl+C to stop and remove graph files. ```bash cd your/repo # Start the daemon — generates .graph files, then watches for changes supermodel # With options supermodel --dir ./src --debounce 1s --notify-port 7734 # Press Ctrl+C to stop and remove graph files # Expected: .graph.* files written next to every source file, e.g.: # src/api.ts → src/api.graph.ts # internal/auth.go → internal/auth.graph.go ``` -------------------------------- ### Run Real Repository Impact Analysis Benchmark Source: https://github.com/supermodeltools/cli/blob/main/benchmark/impact-analysis/README.md Execute the benchmark against pinned public repositories. This requires specifying the path to the Supermodel public API repository. ```bash export SUPERMODEL_PUBLIC_API_REPO=/path/to/supermodel-public-api node benchmark/impact-analysis/run-real-repo-impact-benchmark.mjs ``` -------------------------------- ### Django Email Change Tracking Tests Source: https://github.com/supermodeltools/cli/blob/main/benchmark/results/supermodel.txt These tests verify that email changes are correctly recorded in the EmailChangeRecord model. They cover scenarios like initial change recording, old and new email values, timestamps, and no records on creation or when the email remains unchanged. Ensure the change_tracking app is installed and configured. ```python from django.test import TestCase from django.contrib.auth import get_user_model User = get_user_model() class EmailChangeTrackingTest(TestCase): def test_change_is_recorded(self): from change_tracking.models import EmailChangeRecord user = User.objects.create_user('alice', email='alice@old.com', password='pass') user.email = 'alice@new.com' user.save() self.assertEqual(EmailChangeRecord.objects.filter(user=user).count(), 1) ``` ```python from change_tracking.models import EmailChangeRecord user = User.objects.create_user('bob', email='bob@old.com', password='pass') user.email = 'bob@new.com' user.save() self.assertEqual(EmailChangeRecord.objects.get(user=user).old_email, 'bob@old.com') ``` ```python from change_tracking.models import EmailChangeRecord user = User.objects.create_user('carol', email='carol@old.com', password='pass') user.email = 'carol@new.com' user.save() self.assertEqual(EmailChangeRecord.objects.get(user=user).new_email, 'carol@new.com') ``` ```python from change_tracking.models import EmailChangeRecord from django.utils import timezone user = User.objects.create_user('dave', email='dave@old.com', password='pass') before = timezone.now() user.email = 'dave@new.com' user.save() after = timezone.now() ts = EmailChangeRecord.objects.get(user=user).changed_at self.assertTrue(before <= ts <= after) ``` ```python from change_tracking.models import EmailChangeRecord User.objects.create_user('eve', email='eve@example.com', password='pass') self.assertEqual(EmailChangeRecord.objects.count(), 0) ``` ```python from change_tracking.models import EmailChangeRecord user = User.objects.create_user('frank', email='frank@example.com', password='pass') user.first_name = 'Frank' user.save() self.assertEqual(EmailChangeRecord.objects.count(), 0) ``` ```python from change_tracking.models import EmailChangeRecord user = User.objects.create_user('grace', email='grace@v1.com', password='pass') user.email = 'grace@v2.com' user.save() user.email = 'grace@v3.com' user.save() self.assertEqual(EmailChangeRecord.objects.filter(user=user).count(), 2) ``` ```python from change_tracking.models import EmailChangeRecord user = User.objects.create_user('henry', email='henry@old.com', password='pass') user.email = 'henry@new.com' user.save() user.delete() self.assertEqual(EmailChangeRecord.objects.count(), 0) ``` -------------------------------- ### Run Implementation Tests Source: https://github.com/supermodeltools/cli/blob/main/benchmark/agent-impact/README.md Executes implementation tests for the API ranking within the Supermodel public API repository. Ensure the SUPERMODEL_PUBLIC_API_REPO environment variable is set. ```bash export SUPERMODEL_PUBLIC_API_REPO=/path/to/supermodel-public-api cd "$SUPERMODEL_PUBLIC_API_REPO/src/data-plane" npm test -- --runInBand \ impact-validation-ranking-regression.test.js ``` -------------------------------- ### Map Codebase with Supermodel CLI Source: https://github.com/supermodeltools/cli/blob/main/README.md Initiates the Supermodel CLI to map your entire codebase. This process uploads your repository to the Supermodel API, builds a call graph, and generates `.graph` files next to your source files. It continues running to keep these files updated as you code. ```bash supermodel ``` -------------------------------- ### Placeholder for Model Implementation Source: https://github.com/supermodeltools/cli/blob/main/benchmark/results/skill-v2.txt This is a placeholder for the actual implementation of the solution within the models.py file. ```Python # Implement your solution here. ``` -------------------------------- ### Supermodel Skill Instruction Source: https://context7.com/supermodeltools/cli/llms.txt This command prints the full instruction text that agents use to construct graph paths. ```bash # The skill prompt instructs agents to construct graph paths directly: # for src/Foo.py → src/Foo.graph.py (insert .graph before the extension) supermodel skill # prints the full instruction text ``` -------------------------------- ### Analyze Path and Write Graph Shards Source: https://github.com/supermodeltools/cli/blob/main/README.md Uploads the specified path to the Supermodel API, runs a full analysis, and writes `.graph.*` files. Use `--no-shards` to skip file writing. ```bash analyze [path] ``` -------------------------------- ### Run Architecture Check Locally Source: https://github.com/supermodeltools/cli/blob/main/docs/architecture.md Execute the architecture check script locally to verify import rules. Ensure you have a Supermodel API key configured. ```bash SUPERMODEL_API_KEY= go run ./scripts/check-architecture ``` -------------------------------- ### Manual Agent Instruction for Graph Files Source: https://github.com/supermodeltools/cli/blob/main/README.md Provides manual instructions to add to an agent's configuration file (e.g., `CLAUDE.md`, `AGENTS.md`) to inform it about Supermodel graph files and how to use them for understanding code relationships. ```markdown This repository has .graph.* files next to source files containing code relationship data from Supermodel. For src/Foo.py, the graph file is src/Foo.graph.py. Each .graph file can include [deps], [calls], and [impact] sections. Read the .graph file before the source file to understand dependencies, call relationships, and blast radius before making changes. ``` -------------------------------- ### Run Python Tests Source: https://github.com/supermodeltools/cli/blob/main/benchmark/task.md Execute Python tests for the 'change_tracking' module using specific settings. Ensure you are in the '/app' directory and have the correct PYTHONPATH set. ```bash cd /app && PYTHONPATH=tests python tests/runtests.py --settings=test_sqlite change_tracking -v 2 ``` -------------------------------- ### Run Real Repository Impact Analysis Benchmark Source: https://github.com/supermodeltools/cli/blob/main/benchmark/impact-analysis/README.md Execute the impact analysis benchmark against real public repositories. This command generates aggregate and case-specific reports. ```bash node benchmark/impact-analysis/run-real-repo-impact-benchmark.mjs ``` -------------------------------- ### Run Dead Code Detection Source: https://context7.com/supermodeltools/cli/llms.txt Uploads the repository and runs multi-phase dead code analysis. Use `--min-confidence` to filter results and `--ignore` to exclude specific files or directories. ```bash supermodel dead-code # Find all unreachable functions supermodel dead-code # Analyze a specific directory supermodel dead-code ./internal # Only show high-confidence results supermodel dead-code --min-confidence high # Limit to top 20 results supermodel dead-code --limit 20 # Ignore test files and vendor directories supermodel dead-code --ignore '**/*_test.go' --ignore 'vendor/**' # JSON output for CI integration supermodel dead-code --output json | jq '.deadCodeCandidates[] | select(.confidence == "high")' # Force re-analysis (bypass cache) supermodel dead-code --force --min-confidence medium ``` ```text # Example output: # internal/legacy/converter.go:42 ConvertOldFormat [high] # Reason: No callers found in call graph; not reachable from any entry point. ``` -------------------------------- ### Run Real Impact Ranking Benchmark Source: https://github.com/supermodeltools/cli/blob/main/benchmark/agent-impact/results/real-impact-ranking-opt-in-50c6ae58/README.md Command to execute the real impact ranking benchmark, specifying the output directory and scope. Ensure the SUPERMODEL_PUBLIC_API_REPO environment variable is set to the absolute path of the cloned public API repository. ```bash export SUPERMODEL_PUBLIC_API_REPO=/absolute/path/to/supermodel-public-api node benchmark/agent-impact/run-real-impact-ranking.mjs \ --out-dir target/real-impact-ranking-opt-in-50c6ae58 \ --scope replay-dirs ``` -------------------------------- ### Supermodel CLI Development Workflow Commands Source: https://github.com/supermodeltools/cli/blob/main/CONTRIBUTING.md Common make targets for building, testing, linting, formatting, and releasing the CLI. ```sh make build # compile to dist/supermodel ``` ```sh make test # run tests with race detector + coverage ``` ```sh make lint # run golangci-lint ``` ```sh make fmt # format all .go files ``` ```sh make tidy # go mod tidy + verify ``` ```sh make release-dry # full GoReleaser snapshot build across all platforms ``` -------------------------------- ### Display Full Repository Graph Source: https://github.com/supermodeltools/cli/blob/main/README.md Displays the complete repository graph in various formats, including human-readable table, JSON, or Graphviz DOT. ```bash graph [path] ``` -------------------------------- ### Full Agent Impact Benchmark Run Source: https://github.com/supermodeltools/cli/blob/main/benchmark/agent-impact/README.md Executes the full agent impact A/B benchmark. Specify the Docker image, model, and codex home directory. Results are stored in target/agent-impact/. ```bash node benchmark/agent-impact/run-agent-impact-ab.mjs \ --image supermodel-agent-impact:local \ --model gpt-5.5 \ --codex-home ~/.codex ``` -------------------------------- ### Create Token-Efficient Graph Slice Source: https://github.com/supermodeltools/cli/blob/main/README.md Generates a token-efficient graph slice for a specific file, including its imports, callers, and types. Aliases include `ctx` and `context`. ```bash focus ``` -------------------------------- ### Configure INSTALLED_APPS in Django Tests Source: https://github.com/supermodeltools/cli/blob/main/benchmark/results/naked.txt This snippet shows how INSTALLED_APPS is configured and potentially modified within Django's test runner. It includes default settings and logic for adding apps dynamically. ```python 86:ALWAYS_INSTALLED_APPS = [ 104:# Need to add the associated contrib app to INSTALLED_APPS in some cases to 106:# and isn't in an application in INSTALLED_APPS." 202: "INSTALLED_APPS": settings.INSTALLED_APPS, 212: settings.INSTALLED_APPS = ALWAYS_INSTALLED_APPS 257: # Load all the ALWAYS_INSTALLED_APPS. 294: # Add contrib.gis to INSTALLED_APPS if needed (rather than requiring 295: # @override_settings(INSTALLED_APPS=...) on all test cases. 305: installed_apps = set(get_installed()) 307: if app in installed_apps: 311: settings.INSTALLED_APPS.append(app) 312: installed_apps.add(app) 314: apps.set_installed_apps(settings.INSTALLED_APPS) ``` -------------------------------- ### Score Live Endpoint Result with Benchmark Source: https://github.com/supermodeltools/cli/blob/main/benchmark/impact-analysis/README.md Run the impact analysis benchmark using a pre-saved JSON file containing a live result from the `/v1/analysis/impact` endpoint. The file must match the public response shape. ```bash node benchmark/impact-analysis/run-impact-benchmark.mjs \ --prediction-file /path/to/live-impact-result.json ``` -------------------------------- ### Generate Agent Awareness Prompt Source: https://github.com/supermodeltools/cli/blob/main/README.md Generates an agent awareness prompt that can be piped to a file like `CLAUDE.md` or `AGENTS.md`. This prompt informs AI agents about the presence and structure of Supermodel graph files. ```bash supermodel skill >> CLAUDE.md ``` -------------------------------- ### Supermodel CLI Configuration Source: https://context7.com/supermodeltools/cli/llms.txt Configuration settings are stored in `~/.supermodel/config.yaml`. Environment variables override file settings and are recommended for CI environments. Key settings include API key, API base URL, output format, and shard writing. ```yaml # ~/.supermodel/config.yaml api_key: smsk_live_... # or env SUPERMODEL_API_KEY api_base: https://api.supermodeltools.com # or env SUPERMODEL_API_BASE output: human # human | json shards: true # set false to disable .graph.* writing (env SUPERMODEL_SHARDS=false) ``` ```bash # CI / non-interactive environments — set key via env var SUPERMODEL_API_KEY=smsk_live_... supermodel analyze ``` ```bash # Override output format globally SUPERMODEL_API_KEY=smsk_live_... supermodel graph --output json ``` -------------------------------- ### Test No Record on Create Source: https://github.com/supermodeltools/cli/blob/main/benchmark/results/naked.txt Verifies that no EmailChangeRecord is created when a user is initially created. Ensure EmailChangeRecord is imported. ```Python from django.test import TestCase from django.contrib.auth import get_user_model User = get_user_model() class EmailChangeTrackingTest(TestCase): def test_no_record_on_create(self): from change_tracking.models import EmailChangeRecord User.objects.create_user('eve', email='eve@example.com', password='pass') self.assertEqual(EmailChangeRecord.objects.count(), 0) ```