Quickstart
Welcome to Forge! This quickstart guide will have you using AI-powered coding assistance in just a few minutes. By the end, you'll understand how to use Forge for common development tasks.
Before you begin
Make sure you have:
- Installed Forge Code
- A terminal or command prompt open
- A code project to work with (or create a new one)
Step 1: Start your first session
Open your terminal in any project directory and start Forge:
cd /path/to/your/project
forge
You'll see the Forge prompt inside a new interactive session:
✻ Welcome to Forge!
Starting session...
Context: /path/to/your/project
> Try asking "what does this project do?" or "help me add a new feature"
Step 2: Understand your codebase
Let's start by having Forge analyze your project. Try one of these commands:
> analyze the architecture of this codebase and identify any potential issues
Forge will examine your project structure, dependencies, and patterns. You can also ask for specific insights:
> what are the main components and how do they interact?
> identify any code smells or areas that need refactoring
> show me the data flow through this application
> what testing strategy is currently in place and how can it be improved?
Note: Forge reads your files as needed and maintains context throughout the conversation - you don't have to manually add files or repeat information.
Step 3: Make your first code change
Now let's have Forge write some code. Try a simple task:
> add a unit test for tree diffing function
Forge will:
- Identify the appropriate file
- Make the edit
Step 4: Use Git with Forge
Forge makes Git operations conversational and intelligent:
> what files have I changed?
> commit my changes with a descriptive message
You can also prompt for more complex Git operations:
> create a new branch called feature/quickstart-demo
> show me the last 5 commits
> help me resolve any merge conflicts
Step 5: Debug and fix issues
Forge excels at debugging and problem-solving. Describe issues in natural language:
> there's a bug where users can submit empty forms - help me fix it
Or ask for help with specific errors:
> I'm getting "TypeError: Cannot read property 'map' of undefined" - what might be causing this?
Forge will:
- Analyze the error context
- Identify potential causes
- Suggest multiple solutions
- Implement fixes with your approval
Step 6: Explore common workflows
Here are some powerful ways to work with Forge:
Refactor code
> refactor the authentication module to use async/await instead of callbacks
Write tests
> write unit tests for the calculator functions
Add new features
> add input validation to the user registration form
Code review
> review my changes and suggest improvements
Tip: Think of Forge as your AI pair programmer. Describe what you want to achieve in natural language, and it will help you get there efficiently.
Advanced usage patterns
Multi-step tasks
Break complex tasks into steps:
> 1. create a new API endpoint for user profiles
> 2. add validation for required fields
> 3. write tests for the endpoint
Context-aware assistance
Let Forge explore before making changes:
> analyze the database schema first
> how does error handling work in this app?
> then add proper error handling to the login endpoint
Specialized agents
Switch between different AI agents for specific tasks:
- Forge Agent: Full execution mode for implementing changes
- Muse Agent: Analysis mode for planning and review without modifications
Save time with shortcuts
- Press ↑ for command history
- Use Tab for command completion
- Type
/
to see all available slash commands
What's next?
Now that you've learned the basics, explore more advanced features:
Getting help
- In Forge: Type
/help
or ask "how do I..." - Documentation: Browse these guides for detailed information
- Community: Join our Discord for tips and support
Ready to dive deeper? Explore our comprehensive guides to unlock Forge's full potential for your development workflow.