Skip to content

init command

Arham-Qureshi edited this page Jul 21, 2026 · 1 revision

init — Initialize .agentignore

Creates a .agentignore file in the current directory with stack-aware default ignore patterns.

codebase-vis init

init output

How It Works

  1. codebase-vis detects your project's tech stack (Node, Python, Rust, Go, C++, Java, etc.)
  2. It writes a .agentignore file with appropriate defaults for your stack
  3. If .agentignore already exists, it warns and aborts — no overwrites

Generated Ignore Patterns

Category Patterns
Common .git/, codebase-out/, .env, .DS_Store, Thumbs.db
Non-code files *.txt, *.md, *.json, *.yaml, *.yml, *.xml, *.csv, *.sql, images (*.png, *.jpg, *.svg, etc.), fonts (*.woff, *.ttf), audio/video (*.mp3, *.mp4)
Config/planning .agents/, .opencode/, graphify-out/
Node / JS / TS node_modules/, dist/, build/, .next/, .nuxt/, out/, .cache/, coverage/, package-lock.json
Python venv/, .venv/, __pycache__/, *.pyc, *.pyo, .pytest_cache/, *.egg-info/, .eggs/, dist/, build/, .tox/, htmlcov/
C / C++ build/, cmake-build-*/, *.o, *.obj, *.exe, .a, .so, .dylib
Rust target/, Cargo.lock
Go vendor/
Java target/, *.class, *.jar, .gradle/, build/
PHP vendor/, composer.lock
Ruby vendor/bundle/, .bundle/, Gemfile.lock

The .agentignore File

The .agentignore file uses .gitignore-style glob patterns. Under the hood, codebase-vis uses the ignore npm package to evaluate patterns.

See the .agentignore Reference for the full pattern syntax.

Flags

Flag Description
(none) No flags — just run codebase-vis init

Notes

  • Safe to re-run? No — it refuses to overwrite an existing .agentignore. Delete the file first if you want to regenerate it.
  • The generated file has a # User custom patterns section at the end for your own additions.

Clone this wiki locally