Skip to content

Commit ff7a6c6

Browse files
committed
updated
1 parent 6f1dc4a commit ff7a6c6

File tree

3 files changed

+283
-25
lines changed

3 files changed

+283
-25
lines changed

docs/developer/cli/authentication.md

Lines changed: 112 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,77 @@ Authentication in Codebolt CLI provides:
1616

1717
## Login Process
1818

19-
### Initial Login
19+
### Browser-Based Authentication
2020

21-
To authenticate with your Codebolt account:
21+
To authenticate with your Codebolt account, the CLI uses a secure browser-based OAuth flow:
2222

2323
```bash
2424
codebolt-cli login
2525
```
2626

2727
This command will:
28-
1. Prompt you for your credentials
29-
2. Authenticate with the Codebolt platform
30-
3. Store your session securely
31-
4. Confirm successful authentication
28+
1. Generate a secure authentication URL
29+
2. Automatically open your default browser (or provide a URL to copy)
30+
3. Redirect you to the Codebolt portal for authentication
31+
4. Complete the authentication process in the browser
32+
5. Automatically return you to the CLI with confirmation
33+
6. Store your session securely locally
3234

3335
### Interactive Login Flow
3436

35-
The login process includes interactive prompts:
37+
The modern login process provides a seamless browser experience:
3638

3739
```bash
3840
$ codebolt-cli login
39-
? Email: your-email@example.com
40-
? Password: [hidden]
41-
✓ Successfully logged in!
41+
Please login first
42+
Please visit this URL to login: http://portal.codebolt.ai/performSignIn?uid=74fdc036-1046-4f06-b547-cda931a9a27d&loginFlow=app
43+
Login successful!
44+
User data saved successfully
45+
```
46+
47+
**Benefits of Browser-Based Authentication:**
48+
- More secure than CLI password entry
49+
- Supports all authentication methods (OAuth, SSO, MFA)
50+
- Familiar login interface
51+
- No need to enter credentials in terminal
52+
- Automatic session management
53+
54+
### Manual URL Access
55+
56+
If the browser doesn't open automatically:
57+
58+
1. Copy the provided URL from the terminal
59+
2. Paste it into your browser
60+
3. Complete the login process
61+
4. The CLI will automatically detect successful authentication
62+
5. You can close the browser tab once you see "Login successful!"
63+
64+
### Authentication Success Page
65+
66+
After successful browser authentication, you'll see:
67+
- "You have successfully signed in. You can close this Page"
68+
- "Now you can return to the app"
69+
- The CLI will automatically confirm the login
70+
71+
### Authentication Flow Diagram
72+
73+
```
74+
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────────┐
75+
│ CLI Command │ │ Browser │ │ Codebolt Portal │
76+
│ │ │ │ │ │
77+
├─────────────────┤ ├──────────────────┤ ├─────────────────────┤
78+
│ codebolt-cli │ │ │ │ │
79+
│ login │───▶│ Opens auth URL │───▶│ Login page │
80+
│ │ │ │ │ │
81+
│ Generates UUID │ │ User completes │ │ Validates creds │
82+
│ & auth URL │ │ authentication │ │ & MFA (if enabled) │
83+
│ │ │ │ │ │
84+
│ Polls for │◀───│ Success page │◀───│ Redirects with │
85+
│ completion │ │ displayed │ │ success status │
86+
│ │ │ │ │ │
87+
│ Stores tokens │ │ User closes │ │ Session established │
88+
│ locally │ │ browser tab │ │ │
89+
└─────────────────┘ └──────────────────┘ └─────────────────────┘
4290
```
4391

