This is a VS Code extension that as an initial release provides that provides basic linting and validation for CrewAI YAML configuration files (agents.yaml and tasks.yaml).
PLEASE NOTE: This is a third-party created module and it not directly associated with or authorized by CrewAI.
I plan to expand it to cover code-first configuration, subject to feedback which is welcome via https://github.com/wsimmonds/crewai-lint/issues
CrewAI Lint helps developers working with CrewAI by providing real-time validation, error checking, and schema-based hover information for CrewAI configuration files.
- Real-time Validation: Automatically validates your
agents.yamlandtasks.yamlfiles as you type - Error Diagnostics: Provides detailed error messages for validation failures with proper line highlighting
- Schema-Aware Hover Information: Shows field descriptions and type information when hovering over YAML keys
- Auto-Detection: Automatically detects which CrewAI version you're using based on your project files - although only supporting 0.102.0 presently
The following are known issues/planned to be resolved. Feedback and contributions are always welcome.
- No validation of field values except for checking agent is valid (i.e. should check context provided is valid, etc.)
- No support for anything but 0.102.0
- No support for Python validation
- No support for running as script/part of CI
- No icon
- Need to re-visit a number of design choices and make it easier to accurately update/maintain schemas - likely adopt ajv
- Need to improve test cases and adopt more "outside in" tests of schemas/expected outcomes to make changing internals easier
This extension can be installed from the Visual Studio Code Marketplace.
- Open VS Code
- Go to Extensions view (Ctrl+Shift+X or Cmd+Shift+X)
- Search for "CrewAI Linter"
- Click Install
Alternatively, you can also install it using the VS Code CLI:
code --install-extension crewai-lintThe extension automatically activates when you open YAML files named agents.yaml or tasks.yaml. No additional configuration is required.
By default, the extension tries to automatically detect your CrewAI version from:
requirements.txtpyproject.tomlpoetry.lock
You can manually set the CrewAI version by:
- Opening the command palette (Ctrl+Shift+P or Cmd+Shift+P)
- Type "CrewAI: Set Version"
- Select the version you want to use from the dropdown
Hover over any field in your YAML files to see:
- Whether the field is required or optional
- Field description
- Expected type information
The extension validates:
- Required fields are present
- Field values have correct types
- YAML is properly formatted
- Node.js (>= 14.x)
- pnpm
- Clone the repository
git clone https://github.com/wsimmonds/crewai-lint.git
cd crewai-lint- Install dependencies
pnpm install- Open the project in VS Code
code .To compile and run the extension in development mode:
pnpm compile
pnpm watch # For continuous compilationTo launch the extension in a new VS Code window:
- Press F5 or select "Run and Debug" from the sidebar
- Choose "Extension" from the dropdown menu
To build the extension into a distributable VSIX package:
pnpm run packageThis will:
- Compile the extension
- Run the prepublish script
- Package all necessary files into a
.vsixfile located in the root directory
You can install the packaged extension by:
- In VS Code: File > Preferences > Extensions > ... (More Actions) > Install from VSIX
- Command line:
code --install-extension crewai-lint-0.102.0.vsix
Run tests with:
pnpm testFor development, you can use watch mode:
pnpm test:watch.
├── src/ # Source code
│ ├── extension.ts # Main extension entry point
│ ├── schemaManager.ts # Schema version management
│ ├── versionDetection.ts # CrewAI version detection
│ ├── utils/ # Utility functions
│ └── schemas/ # Schema definitions by version
├── test/ # Test setup files
└── out/ # Compiled output
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- CrewAI for producing a brilliant AI Agent framework.
- João Moura for having personally explained many concepts to me.