### Multi-language Project Setup Example Source: https://docs.devin.ai/onboard-devin/environment/github-actions Blueprint example for a project requiring Node.js, Python, and Go, demonstrating the installation of multiple language versions. ```yaml initialize: - name: Install Node.js uses: github.com/actions/setup-node@v4 with: node-version: "20" - name: Install Python uses: github.com/actions/setup-python@v5 with: python-version: "3.12" - name: Install Go uses: github.com/actions/setup-go@v5 with: go-version: "1.22" ``` -------------------------------- ### Classic Setup Example Source: https://docs.devin.ai/onboard-devin/environment/migration Illustrates common classic setup commands for dependencies, linting, testing, and running an application. ```bash nvm use 20 && npm install npm install npm run lint npm test npm run dev ``` -------------------------------- ### Python Project Setup Example Source: https://docs.devin.ai/onboard-devin/environment/github-actions Example blueprint for a Python project, including installing a specific Python version and setting up maintenance tasks. ```yaml initialize: - name: Install Python 3.12 uses: github.com/actions/setup-python@v5 with: python-version: "3.12" maintenance: | pip install -r requirements.txt knowledge: - name: test contents: pytest ``` -------------------------------- ### Example Prompt for Generating Onboarding Guide Source: https://docs.devin.ai/use-cases/gallery/learn-about-devin This example demonstrates how to prompt Devin to generate a team-specific onboarding guide by leveraging its access to its own documentation. It specifies the content and format requirements for the guide. ```text Generate a team-specific onboarding guide theme={null} Read the Devin documentation and create a getting-started guide for our engineering team. The guide should cover: ``` -------------------------------- ### Run Setup Script with SessionStart Hook Source: https://docs.devin.ai/cli/extensibility/hooks/lifecycle-hooks This example demonstrates configuring the SessionStart hook to execute a setup script when a new session begins. It includes a timeout for the command execution. ```json { "SessionStart": [ { "matcher": "", "hooks": [ { "type": "command", "command": "./scripts/dev-setup.sh", "timeout": 10 } ] } ] } ``` -------------------------------- ### Java Project with Gradle Setup Example Source: https://docs.devin.ai/onboard-devin/environment/github-actions Blueprint example for a Java project using Gradle, demonstrating the setup of JDK and Gradle using GitHub Actions. ```yaml initialize: - name: Install JDK 21 uses: github.com/actions/setup-java@v4 with: java-version: "21" distribution: "temurin" - name: Install Gradle uses: github.com/gradle/actions/setup-gradle@v4 maintenance: | ./gradlew dependencies knowledge: - name: build contents: ./gradlew build - name: test contents: ./gradlew test ``` -------------------------------- ### Mixing Actions and Shell Commands Example Source: https://docs.devin.ai/onboard-devin/environment/github-actions Example blueprint showing how to freely mix GitHub Actions for setup with shell commands for installing project tools. ```yaml initialize: - name: Install Python uses: github.com/actions/setup-python@v5 with: python-version: "3.12" - name: Install project tools run: pip install ruff pytest - name: Install Node.js uses: github.com/actions/setup-node@v4 with: node-version: "20" - name: Install frontend deps run: npm install -g pnpm ``` -------------------------------- ### Setup Worktree Bash Script Example Source: https://docs.devin.ai/desktop/cascade/worktrees A bash script to be executed by the 'post_setup_worktree' hook. It copies environment files and installs npm dependencies within the new worktree. ```bash #!/bin/bash # Copy environment files from the original workspace if [ -f "$ROOT_WORKSPACE_PATH/.env" ]; then cp "$ROOT_WORKSPACE_PATH/.env" .env echo "Copied .env file" fi if [ -f "$ROOT_WORKSPACE_PATH/.env.local" ]; then cp "$ROOT_WORKSPACE_PATH/.env.local" .env.local echo "Copied .env.local file" fi # Install dependencies if [ -f "package.json" ]; then npm install echo "Installed npm dependencies" fi exit 0 ``` -------------------------------- ### Devin CLI Examples: Starting Sessions and Tasks Source: https://docs.devin.ai/cli/reference/commands Initiate a new session with a specific task or prompt. ```bash devin -- add a login page ``` ```bash devin --model opus -- refactor the auth module ``` -------------------------------- ### Start and Use Android Emulator for Kotlin Multiplatform Source: https://docs.devin.ai/onboard-devin/environment/android-emulation Starts the 'devin' Android emulator in headless mode, waits for device readiness, and installs a debug APK onto the emulator. ```bash Start the emulator: emulator -avd devin -no-window -no-audio -gpu swiftshader_indirect & Wait for boot: adb wait-for-device && adb shell getprop sys.boot_completed Install APK: adb install androidApp/build/outputs/apk/debug/androidApp-debug.apk ``` -------------------------------- ### Simple Initialize Form with Shell Commands Source: https://docs.devin.ai/onboard-devin/environment/blueprint-reference Use the simple form for straightforward shell commands. This example installs a tool from a URL, updates system packages, and installs a global Node.js package manager. ```yaml initialize: | curl -LsSf https://astral.sh/uv/install.sh | sh apt-get update && apt-get install -y build-essential npm install -g pnpm ``` -------------------------------- ### Example AGENTS.md File Source: https://docs.devin.ai/onboard-devin/agents-md This is a comprehensive example of an AGENTS.md file, detailing setup commands, code style preferences, testing guidelines, project structure, and the development workflow for an AI agent. ```markdown # AGENTS.md ## Setup Commands - Install dependencies: `npm install` - Start development server: `npm run dev` - Run tests: `npm test` - Build for production: `npm run build` ## Code Style - Use TypeScript strict mode - Prefer functional components in React - Use ESLint and Prettier configurations - Follow conventional commit format ## Testing Guidelines - Write unit tests for all new functions - Use Jest for testing framework - Aim for >80% code coverage - Run tests before committing ## Project Structure - `/src` - Main application code - `/tests` - Test files - `/docs` - Documentation - `/public` - Static assets ## Development Workflow - Create feature branches from `main` - Use pull requests for code review - Squash commits before merging - Update documentation for new features ``` -------------------------------- ### Repo-level Blueprint Example Source: https://docs.devin.ai/onboard-devin/environment/blueprint-reference Sets up project-specific configurations for a Node.js and Python monorepo, including environment variables, dependency installation, and build tasks. ```yaml initialize: - name: "Install Playwright browsers" run: npx playwright install --with-deps chromium - name: "Set up project environment variables" run: | echo "DATABASE_URL=postgresql://localhost:5432/myapp_dev" >> $ENVRC echo "REDIS_URL=redis://localhost:6379" >> $ENVRC echo "APP_ENV=development" >> $ENVRC maintenance: - name: "Install frontend dependencies" run: | cd frontend pnpm install - name: "Install backend dependencies" run: | cd backend uv sync - name: "Run database migrations" run: | cd backend uv run alembic upgrade head env: DATABASE_URL: "postgresql://localhost:5432/myapp_dev" knowledge: - name: lint contents: | Frontend: cd frontend && pnpm lint Backend: cd backend && uv run ruff check . Auto-fix: cd frontend && pnpm lint --fix cd backend && uv run ruff check --fix . - name: test contents: | Frontend unit tests: cd frontend && pnpm test Backend unit tests: cd backend && uv run pytest E2E tests (requires dev server running): cd frontend && pnpm test:e2e - name: build contents: | Frontend: cd frontend && pnpm build Backend: cd backend && uv run python -m build - name: dev-server contents: | Start the full development stack: cd backend && uv run uvicorn main:app --reload & cd frontend && pnpm dev Frontend: http://localhost:3000 Backend API: http://localhost:8000 API docs: http://localhost:8000/docs - name: database contents: | Run migrations: cd backend && uv run alembic upgrade head Create a new migration: cd backend && uv run alembic revision --autogenerate -m "description" Reset the database: cd backend && uv run alembic downgrade base && uv run alembic upgrade head ``` -------------------------------- ### Python Project Quick Start Source: https://docs.devin.ai/onboard-devin/environment/templates Minimal blueprint for a Python project using uv for dependency management. Includes installation and maintenance commands. ```yaml initialize: | curl -LsSf https://astral.sh/uv/install.sh | sh maintenance: | uv sync knowledge: - name: lint contents: | Run `uv run ruff check .` to lint. - name: test contents: | Run `uv run pytest` for the full suite. ``` -------------------------------- ### Monorepo Root and Workspace Blueprints Source: https://docs.devin.ai/onboard-devin/environment/workspaces Example demonstrating a root blueprint for shared setup and separate workspace blueprints for frontend and backend packages. ```yaml # Root blueprint — shared setup for the entire repo initialize: | npm install -g pnpm curl -LsSf https://astral.sh/uv/install.sh | sh knowledge: - name: structure contents: | Monorepo with two packages: - packages/frontend — React app (TypeScript, pnpm) - packages/backend — Python API (FastAPI, uv) ``` ```yaml # Workspace scoped to packages/frontend maintenance: | pnpm install knowledge: - name: lint contents: pnpm lint - name: test contents: pnpm test - name: dev contents: pnpm dev ``` ```yaml # Workspace scoped to packages/backend maintenance: | uv sync knowledge: - name: lint contents: uv run ruff check . - name: test contents: uv run pytest - name: dev contents: uv run uvicorn app.main:app --reload ``` -------------------------------- ### Checkout and Run Refactored Code Source: https://docs.devin.ai/use-cases/gallery/refactor-module Fetch the refactored branch, install dependencies, run tests, and start the development server. Verify the changes by hitting a few endpoints. ```bash git fetch origin && git checkout devin/refactor-router-split npm install && npm test npm run dev # Hit a few endpoints: curl http://localhost:3000/users, /orders, /payments ``` -------------------------------- ### Root Blueprint Example Source: https://docs.devin.ai/onboard-devin/environment/workspaces Example of a root blueprint that runs first from the repository root for shared setup like installing global tools. ```yaml # Root blueprint — runs first, from the repo root initialize: | npm install -g pnpm maintenance: | pnpm install ``` -------------------------------- ### Install Python using GitHub Actions Source: https://docs.devin.ai/onboard-devin/environment/blueprints Integrate GitHub Actions directly into your blueprint for language setup. This example installs Python 3.12. ```yaml initialize: - name: Install Python 3.12 uses: github.com/actions/setup-python@v5 with: python-version: "3.12" ``` -------------------------------- ### Install System Tools and Configure PATH Source: https://docs.devin.ai/onboard-devin/environment/templates Use the `initialize` block to install system packages, custom binaries, and add directories to the system's PATH. ```yaml initialize: - name: Install system packages run: | apt-get update apt-get install -y \ jq \ ripgrep \ fd-find \ protobuf-compiler \ libssl-dev - name: Install custom CLI tool run: | curl -L https://github.com/example/tool/releases/download/v1.0/tool-linux-amd64 \ -o /usr/local/bin/mytool chmod +x /usr/local/bin/mytool - name: Add custom bin directory to PATH run: | mkdir -p ~/bin echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc knowledge: - name: tools contents: | Custom tools available: - mytool: installed at /usr/local/bin/mytool - Additional binaries can be placed in ~/bin ``` -------------------------------- ### Interactive Setup Wizard Source: https://docs.devin.ai/cli/reference/commands Launches an interactive setup wizard for authentication and MCP configuration. This is the primary way to configure Devin for first-time use. ```bash devin setup ``` -------------------------------- ### Initialize Go environment with GitHub Actions Source: https://docs.devin.ai/onboard-devin/environment/github-actions Uses the `setup-go` action to configure a specific Go version for the environment. ```yaml initialize: - uses: github.com/actions/setup-go@v5 with: go-version: "1.23" ``` -------------------------------- ### Code Review Skill Directory Structure Example Source: https://docs.devin.ai/desktop/cascade/skills Skills can bundle resources like style guides and checklists. This example illustrates a code review skill. ```bash .windsurf/skills/code-review/ ├── SKILL.md ├── style-guide.md ├── security-checklist.md └── review-template.md ``` -------------------------------- ### Initialize Go Environment and Install Linter Source: https://docs.devin.ai/onboard-devin/environment/templates Sets up a Go environment with a specific version and installs golangci-lint. Ensure the GO_VERSION is updated as needed. ```yaml initialize: | GO_VERSION=1.23.5 ARCH=$(dpkg --print-architecture) curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-${ARCH}.tar.gz" \ | sudo tar -xz -C /usr/local echo 'export PATH="/usr/local/go/bin:$HOME/go/bin:$PATH"' \ | sudo tee /etc/profile.d/golang.sh > /dev/null go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest ``` -------------------------------- ### Install Android SDK and Create AVD (Kotlin Multiplatform) Source: https://docs.devin.ai/onboard-devin/environment/android-emulation Initializes the Android SDK by downloading and extracting command-line tools, setting environment variables, and installing necessary SDK components. Creates a new Android Virtual Device (AVD) named 'devin'. ```bash export ANDROID_HOME="$HOME/android-sdk" mkdir -p "$ANDROID_HOME/cmdline-tools" cd "$ANDROID_HOME/cmdline-tools" curl -fsSL https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -o tools.zip unzip -q tools.zip -d latest-tmp mv latest-tmp/cmdline-tools "$ANDROID_HOME/cmdline-tools/latest" rm -rf tools.zip latest-tmp echo "export ANDROID_HOME=$ANDROID_HOME" >> ~/.bashrc echo 'export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$PATH' >> ~/.bashrc export PATH="$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$PATH" yes | sdkmanager --licenses > /dev/null 2>&1 sdkmanager "platform-tools" "build-tools;34.0.0" "platforms;android-34" "emulator" "system-images;android-34;google_apis;x86_64" echo "no" | avdmanager create avd -n devin -k "system-images;android-34;google_apis;x86_64" --device "pixel_6" ``` -------------------------------- ### Example Devin Session Output Source: https://docs.devin.ai/use-cases/gallery/granola-post-call-processing This is an example of the output Devin might produce after processing a Granola meeting, showing meetings processed, child sessions started, and recommended actions. ```text Processed 1 new Granola meeting since the latest meeting log entry: Meeting: "Backend API planning" (2026-04-29 2:00 PM) Child sessions started (3): 1. Fix N+1 query in /api/invoices endpoint Repo: acme/api-server PR: Eager-load invoice line items to fix timeout Session: https://app.devin.ai/sessions/abc123 2. Add rate limiting to webhook endpoints Repo: acme/api-server PR: Per-key rate limits on /webhooks/* Session: https://app.devin.ai/sessions/def456 3. Update API docs for new billing endpoints Repo: acme/docs PR: Add billing endpoint reference docs Session: https://app.devin.ai/sessions/ghi789 Recommended actions (1): - Investigate auth token refresh flow — mentioned as "sometimes flaky" but no specific error or repo identified. Needs more context from the team. Knowledge meeting log updated to "Backend API planning" (2026-04-29). ``` -------------------------------- ### Spin Up and Verify Application Source: https://docs.devin.ai/essential-guidelines/instructing-devin-effectively Instruct Devin to start the application and verify that a specific page renders correctly at the expected URL. ```bash npm run dev and verify the new page renders at `/settings`. ``` -------------------------------- ### Bash Script for Worktree Setup Source: https://docs.devin.ai/desktop/cascade/hooks A bash script to automate the setup of new worktrees. It copies environment files (.env, .env.local) from the root workspace and installs npm dependencies if package.json exists. ```bash #!/bin/bash # Copy environment files from the original workspace if [ -f "$ROOT_WORKSPACE_PATH/.env" ]; then cp "$ROOT_WORKSPACE_PATH/.env" .env echo "Copied .env file" fi if [ -f "$ROOT_WORKSPACE_PATH/.env.local" ]; then cp "$ROOT_WORKSPACE_PATH/.env.local" .env.local echo "Copied .env.local file" fi # Install dependencies if [ -f "package.json" ]; then npm install echo "Installed npm dependencies" fi exit 0 ``` -------------------------------- ### Quick Start Project Configuration Source: https://docs.devin.ai/cli/extensibility/configuration A minimal project configuration to pre-approve common actions like file reads and git commands, reducing agent prompts. ```json { "permissions": { "allow": [ "Read(**)", "Exec(git)", "Exec(npm run)" ] } } ``` -------------------------------- ### Install Android SDK and Create AVD (Bash) Source: https://docs.devin.ai/onboard-devin/environment/android-emulation Installs necessary Android SDK command-line tools, licenses, and system images. Creates a new Android Virtual Device (AVD) named 'devin'. Ensure ANDROID_HOME is set correctly. ```bash export PATH="$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$PATH" yes | sdkmanager --licenses > /dev/null 2>&1 sdkmanager "platform-tools" "build-tools;34.0.0" "platforms;android-34" "emulator" "system-images;android-34;google_apis;x86_64" echo "no" | avdmanager create avd -n devin -k "system-images;android-34;google_apis;x86_64" --device "pixel_6" ``` -------------------------------- ### Devin CLI Examples: Non-Interactive Mode and Export Source: https://docs.devin.ai/cli/reference/commands Get a response and exit, or export the conversation to a file. ```bash devin -p "list all TODO comments" # Print response and exit ``` ```bash devin -p -- list all TODO comments # Same, using -- separator (still works) ``` ```bash devin --export -- fix the tests # Export conversation to default path ``` ```bash devin --export out.json -- fix tests # Export to a specific file ``` -------------------------------- ### Skill File Structure Example Source: https://docs.devin.ai/cli/extensibility/skills/creating-skills Illustrates the directory structure for organizing project-specific and global skills. ```bash # Project-specific (committed to git) .devin/skills/ └── my-skill/ └── SKILL.md # Global — available in all projects (not committed) # Linux/macOS: ~/.config/devin/skills/ └── my-skill/ └── SKILL.md # Windows: %APPDATA%\devin\skills\ └── my-skill\ └── SKILL.md ``` -------------------------------- ### Build Process Overview Source: https://docs.devin.ai/onboard-devin/environment/blueprints Illustrates the sequential execution of blueprints (enterprise, org, repo) and repository cloning during a build process. Includes initialization and maintenance steps for each level. ```text 1. Enterprise blueprint, if configured (runs in ~): a. initialize b. maintenance 2. Org blueprint (runs in ~): a. initialize b. maintenance 3. Clone all repositories (up to 10 concurrent). Each repo's blueprint may override clone defaults via the `clone` block (branch/tag, depth, submodules, LFS, etc.). 4. For each configured repo, in the order shown in Settings (runs in ~/repos/): a. initialize b. maintenance 5. Health check, then snapshot is saved ``` -------------------------------- ### Basic Query for Debugging Source: https://docs.devin.ai/desktop/accounts/api-reference/errors Start with a simple query to isolate issues. This example selects the count of 'num_acceptances'. ```json { "service_key": "your_key", "query_requests": [ { "data_source": "QUERY_DATA_SOURCE_USER_DATA", "selections": [ { "field": "num_acceptances", "aggregation_function": "QUERY_AGGREGATION_COUNT" } ] } ] } ``` -------------------------------- ### Payments Test Playbook Example Source: https://docs.devin.ai/use-cases/gallery/test-coverage-playbook This is an example of a payments-specific test playbook that defines testing procedures, specifications, and forbidden actions for writing unit tests. It guides Devin on how to mock dependencies, handle currency, and ensure test coverage. ```txt ## Procedure 1. Read the target payment module and identify all exported functions 2. Study existing test files in src/services/__tests__/ for patterns 3. Create a test file named {Module}.test.ts in __tests__/ next to the source 4. Write tests using the AAA pattern (Arrange, Act, Assert) 5. Mock the Stripe SDK with jest.mock('stripe') — never call real payment APIs 6. Mock database calls with the helpers from src/test/helpers.ts 7. Use integer cents for all currency values — never floating-point dollars 8. Test idempotency: calling processCharge twice with the same idempotency key must not create duplicate charges 9. Cover success paths, error paths, and edge cases for every function 10. Run `npm test -- --coverage` and verify 90%+ line coverage for the file ## Specifications - Framework: Jest with TypeScript - Mocking: jest.mock() for Stripe SDK, jest.spyOn() for internal methods - Currency: Always use integer cents (e.g., 2999 not 29.99) - Assertions: Prefer specific matchers (toHaveBeenCalledWith, toThrow) - Naming: describe('PaymentService') > describe('processCharge') > it('charges a valid card') ## Forbidden Actions - Do not call real Stripe, PayPal, or any live payment gateway in tests - Do not use floating-point arithmetic for currency calculations - Do not modify the source module to make it easier to test - Do not skip idempotency or retry-logic edge cases ``` -------------------------------- ### Initialize Go environment with Shell Script Source: https://docs.devin.ai/onboard-devin/environment/github-actions Manually installs a specific Go version using curl and tar, setting up the PATH environment variable. ```yaml initialize: | GO_VERSION=1.23.5 ARCH=$(dpkg --print-architecture) curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-${ARCH}.tar.gz" \ | sudo tar -xz -C /usr/local echo 'export PATH="/usr/local/go/bin:$HOME/go/bin:$PATH"' \ | sudo tee /etc/profile.d/golang.sh > /dev/null ``` -------------------------------- ### Native Android Setup (Kotlin/Java + Gradle) Source: https://docs.devin.ai/onboard-devin/environment/android-emulation Use this blueprint to set up a native Android development environment with Kotlin or Java and Gradle. It installs the Android SDK, necessary build tools, and creates an emulator. ```yaml initialize: - name: "Install Android SDK" run: | export ANDROID_HOME="$HOME/android-sdk" mkdir -p "$ANDROID_HOME/cmdline-tools" cd "$ANDROID_HOME/cmdline-tools" curl -fsSL https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -o tools.zip unzip -q tools.zip -d latest-tmp mv latest-tmp/cmdline-tools "$ANDROID_HOME/cmdline-tools/latest" rm -rf tools.zip latest-tmp echo "export ANDROID_HOME=$ANDROID_HOME" >> ~/.bashrc echo 'export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$PATH' >> ~/.bashrc export PATH="$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$PATH" yes | sdkmanager --licenses > /dev/null 2>&1 sdkmanager "platform-tools" "build-tools;34.0.0" "platforms;android-34" "emulator" "system-images;android-34;google_apis;x86_64" echo "no" | avdmanager create avd -n devin -k "system-images;android-34;google_apis;x86_64" --device "pixel_6" maintenance: | ./gradlew assembleDebug knowledge: - name: build contents: ./gradlew assembleDebug - name: test contents: ./gradlew test - name: lint contents: ./gradlew lint - name: emulator contents: | Start the emulator: emulator -avd devin -no-window -no-audio -gpu swiftshader_indirect & Wait for boot: adb wait-for-device && adb shell getprop sys.boot_completed Install APK: adb install app/build/outputs/apk/debug/app-debug.apk ``` -------------------------------- ### Example of a Specific Command in a Playbook Step Source: https://docs.devin.ai/product-guides/creating-playbooks This example shows how to include specific commands or configurations within a playbook step to guide Devin towards a more successful outcome. It highlights the importance of precise details like model and voice selection. ```text 3. Create request dict with model: "tts-1", voice: "alloy" ```