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:
gh extension install github/gh-copilot

Initial Setup

1. Clone the Repository

First, fork the repository on GitHub, then clone your fork:
git clone https://github.com/<your-username>/devdaily.git
cd devdaily

2. Install Dependencies

Install all project dependencies:
npm install

3. Verify Installation

Run the quality checks to ensure everything is set up correctly:
npm run typecheck
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:
npm run dev
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:
npm link
Now you can run devdaily commands from any directory:
# Navigate to any git repo
cd /path/to/your/project

# Test commands
devdaily standup --days 1 --no-copy
devdaily pr --debug
devdaily doctor
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:
npm unlink -g devdaily-ai

Development Scripts

Here are the most commonly used npm scripts:
ScriptCommandDescription
devnpm run devWatch mode - auto-rebuild on changes
buildnpm run buildProduction build with tsup
typechecknpm run typecheckTypeScript type checking
lintnpm run lintRun ESLint
lint:fixnpm run lint:fixAuto-fix ESLint issues
formatnpm run formatFormat code with Prettier
format:checknpm run format:checkCheck code formatting
testnpm testRun all tests with Vitest
test:watchnpm run test:watchTests in watch mode
test:coveragenpm run test:coverageTests 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:
"lint-staged": {
  "*.ts": [
    "eslint --fix",
    "prettier --write"
  ],
  "*.{json,md}": [
    "prettier --write"
  ]
}
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:
node --version  # Should be >= 18.0.0
Consider using nvm to manage Node.js versions:
nvm install 18
nvm use 18

Build Errors

If the build fails, try cleaning and reinstalling:
rm -rf node_modules dist
npm install
npm run build

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

Build docs developers (and LLMs) love