4492
## Session Management
@@ -51,7 +99,7 @@ To verify if you're currently logged in:
5199
codebolt-cli listagents
52100
```
53101

54-
If you're authenticated, this will display your agents. If not, you'll receive an authentication error.
102+
If you're authenticated, this will display your agents. If not, you'll receive an authentication error prompting you to login.
55103

56104
### Logout
57105

@@ -87,12 +135,36 @@ The CLI stores authentication data locally in a secure format. The exact locatio
87135

88136
### Common Issues
89137

90-
#### Invalid Credentials
138+
#### Browser Not Opening
91139
```bash
92-
Error: Invalid email or password
140+
Please visit this URL to login: http://portal.codebolt.ai/performSignIn?uid=...
93141
```
94142

95-
**Solution**: Verify your email and password are correct. If you've forgotten your password, reset it on the Codebolt platform.
143+
**Solution**: If your browser doesn't open automatically:
144+
- Copy the provided URL and paste it into your browser manually
145+
- Ensure you have a default browser set
146+
- Check if browser access is blocked by security software
147+
148+
#### Authentication URL Expired
149+
```bash
150+
Error: Authentication session expired or invalid
151+
```
152+
153+
**Solution**: The authentication URL has a time limit. Start the login process again:
154+
```bash
155+
codebolt-cli login
156+
```
157+
158+
#### Browser Authentication Failed
159+
```bash
160+
Error: Failed to complete browser authentication
161+
```
162+
163+
**Solutions**:
164+
- Ensure you completed the login process in the browser
165+
- Check that you didn't close the browser before seeing the success message
166+
- Verify your Codebolt account credentials on the platform
167+
- Try clearing browser cache and cookies for codebolt.ai
96168

97169
#### Session Expired
98170
```bash
@@ -112,8 +184,9 @@ Error: Unable to connect to authentication server
112184

113185
**Solutions**:
114186
- Check your internet connection
115-
- Verify firewall settings
187+
- Verify firewall settings allow access to portal.codebolt.ai
116188
- Try again after a few minutes
189+
- Check if corporate proxy is blocking the connection
117190

