Skip to main content

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:
This runs tsx watch src/index.ts and rebuilds whenever you save changes to TypeScript files. To test the CLI in any git repository, link it globally:
Now you can run devdaily commands from any directory:
Use --no-copy to prevent clipboard writes during testing, and --debug to see full AI prompts.

Unlinking

When you’re done testing, unlink the global command:

Development Scripts

Here are the most commonly used npm scripts:

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:
Make sure to commit frequently to trigger the pre-commit hooks that maintain code quality.

Troubleshooting

Node Version Issues

If you encounter Node.js version errors:
Consider using nvm to manage Node.js versions:

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:
  1. Ensure all dependencies are installed
  2. Check that you’re using Node.js 18+
  3. 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