Prerequisites
Before you begin, ensure you have the following installed:Node.js
Version 18.0.0 or higher
npm
Version 9 or higher
Git
For version control
GitHub CLI
For testing PR creation features
Optional Dependencies
GitHub Copilot CLI is required for testing AI generation features. Install it with:
Initial Setup
1. Clone the Repository
First, fork the repository on GitHub, then clone your fork:2. Install Dependencies
Install all project dependencies:3. Verify Installation
Run the quality checks to ensure everything is set up correctly:If all commands complete without errors, your development environment is ready!
Running Locally
Watch Mode
For active development, use watch mode to automatically rebuild on file changes:tsx watch src/index.ts and rebuilds whenever you save changes to TypeScript files.
Link the CLI Globally
To test the CLI in any git repository, link it globally:devdaily commands from any directory:
Unlinking
When you’re done testing, unlink the global command:Development Scripts
Here are the most commonly used npm scripts:| Script | Command | Description |
|---|---|---|
dev | npm run dev | Watch mode - auto-rebuild on changes |
build | npm run build | Production build with tsup |
typecheck | npm run typecheck | TypeScript type checking |
lint | npm run lint | Run ESLint |
lint:fix | npm run lint:fix | Auto-fix ESLint issues |
format | npm run format | Format code with Prettier |
format:check | npm run format:check | Check code formatting |
test | npm test | Run all tests with Vitest |
test:watch | npm run test:watch | Tests in watch mode |
test:coverage | npm run test:coverage | Tests with coverage report |
IDE Setup
VS Code
Recommended extensions:- ESLint - For linting
- Prettier - For code formatting
- TypeScript Vue Plugin - Enhanced TypeScript support
Auto-formatting on Save
The project uses Husky and lint-staged to automatically format files on commit:Troubleshooting
Node Version Issues
If you encounter Node.js version errors:Build Errors
If the build fails, try cleaning and reinstalling:Test Failures
Tests should not require network access, git repos, or API keys. If tests fail:- Ensure all dependencies are installed
- Check that you’re using Node.js 18+
- Clear the Vitest cache:
npx vitest run --clearCache
Next Steps
Architecture
Learn about the project structure and tech stack
Testing
Write and run tests for your changes
Contributing
Follow the contribution guidelines