118191
#### Permission Errors
119192
```bash
@@ -171,20 +244,37 @@ If you've forgotten your password:
171244

172245
## Security Best Practices
173246

247+
### Enhanced Security with Browser Authentication
248+
249+
The browser-based authentication provides several security advantages:
250+
251+
- **No Credential Exposure**: Passwords never pass through the CLI
252+
- **Secure Token Exchange**: Uses OAuth 2.0/OpenID Connect standards
253+
- **Session Isolation**: Each authentication session uses unique tokens
254+
- **Automatic Expiration**: Tokens have built-in expiration for security
255+
174256
### Recommendations
175257

176258
1. **Use Strong Passwords**: Ensure your Codebolt account has a strong, unique password
177-
2. **Regular Logout**: Logout when finished, especially on shared machines
178-
3. **Monitor Sessions**: Regularly check your account for unauthorized access
179-
4. **Keep CLI Updated**: Update the CLI regularly for security patches
259+
2. **Enable MFA**: Use multi-factor authentication for additional security
260+
3. **Regular Logout**: Logout when finished, especially on shared machines
261+
4. **Monitor Sessions**: Regularly check your account for unauthorized access
262+
5. **Keep CLI Updated**: Update the CLI regularly for security patches
263+
6. **Secure Browser**: Ensure your browser is up-to-date and secure
264+
7. **Private Browsing**: Consider using private/incognito mode for sensitive operations
180265

181266
### Multi-Factor Authentication
182267

183-
If your Codebolt account has multi-factor authentication enabled:
268+
The browser-based authentication flow seamlessly supports multi-factor authentication:
269+
270+
1. The CLI opens the browser authentication page
271+
2. Complete your username/password as normal
272+
3. The browser will prompt for your MFA code (if enabled)
273+
4. Enter the code from your authenticator app in the browser
274+
5. Complete the authentication process
275+
6. Return to the CLI which will automatically detect successful login
276+
184277

185-
1. The CLI will prompt for your MFA code during login
186-
2. Enter the code from your authenticator app
187-
3. The session will be established after successful verification
188278

189279
## Commands Requiring Authentication
190280

docs/developer/overview.md

Lines changed: 155 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,158 @@ sidebar_position: 1
55

66
# Developer Guide
77

8-
This guide is for developers who want to build agents for Codebolt.
8+
Welcome to the Codebolt Developer Guide! This comprehensive guide provides everything you need to build, extend, and customize the Codebolt platform. Whether you're creating intelligent AI agents, developing custom tools, or building application templates, this guide will help you leverage Codebolt's powerful ecosystem.
9+
10+
## Main Components
11+
12+
### 🤖 [Agents](./agents/agentIntroduction.md)
13+
**Build intelligent AI assistants that control your entire development environment**
14+
15+
Codebolt agents are the core of the platform - intelligent AI assistants that leverage Codebolt's APIs to interact with your code editor. Unlike other editors that limit you to predefined prompts and tools, Codebolt provides actual editor APIs for complete programmatic control.
16+
17+
**Key Features:**
18+
- **Full Editor Control**: Like Selenium for browsers, but for code editors
19+
- **Custom Logic**: Write code-based agents with custom workflows and processes
20+
- **Multi-Agent Support**: Orchestrate multiple agents for complex tasks
21+
- **Agentic Architecture**: Combines user intent understanding, task planning, and intelligent decision making
22+
23+
**What You'll Learn:**
24+
- [Agent Architecture](./agents/1_agentarchitecture/1_architecture.md) - Understanding the core architecture
25+
- [Creating Custom Agents](./agents/3_customagents/3_firstExtension.md) - Build your first agent from scratch
26+
- [Remix Agents](./agents/4_remixagents/aboutremixagents.md) - Quick cursor-style agent creation
27+
- [Multi-Agent Systems](./agents/multi-agent.md) - Orchestrating multiple agents
28+
29+
---
30+
31+
### 🛠️ [Tools](./tools/overview.md)
32+
**Extend agent capabilities with custom MCP-compatible utilities**
33+
34+
Codebolt Tools are custom utilities built on the Model Context Protocol (MCP) standard that extend agent capabilities. They provide specialized functionality for external integrations, automation, and domain-specific tasks.
35+
36+
**Key Features:**
37+
- **MCP Compatible**: Full backward compatibility with existing MCP implementations
38+
- **Reusable**: Share tools across multiple agents and projects
39+
- **Configurable**: Accept parameters for customization
40+
- **Registry Integration**: Publish and discover tools in the community
41+
42+
**What You'll Learn:**
43+
- [Creating Tools](./tools/create_tool.md) - Build custom tools from scratch
44+
- [Tool Registry](./tools/tool_registry.md) - Publish and discover tools
45+
- [Testing Tools](./tools/testlocalmcp.md) - Local development and testing
46+
- [Publishing Tools](./tools/publish_tool.md) - Share your tools with the community
47+
48+
---
49+
50+
### 💻 [CLI](./cli/overview.md)
51+
**Command-line interface for agent and tool management**
52+
53+
The Codebolt CLI is a powerful Node.js-based command-line tool that enables developers to create, manage, and deploy Codebolt agents and tools. It provides a complete development workflow from creation to deployment.
54+
55+
**Key Features:**
56+
- **Agent Lifecycle Management**: Create, publish, pull, start, and clone agents
57+
- **Tool Development**: Create and manage custom MCP tools
58+
- **Authentication**: Secure login/logout functionality
59+
- **Project Organization**: Manage projects in structured directories
60+
61+
**What You'll Learn:**
62+
- [Installation](./cli/installation.md) - Get the CLI installed and configured
63+
- [Authentication](./cli/authentication.md) - Set up your Codebolt account
64+
- [Agent Management](./cli/agents.md) - Create and manage agents via CLI
65+
- [Tool Development](./cli/tools.md) - Build and test tools locally
66+
- [Command Reference](./cli/commands.md) - Complete command documentation
67+
68+
---
69+
70+
### 📚 [TypeScript SDK](./typescriptSdk/overview.md)
71+
**Comprehensive library for building powerful Codebolt integrations**
72+
73+
The CodeboltJS TypeScript SDK (`@codebolt/codeboltjs`) is the core library that powers Codebolt agents. It provides a unified interface to interact with various platform capabilities through 20+ specialized modules.
74+
75+
**Key Features:**
76+
- **Comprehensive Modules**: File system, terminal, browser, Git, LLM, and more
77+
- **Agent Framework**: High-level Agent class for building sophisticated AI workflows
78+
- **Type Safety**: Full TypeScript support with comprehensive type definitions
79+
- **Real-time Communication**: WebSocket-based bidirectional communication
80+
81+
**What You'll Learn:**
82+
- [Installation & Setup](./typescriptSdk/installation.md) - Get started with the SDK
83+
- [Core Modules](./typescriptSdk/core-modules.md) - Explore available functionality
84+
- [Agent Framework](./typescriptSdk/agent-framework.md) - Build sophisticated agents
85+
- [API Reference](./typescriptSdk/api-reference.md) - Complete API documentation
86+
87+
---
88+
89+
### 📋 [Templates](./templates/overview.md)
90+
**Pre-configured application blueprints for rapid development**
91+
92+
Codebolt Templates are reusable project templates that provide complete application blueprints with best practices, configurations, and development workflows. They enable rapid bootstrapping of new projects.
93+
94+
**Key Features:**
95+
- **Complete Project Structure**: Pre-organized folders, files, and configurations
96+
- **Multiple Types**: Frontend, backend, full-stack, and specialized templates
97+
- **Best Practices**: Industry-standard patterns and security configurations
98+
- **Registry Integration**: Publish and discover templates in the community
99+
100+
**What You'll Learn:**
101+
- [Creating Templates](./templates/creating-templates.md) - Build reusable project templates
102+
- [Configuration](./templates/configuration.md) - Set up codeboltconfig.yaml
103+
- [Best Practices](./templates/best-practices.md) - Follow industry standards
104+
- [Publishing](./templates/publishing.md) - Share templates with the community
105+
106+
---
107+
108+
## Getting Started
109+
110+
### For New Developers
111+
1. **Start with [Agents](./agents/quickstart.md)** - Learn the core concepts and create your first agent
112+
2. **Install the [CLI](./cli/installation.md)** - Set up your development environment
113+
3. **Explore [Templates](./templates/overview.md)** - Use existing templates to bootstrap projects
114+
4. **Build [Tools](./tools/quickstart.md)** - Extend functionality with custom tools
115+
116+
### For Experienced Developers
117+
1. **Deep dive into the [TypeScript SDK](./typescriptSdk/overview.md)** - Leverage the full power of the platform
118+
2. **Create [Custom Agents](./agents/3_customagents/3_firstExtension.md)** - Build sophisticated AI workflows
119+
3. **Develop [Advanced Tools](./tools/create_tool.md)** - Create specialized utilities
120+
4. **Contribute [Templates](./templates/creating-templates.md)** - Share best practices with the community
121+
122+
## Development Workflow
123+
124+
```mermaid
125+
graph TB
126+
A[Install CLI] --> B[Authenticate]
127+
B --> C{What to Build?}
128+
129+
C -->|Agent| D[Create Agent]
130+
C -->|Tool| E[Create Tool]
131+
C -->|Template| F[Create Template]
132+
133+
D --> G[Develop with SDK]
134+
E --> H[Implement MCP Tool]
135+
F --> I[Configure Template]
136+
137+
G --> J[Test Locally]
138+
H --> J
139+
I --> J
140+
141+
J --> K[Publish to Registry]
142+
K --> L[Share with Community]
143+
```
144+
145+
## Community and Support
146+
147+
- **GitHub**: [Codebolt Organization](https://github.com/codeboltai)
148+
- **Discord**: [Join our community](https://discord.gg/codebolt)
149+
- **Registry**: [Browse agents, tools, and templates](https://portal.codebolt.ai)
150+
- **Documentation**: [Complete documentation](https://docs.codebolt.ai)
151+
152+
## What Makes Codebolt Different?
153+
154+
Codebolt is built from the ground up for the AI-agentic era, providing:
155+
156+
- **Full Editor Control**: Unlike other editors that limit customization to prompts, Codebolt provides complete programmatic control
157+
- **Code-Based Agents**: Write actual code with custom logic, workflows, and processes
158+
- **MCP Compatibility**: Full support for the Model Context Protocol standard
159+
- **Extensible Architecture**: Every component can be extended, customized, and shared
160+
- **Community-Driven**: Open ecosystem where developers can share and discover solutions
161+
162+
Ready to start building? Choose your path above and dive into the Codebolt ecosystem!

docs/user/application/3_dashboard.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Templates are ready-made project setups like Empty, React, Node, Express, Next,
7676

7777
When you click on Help, it shows a video and steps that explain how to create a new project. This guides users through the process easily.
7878

79-
<video
79+
<!-- <video
8080
autoPlay
8181
muted
8282
loop
@@ -89,8 +89,22 @@ When you click on Help, it shows a video and steps that explain how to create a
8989
>
9090
<source src="/onboarding/video/help.mp4" type="video/mp4" />
9191
Your browser does not support the video tag.
92-
</video>
92+
</video> -->
9393

94+
<video
95+
autoPlay
96+
muted
97+
loop
98+
playsInline
99+
style={{
100+
maxWidth: '100%',
101+
height: 'auto',
102+
borderRadius: '8px'
103+
}}
104+
>
105+
<source src="/onboarding/video/template.mp4" type="video/mp4" />
106+
Your browser does not support the video tag.
107+
</video>
94108

95109
## SignOut
96110

0 commit comments

Comments
 (0)