Skip to content

stacklok/codegate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
CodeGate logo

Release | CI | License: Apache 2.0 | Star on GitHub | Discord

Website | Documentation | YouTube | Discord


CodeGate: AI Development environments simplified.

From Stacklok

CodeGate is the ultimate toolkit for developers using coding assistants to build AI applications. It streamlines multi-environment workflows, enabling you to consume AI with confidence from development to production. It empowers ongoing AI application management by optimizing model routing, prompt tracking and security enforcement, ensuring privacy, compliance, and robust operational integrity.


CodeGate Architecture

CodeGate dashboard

πŸš€ Why Developers Love CodeGate

AI unlocks new levels of productivity, but you need to use consume with confidence. CodeGate helps you do just that, by providing a suite of features that make AI development safe and efficient.

Key Features

  • Workspaces: Organize and personalize your AI tooling and environments.
  • Prompt & Alert History: Track AI suggestions and security insights in one place.
  • Model Muxing: Switch seamlessly between AI models per project or route specfic file types to a particular model or provider.
  • Custom Instructions: Tailor your AI’s behavior to match your coding style, by providing custom prompts or instructions per project or workspace.
  • Prompt Database: Leverage a growing collection of developer-contributed prompts or create and store your own, to make them available across all your projects and workspaces.

πŸ”’ Built-in Security, Zero Effort

  • Secrets Protection: Prevent sensitive data from leaking to AI cloud service providers.
  • Malicious Package Detection: Block risky dependencies before they reach your code, using Stackloks free AI / ML inteligence threat detection pipeline.
  • Command Execution Monitoring: Stop AI-generated shell commands from running unsafe actions within your agent or coding assistant.
  • PII Protection: Prevent personally identifiable information from being exposed to AI cloud service providers, such as credit card numbers, social security numbers, and more.

πŸš€ Quickstart

Prerequisites

CodeGate is distributed as a Docker container. You need a container runtime like Docker Desktop or Docker Engine. Podman and Podman Desktop are also supported. CodeGate works on Windows, macOS, and Linux operating systems with x86_64 and arm64 (ARM and Apple Silicon) CPU architectures.

These instructions assume the docker CLI is available. If you use Podman, replace docker with podman in all commands.

Installation

To start CodeGate, run this simple command:

docker run --name codegate -d -p 8989:8989 -p 9090:9090 -p 8990:8990 \
  --mount type=volume,src=codegate_volume,dst=/app/codegate_volume \
  --restart unless-stopped ghcr.io/stacklok/codegate:latest

That’s it! CodeGate is now running locally.

Get into action

Now it's time to configure your preferred AI coding assistant to use CodeGate See supported AI Coding Assistants and providers

βš™οΈ For advanced configurations and parameter references, check out the CodeGate Install and Upgrade documentation.


πŸ–₯️ Dashboard

CodeGate includes a web dashboard that provides:

  • Manage workspaces and AI model / provider routing rules.
  • Track security risks detected by CodeGate.
  • Manage project prompts and apply them across all your projects and
    workspaces.
  • History of interactions between your AI coding assistant and your LLM.
CodeGate dashboard

Accessing the dashboard

Open http://localhost:9090 in your web browser to access the dashboard.

To learn more, visit the CodeGate Dashboard documentation.


πŸ” Features

Workspaces

CodeGate logo

Workspaces are a way to organize your AI tooling and environments. You can create multiple workspaces to switch between them as needed.

Workspaces can be used to:

  • Switch between different AI models or providers.
  • Apply different prompts or instructions to different projects.
  • Isolate projects by applying different settings or rules.

Workspaces are then available within all the different AI coding assistants and tools that CodeGate supports (i.e. Aider, Cline, Continue, Copilot, Open-Interpreter, etc.)

Prompt Database

CodeGate logo

The Prompt Database is a collection of prompts that you can use across all your projects and workspaces. You can also contribute your own prompts to the database.

Model Muxing

CodeGate logo

Model Muxing is a feature that allows you to route different workspaces or to different AI models or providers, even down the level of a single file.

Secrets encryption

CodeGate helps you protect sensitive information from being accidentally exposed to AI models and third-party AI provider systems by redacting detected secrets from your prompts using encryption. Learn more

Dependency risk awareness

LLMs’ knowledge cutoff date is often months or even years in the past. They might suggest outdated, vulnerable, or non-existent packages (hallucinations), exposing you and your users to security risks.

CodeGate scans direct, transitive, and development dependencies in your package definition files, installation scripts, and source code imports that you supply as context to an LLM. Learn more

Security reviews

CodeGate performs security-centric code reviews, identifying insecure patterns or potential vulnerabilities to help you adopt more secure coding practices. Learn more


πŸ€– Supported AI coding assistants and providers

  • Local / self-managed:
    • Ollama
  • Hosted:
    • OpenAI and compatible APIs

πŸ”₯ Getting started with CodeGate and aider - watch on YouTube

  • Local / self-managed:
    • Ollama
    • LM Studio
  • Hosted:
    • Anthropic
    • OpenAI and compatible APIs
  • Local / self-managed:
    • Ollama
    • llama.cpp
    • vLLM
  • Hosted:
    • Anthropic
    • OpenAI and compatible APIs
  • The Copilot plugin works with Visual Studio Code (VS Code) (JetBrains is coming soon!)

πŸ›‘οΈ Privacy first

Unlike other tools, with CodeGate your code never leaves your machine. CodeGate is built with privacy at its core:

  • 🏠 Everything stays local
  • 🚫 No external data collection
  • πŸ” No calling home or telemetry
  • πŸ’ͺ Complete control over your data

πŸ› οΈ Development

Are you a developer looking to contribute? Dive into our technical resources:


πŸ“œ License

CodeGate is licensed under the terms specified in the LICENSE file.


🌟 Support us

Love CodeGate? Starring this repository and sharing it with others helps CodeGate grow 🌱

Star on GitHub


🀝 Contributing

We welcome contributions! Whether you're submitting bug reports, feature requests, or code contributions, your input makes CodeGate better for everyone. We thank you ❀️!

Start by reading our Contributor guidelines.

Thank you!

Made with contrib.rocks.