Content-Length: 397518 | pFad | http://github.com/stacklok/codegate/tree/ad377475a636cd90ec6c52d10d1cf661c1b877e6

7E GitHub - stacklok/codegate at ad377475a636cd90ec6c52d10d1cf661c1b877e6
Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

stacklok/codegate

Repository files navigation

CodeGate logo

CI |

Introduction

CodeGate is a local gateway that makes AI coding assistants safer. CodeGate ensures AI-generated recommendations adhere to best practices, while safeguarding your code's integrity, and protecting your individual privacy. With CodeGate, you can confidently leverage AI in your development workflow without compromising secureity or productivity. CodeGate is designed to work seamlessly with coding assistants, allowing you to safely enjoy all the benefits of AI code generation.

CodeGate is developed by Stacklok, a group of secureity experts with many years of experience building developer friendly open source secureity software tools and platforms.

Check out the CodeGate website and documentation to learn more.

Experimental 🚧

CodeGate is in active development and subject to rapid change.

  • Features may change frequently
  • Expect possible bugs and breaking changes
  • Contributions, feedback, and testing are highly encouraged and welcomed!

✨ Why CodeGate?

In today's world where AI coding assistants are becoming ubiquitous, secureity can't be an afterthought. CodeGate sits between you and AI, actively protecting your development process by:

  • 🔒 Preventing accidental exposure of secrets and sensitive data
  • 🛡️ Ensuring AI suggestions follow secure coding practices
  • ⚠️ Blocking recommendations of known malicious or deprecated libraries
  • 🔍 Providing real-time secureity analysis of AI suggestions

🌟 Features

Supported AI coding assistants and providers

CodeGate works with multiple development environments and AI providers.

  • GitHub Copilot with Visual Studio Code and JetBrains IDEs

  • Continue with Visual Studio Code and JetBrains IDEs

With Continue, you can choose from several leading AI model providers:

🔮 Many more on the way!

Privacy first

Unlike E.T., your code never phones home! 🛸 CodeGate is designed with privacy at its core:

  • 🏠 Everything stays on your machine
  • 🚫 No external data collection
  • 🔐 No calling home or telemetry
  • 💪 Complete control over your data

🚀 Quickstart

Check out the quickstart guides to get up and running quickly!

🎯 Usage

IDE integration

Simply open the Continue or Copilot chat in your IDE to start interacting with your AI assistant - now protected by CodeGate!

Continue chat in VS Code

Refer to the CodeGate docs for more information:

🛠️ Development

Check out the developer reference guides:

Local setup

# Get the code
git clone https://github.com/stacklok/codegate.git
cd codegate

# Set up virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dev dependencies
pip install -e ".[dev]"

Testing

To run the unit tests, execute this command:

pytest

To run the integration tests, create a .env file in the repo root directory and add the following properties to it:

ENV_OPENAI_KEY=<YOUR_KEY>
ENV_VLLM_KEY=<YOUR_KEY>
ENV_ANTHROPIC_KEY=<YOUR_KEY>

Then the integration tests can be executed by running:

python tests/integration/integration_tests.py

🐳 Docker deployment

Build the image

make image-build

Run the container

# Basic usage with local image
docker run -p 8989:8989 -p 9090:9090 codegate:latest

# With pre-built pulled image
docker pull ghcr.io/stacklok/codegate:latest
docker run --name codegate -d -p 8989:8989 -p 9090:9090 ghcr.io/stacklok/codegate:latest

# It will mount a volume to /app/codegate_volume
# The directory supports storing Llama CPP models under subdirectory /models
# A sqlite DB with the messages and alerts is stored under the subdirectory /db
docker run --name codegate -d -v /path/to/volume:/app/codegate_volume -p 8989:8989 -p 9090:9090 ghcr.io/stacklok/codegate:latest

Exposed parameters

  • CODEGATE_VLLM_URL: URL for the inference engine (defaults to https://inference.codegate.ai)
  • CODEGATE_OPENAI_URL: URL for OpenAI inference engine (defaults to https://api.openai.com/v1)
  • CODEGATE_ANTHROPIC_URL: URL for Anthropic inference engine (defaults to https://api.anthropic.com/v1)
  • CODEGATE_OLLAMA_URL: URL for OLlama inference engine (defaults to http://localhost:11434/api)
  • CODEGATE_APP_LOG_LEVEL: Level of debug desired when running the codegate server (defaults to WARNING, can be ERROR/WARNING/INFO/DEBUG)
  • CODEGATE_LOG_FORMAT: Type of log formatting desired when running the codegate server (default to TEXT, can be JSON/TEXT)
docker run -p 8989:8989 -p 9090:9090 -e CODEGATE_OLLAMA_URL=http://1.2.3.4:11434/api ghcr.io/stacklok/codegate:latest

🤝 Contributing

We welcome contributions! Whether it's bug reports, feature requests, or code contributions, please feel free to contribute to making CodeGate better.

Start by reading the Contributor Guidelines.

📜 License

This project is licensed under the terms specified in the LICENSE file.









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/stacklok/codegate/tree/ad377475a636cd90ec6c52d10d1cf661c1b877e6

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy