AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

Configuring .continueignore: How to Exclude Secrets and Build Artifacts from Continue's Codebase Indexing

Zosha Barry · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Relying entirely on .gitignore to protect your codebase context in Continue is an operational gamble that we at 365Finds strongly advise against. While Continue defaults to respecting .gitignore, treating Git tracking rules and AI retrieval boundaries as identical creates two severe failure modes: accidental leaks of tracked secrets or sensitive test fixtures to language models, and bloated local vector indexes that crush developer environment performance.

Here is 365Finds’s architectural guide to configuring .continueignore effectively, establishing workspace and global hygiene, and ensuring build artifacts never poison your local indexing pipeline.


Why .gitignore Alone Is Not Enough

In modern development, Git ignore rules serve version control ergonomics, not data minimization for machine learning models. A team may deliberately commit sanitized mock configs, internal API endpoint definitions, localized documentation containing proprietary architecture details, or comprehensive integration fixtures.

While safe for a protected private repository, feeding those raw files into Continue's embedding pipelines or dynamic agent search tools expands the risk surface whenever prompts hit remote model providers.

Furthermore, build artifacts and minified distribution bundles—such as dist/, build/, .next/, or Rust's target/—often escape .gitignore in misconfigured monorepos or legacy setups. When Continue attempts to parse, chunk, and embed hundreds of thousands of lines of transpiled JavaScript or bundled binaries, your local indexing engine (powered by LanceDB and local embedding models) will spike CPU utilization, consume gigabytes of disk storage, and dilute semantic search accuracy with meaningless minified identifiers.

At 365Finds, our stance is clear: every Continue workspace must have an explicit .continueignore file, backed by a universal global ignore baseline on every developer machine.


Where .continueignore Lives: Workspace vs. Global

Continue searches for ignore definitions at two distinct levels. Understanding the precedence and placement is essential for engineering consistency:

1. Workspace-Level Ignore

Place a .continueignore file directly in the root directory of your project, sitting adjacent to .gitignore.

my-project/
├── .continueignore
├── .gitignore
├── src/
└── package.json

Workspace rules apply exclusively to that project repository. They should capture repository-specific compilation targets, environment files, and local data dumps.

2. Global-Level Ignore

Developers frequently work across dozens of microservices or client repositories where team .continueignore standards may lag behind. Continue supports a global ignore configuration located in your home directory:

At 365Finds, we recommend placing your baseline security rules in the global file. If an individual repository forgets to ignore .env.local or private key formats, your local Continue engine remains shielded regardless of project setup.


Syntax and Rule Design

.continueignore uses standard .gitignore globbing patterns. Patterns are evaluated sequentially, and negation rules (!) can selectively re-include specific files if necessary.

Here is the baseline production template recommended by 365Finds:

# ==========================================
# 1. Sensitive Credentials, Secrets & Env Files
# ==========================================
.env
.env.*
!.env.example
*.pem
*.key
*.p12
*.cert
*.crt
id_rsa
id_ed25519
*secret*
*credentials*.json
*token*.json
serviceAccountKey.json
aws-credentials*

# ==========================================
# 2. Package Managers, Dependencies & Vendors
# ==========================================
node_modules/
vendor/
.venv/
env/
virtualenv/
__pypackages__/
bower_components/

# ==========================================
# 3. Build Artifacts, Compilations & Bundles
# ==========================================
dist/
build/
out/
target/
.next/
.nuxt/
.svelte-kit/
.parcel-cache/
.turbo/
*.min.js
*.min.css
*.map
*.bundle.*

# ==========================================
# 4. Binary Files, Large Datasets & Model Weights
# ==========================================
*.sqlite
*.sqlite3
*.db
*.csv
*.tsv
*.parquet
*.jsonl
*.onnx
*.bin
*.tar.gz
*.zip
*.7z
*.iso

# ==========================================
# 5. Testing Outputs, Coverage & Reports
# ==========================================
coverage/
.nyc_output/
playwright-report/
test-results/
*.lcov

# ==========================================
# 6. IDE, Cache & System Metadata
# ==========================================
.git/
.hg/
.svn/
.idea/
.vscode/
.DS_Store
Thumbs.db
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.continue/

Crucial Implementation Caveat: Purging the Existing Index

Writing a .continueignore file informs Continue what to skip moving forward. It does not retroactively delete embeddings or parsed files that were previously indexed into Continue's local database.

If you add a sensitive file or a large artifact directory to .continueignore after Continue has already indexed the repository, the outdated chunks remain inside Continue's local LanceDB store (~/.continue/index).

To enforce the new boundary and force a clean rebuild:

  1. Save your .continueignore file in the workspace root or global path.
  2. Close your editor (VS Code or JetBrains) to release open file locks on the indexing database.
  3. Delete the local index cache:
    • macOS / Linux: rm -rf ~/.continue/index
    • Windows (PowerShell): Remove-Item -Recurse -Force "$env:USERPROFILE\.continue\index"
  4. Reopen your editor and invoke Continue.
  5. Continue will regenerate the index from scratch, strictly respecting the updated glob patterns.

365Finds Perspective: Index Cleanliness as Architecture

In our research across local AI tooling, we observe many engineering teams blame embedding retrieval accuracy or IDE responsiveness on Continue's underlying models. In most cases, the model is innocent; the vector index is simply choked on minified web bundles, auto-generated documentation, and test fixtures.

Configuring .continueignore is not an optional polish step. It is the boundary layer between your machine's private runtime state and the assistant helping you write code. Enforce the global template on day one, add repository-specific artifact ignores to project templates, and clear the index directory whenever ignore boundaries shift.

References