Skip to content

Commit 84bb511

Browse files
committed
heavily simplified cli
1 parent 8229ee6 commit 84bb511

4 files changed

Lines changed: 206 additions & 1118 deletions

File tree

CLI modifications.md

Lines changed: 64 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -10,104 +10,87 @@ The initialization process now intelligently handles dependencies based on the u
1010
- Conda environment (via `CONDA_PREFIX`)
1111
- Python virtual environment (via `VIRTUAL_ENV`)
1212
- No environment
13-
- Added environment validation checks
14-
- Verifies UV installation and configuration
1513

1614
#### UV Integration
17-
- Uses UV's native virtual environment management
18-
- Implements proper build isolation with `--use-pep517`
19-
- Generates both requirements.txt and lock file
20-
- Verifies dependency integrity with `uv pip check`
21-
- Handles timeouts for long-running operations
22-
23-
### 2. Environment Management
24-
- Uses UV's automatic `.venv` creation
25-
- Prevents running in active environments
26-
- Validates environment integrity after creation
27-
- Provides clear activation instructions
28-
- Handles platform-specific paths (Windows/Unix)
29-
30-
### 3. Project Initialization
31-
- Improved project initialization process
32-
- Split functionality into focused functions
33-
- Added proper error handling and status returns
34-
- Provides detailed progress information
35-
- Clear next steps after setup
36-
37-
### 4. Dependency Management
38-
- Uses UV's pip compile for requirements generation
39-
- Implements proper build isolation
40-
- Verifies installation integrity
41-
- Handles dependency conflicts
42-
- Provides fallback instructions
43-
44-
### 5. Error Handling
45-
- Added environment validation function
46-
- Proper timeout handling for long operations
47-
- Clear error messages and recovery steps
48-
- Status returns for all operations
49-
- Separate manual setup instructions
15+
- Checks for UV installation
16+
- For venv + UV environments:
17+
```bash
18+
# Automatically runs:
19+
uv lock
20+
uv sync
21+
```
22+
- Shows environment-specific guidance:
23+
- Conda users: Instructions for UV in conda
24+
- Venv users without UV: UV installation steps
25+
- No environment: Full setup instructions
26+
27+
### 2. CrewAI Migration Wizard
28+
Added a new `--migratecrew` flag to facilitate migration from CrewAI projects:
29+
30+
```bash
31+
agentstack init <project_name> --migratecrew
32+
```
33+
34+
#### Features
35+
- Streamlined migration process
36+
- Only asks for essential information:
37+
- Agent names (snake_case)
38+
- Task names (snake_case)
39+
- Task-to-agent assignments
40+
- Provides placeholder comments for:
41+
- Agent roles
42+
- Agent goals
43+
- Agent backstories
44+
- Task descriptions
45+
- Expected outputs
46+
47+
#### Example Placeholders
48+
```python
49+
# Agent
50+
agent['role'] = "# Replace with your CrewAI agent's role:
51+
# Example: agent.role = 'Senior Data Analyst'"
52+
53+
# Task
54+
task['description'] = "# Replace with your CrewAI task's description:
55+
# Example: task.description = 'Analyze monthly sales data'"
56+
```
57+
58+
### 3. Flag Compatibility
59+
Updated flag validation to ensure proper usage:
60+
- `--template`: Cannot be used with `--wizard` or `--migratecrew`
61+
- `--wizard`: Cannot be used with `--template` or `--migratecrew`
62+
- `--migratecrew`: Cannot be used with `--template` or `--wizard`
5063

5164
## Usage Examples
5265

5366
### Standard Project Creation
5467
```bash
55-
agentstack init my_project
68+
agentstack init myproject
5669
```
5770

5871
### Using the Wizard
5972
```bash
60-
agentstack init --wizard
73+
agentstack init myproject --wizard
74+
# or
75+
agentstack init myproject -w
6176
```
6277

63-
### With Template
78+
### Migrating from CrewAI
6479
```bash
65-
agentstack init my_project --template hello_alex
80+
agentstack init myproject --migratecrew
81+
# or
82+
agentstack init myproject -m
6683
```
6784

68-
## Environment Setup
69-
70-
The CLI now offers a robust UV-based environment setup:
71-
72-
### 1. Automatic Setup
73-
The CLI will:
74-
1. Check for and prevent running in active environments
75-
2. Create a new .venv using UV
76-
3. Install dependencies with build isolation
77-
4. Generate requirements.txt and lock file
78-
5. Validate environment integrity
79-
80-
### 2. Manual Setup
81-
If automatic setup fails, clear instructions are provided:
85+
### Using a Template
8286
```bash
83-
# 1. Ensure no active environment
84-
deactivate
85-
86-
# 2. Navigate to project
87-
cd [project_name]
88-
89-
# 3. Install with build isolation
90-
uv pip install --use-pep517 .
91-
92-
# 4. Generate requirements and lock file
93-
uv pip compile requirements.txt
94-
95-
# 5. Verify installation
96-
uv pip check
87+
agentstack init myproject --template hello_alex
88+
# or
89+
agentstack init myproject -t hello_alex
9790
```
9891

9992
## Next Steps
100-
101-
### Planned Improvements
102-
- Add CrewAI project migration support
103-
- Enhance template management
104-
- Add more configuration options
105-
- Improve error handling and recovery
106-
107-
### Testing Needs
108-
1. Environment detection and validation
109-
2. Build isolation effectiveness
110-
3. Lock file generation
111-
4. Cross-platform compatibility
112-
5. Timeout handling
113-
6. Error recovery scenarios
93+
1. Test the CrewAI migration workflow with real projects
94+
2. Consider adding automatic detection of CrewAI project structure
95+
3. Add more detailed examples in placeholder comments
96+
4. Consider adding validation for CrewAI-specific patterns

0 commit comments

Comments
 (0)