Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sankeyraut/forge

 
 

Repository files navigation

CI Status GitHub Release Discord CLA assistant

⚒️ Forge: AI-Enhanced Terminal Development Environment

Code-Forge Demo

Forge is a comprehensive coding agent that integrates AI capabilities with your development environment, offering sophisticated assistance while maintaining the efficiency of your existing workflow. ✨

🚀 Installation

Install Forge globally using npm:

npm install -g @antinomyhq/forge

Or run directly without installation using npx:

npx @antinomyhq/forge

This method works on Windows, macOS, and Linux, providing a consistent installation experience across all platforms.

🔌 Provider Configuration

Forge requires two configuration files in your project directory:

  1. A .env file with your API credentials
  2. A forge.yaml file specifying additional settings

Below are setup instructions for each supported provider:

OpenRouter (Recommended)

# .env
OPENROUTER_API_KEY=<your_openrouter_api_key>

No changes in forge.yaml is required

OpenAI

# .env
OPENAI_API_KEY=<your_openai_api_key>
# forge.yaml
model: o3-mini-high

Anthropic

# .env
ANTHROPIC_API_KEY=<your_anthropic_api_key>
# forge.yaml
model: claude-3.7-sonnet

Google Vertex AI

# .env
PROJECT_ID=<your_project_id>
LOCATION=<your_location>
OPENAI_API_KEY=<vertex_ai_key>
OPENAI_URL=https://${LOCATION}-aiplatform.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/${LOCATION}/endpoints/openapi
# forge.yaml
model: publishers/anthropic/models/claude-3-7-sonnet

OpenAI-Compatible Providers

# .env
OPENAI_API_KEY=<your_provider_api_key>
OPENAI_URL=<your_provider_url>
# forge.yaml
model: <provider-specific-model>

Amazon Bedrock

To use Amazon Bedrock models with Forge, you'll need to first set up the Bedrock Access Gateway:

  1. Set up Bedrock Access Gateway:

    • Follow the deployment steps in the Bedrock Access Gateway repo
    • Create your own API key in Secrets Manager
    • Deploy the CloudFormation stack
    • Note your API Base URL from the CloudFormation outputs
  2. Create these files in your project directory:

    # .env
    OPENAI_API_KEY=<your_bedrock_gateway_api_key>
    OPENAI_URL=<your_bedrock_gateway_base_url>
    # forge.yaml
    model: anthropic.claude-3-opus

Advanced Configuration Options

custom_rules

Add your own guidelines that all agents should follow when generating responses.

# forge.yaml
custom_rules: |
  1. Always add comprehensive error handling to any code you write.
  2. Include unit tests for all new functions.
  3. Follow our team's naming convention: camelCase for variables, PascalCase for classes.

The forge.yaml file supports several advanced configuration options that let you customize Forge's behavior. Here's a comprehensive list of available fields:

commands

Define custom commands that as shortcuts for repetitive prompts:

# forge.yaml
commands:
  - name: "refactor"
    description: "Refactor selected code"
    prompt: "Please refactor this code to improve readability and performance"

model

Specify the default AI model to use for all agents in the workflow.

# forge.yaml
model: "claude-3.7-sonnet"

max_walker_depth

Control how deeply Forge traverses your project directory structure when gathering context.

# forge.yaml
max_walker_depth: 3 # Limit directory traversal to 3 levels deep

temperature

Adjust the creativity and randomness in AI responses. Lower values (0.0-0.3) produce more focused, deterministic outputs, while higher values (0.7-2.0) generate more diverse and creative results.

# forge.yaml
temperature: 0.7 # Balanced creativity and focus

📚 Documentation

For comprehensive documentation on all features and capabilities, please visit the documentation site.

🤝 Community

Join our vibrant Discord community to connect with other Code-Forge users and contributors, get help with your projects, share ideas, and provide feedback! 🌟

Discord

⭐ Support Us

Your support drives Code-Forge's continued evolution! By starring our GitHub repository, you:

  • Help others discover this powerful tool 🔍
  • Motivate our development team 💪
  • Enable us to prioritize new features 🛠️
  • Strengthen our open-source community 🌱

About

AI enabled shell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 90.9%
  • Handlebars 7.8%
  • Other 1.3%