✨ Vibe Coding with PhPstrap on Windows

This beginner-friendly guide will help you prepare a Windows computer for building websites and applications with PhPstrap and an AI coding agent such as Claude Code or Codex.

Never used a terminal before? That is okay. Every command in this guide can be copied into Windows PowerShell. You do not need to be an experienced programmer to get started.
The minimum recommended setup: Git, PHP, Composer, Visual Studio Code, and one AI coding agent. Node.js is optional. WP-CLI is not required for PhPstrap.

1) What Is Vibe Coding?

Vibe coding means using an AI coding agent to help you plan, write, explain, test, and improve code. Instead of manually writing every line, you describe what you want to build and work with the agent to create it.

An AI coding agent can:

AI can make mistakes. Always review its changes, test your project, and use Git so you can undo anything that goes wrong.

2) What You Need

Tool Required? What It Does
PowerShell Included with Windows Runs the commands in this guide.
Git Yes Tracks your changes and lets you undo mistakes.
Visual Studio Code Recommended Provides an easy place to view and edit project files.
PHP Yes Runs PhPstrap and your PHP application.
Composer Recommended Installs and manages third-party PHP packages.
Claude Code or Codex Choose at least one Acts as your AI coding assistant inside the project.
Node.js Optional Runs JavaScript tools, npm packages, and frontend build systems.
MySQL or MariaDB Full PhPstrap only Stores users, settings, modules, and application data.
WP-CLI No Manages WordPress. It is not needed for a normal PhPstrap project.

3) A Few Terms to Know


4) Open PowerShell

  1. Open the Windows Start menu.
  2. Type PowerShell.
  3. Select Windows PowerShell or Terminal.

You normally do not need to run PowerShell as Administrator. Some software installers may ask for permission when required.

Check whether Windows Package Manager is available:

winget --version

If a version number appears, you can use winget to install software.

If Windows says that winget is not recognized, install or update App Installer from the Microsoft Store.

5) Install Git

Git records changes to your code. Think of it as a powerful undo system for your entire project.

Install Git from PowerShell:

winget install --id Git.Git -e

Close PowerShell completely, open it again, and check the installation:

git --version

You should see a Git version number.

Configure your name and email

Git adds your name and email to changes you save. Replace the example values below with your own:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global init.defaultBranch main
You may use a GitHub private email address if you do not want your normal email address included in public commits.

Official download: Git for Windows.


6) Install Visual Studio Code

Visual Studio Code, usually called VS Code, lets you browse and edit the files in your project.

winget install --id Microsoft.VisualStudioCode -e

Close and reopen PowerShell, then check the installation:

code --version

Once installed, you can open the current project folder in VS Code with:

code .

Official download: Visual Studio Code.


7) Install PHP

PhPstrap requires PHP 8.1 or newer. PHP 8.3 is a good choice for compatibility.

First, check whether PHP is already installed:

php -v

If you see a PHP version, you can move to the next section.

Install PHP with WinGet

Search the available PHP packages:

winget search --id PHP.PHP

Install PHP 8.3:

winget install --id PHP.PHP.8.3 -e

Close and reopen PowerShell, then test it:

php -v
If WinGet cannot find the package, download the Windows ZIP package from PHP.net or follow the PhPstrap Installation Guide.

Check your PHP extensions

Display the extensions currently enabled:

php -m

Full PhPstrap installations commonly require:

To find the PHP configuration file being used:

php --ini

See System Requirements for the complete list.


8) Install Composer

Composer manages PHP packages. An AI agent may use Composer when adding libraries for email, APIs, payments, environment variables, testing, or other features.

Check whether Composer is already installed:

composer --version

If Windows says that composer is not recognized:

  1. Visit the official Composer download page.
  2. Download and run Composer-Setup.exe.
  3. Allow the installer to add Composer to your PATH.
  4. Close all PowerShell windows after installation.
  5. Open a new PowerShell window.

If the installer asks where PHP is located, run:

(Get-Command php).Source

Copy the path it displays into the Composer installer.

Verify Composer:

composer --version
composer diagnose
Only run composer install in a project that contains a composer.json file.

9) Install Node.js — Optional

Node.js is not required to run PHP or PhPstrap. The native Windows installers for Claude Code and Codex also do not require Node.js.

You may still want Node.js if your project uses:

Install the current long-term support version:

winget install --id OpenJS.NodeJS.LTS -e

Close and reopen PowerShell, then check it:

node --version
npm --version

Official download: Node.js.


10) Choose an AI Coding Agent

You only need one coding agent to begin. Installing both is optional.

The commands below download and run installation scripts. Only use installation commands from the official Anthropic and OpenAI domains shown in this guide.

Option A: Claude Code

Install Claude Code using its native Windows installer:

irm https://claude.ai/install.ps1 | iex

Check the installation:

claude --version
claude doctor

Start Claude Code:

claude

The first launch will guide you through signing in.

Official instructions: Claude Code Quickstart.

Option B: Codex

Install Codex using its native Windows installer:

powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

Check the installation:

codex --version
codex doctor

Start Codex:

codex

The first launch will guide you through signing in.

Official project: OpenAI Codex.

Alternative Codex installation with npm

If you already installed Node.js, Codex can also be installed with:

npm install -g @openai/codex

Use either the native installer or npm. You do not need to install Codex twice.


11) Do You Need WP-CLI?

No. WP-CLI is designed for managing WordPress websites. PhPstrap is a standalone PHP framework and does not use WordPress.

You only need WP-CLI if you are also working on a WordPress project and want to manage:

For normal PhPstrap development, skip WP-CLI.

12) Download PhPstrap

Create a folder for your coding projects:

New-Item -ItemType Directory -Force -Path "$HOME\Projects"
cd "$HOME\Projects"

Clone the PhPstrap repository:

git clone https://github.com/PhPstrap/phpstrap.git my-phpstrap-app
cd my-phpstrap-app

Open the project in VS Code:

code .

If the project contains a composer.json file, install its PHP packages:

if (Test-Path ".\composer.json") {
    composer install
}
You can also download PhPstrap as a ZIP file, but cloning it with Git gives you better change tracking and makes it easier to receive updates.

13) Run PhPstrap Locally

From inside the project folder, start PHP’s built-in development server:

php -S localhost:8000 -t .

Open the following address in your browser:

http://localhost:8000

For a new full installation, open:

http://localhost:8000/install.php

Press Ctrl + C in PowerShell when you want to stop the server.

Full PhPstrap installations require a MySQL or MariaDB database. See the Installation Guide for database setup. PhPstrap Lite does not require a database.

14) Start Your AI Agent

Keep the PHP development server running. Open a second PowerShell window and return to your project:

cd "$HOME\Projects\my-phpstrap-app"

Start the agent you installed:

claude

Or:

codex
Always start the coding agent from inside the correct project folder. Otherwise, it may read or modify unrelated files.

15) Your First PhPstrap Prompt

Start by asking the agent to inspect the project without changing anything:

Read this PhPstrap project and explain its structure to me as a beginner.

Do not change any files yet.

Please explain:
1. How pages are created.
2. Where shared headers and footers are stored.
3. Where configuration is stored.
4. How modules work.
5. Which files I should avoid editing directly.
6. How I can run and test the project locally.

Once you understand the structure, try a small task:

Create a simple About page for this PhPstrap project.

Before changing anything:
1. Tell me which files you plan to create or edit.
2. Follow the existing PhPstrap structure and Bootstrap 5 styles.
3. Do not modify configuration files or credentials.
4. Keep the change small and beginner-friendly.
5. Run PHP syntax checks on every PHP file you change.
6. Explain the completed changes when finished.

16) Use Git as Your Safety Net

Create a separate branch before asking the AI to make significant changes:

git switch -c feature/my-first-page

See which files have changed:

git status
git diff

After testing a successful change, save it:

git add .
git commit -m "feat: add first PhPstrap page"

To see your saved changes:

git log --oneline
Commit after each working feature. Small commits are much easier to understand and undo than one enormous commit.

17) A Safe Vibe Coding Workflow

  1. Describe the goal: Explain what you want to build and who will use it.
  2. Ask for a plan: Have the agent list the files it expects to change.
  3. Make one small change: Avoid building an entire application in one prompt.
  4. Review the diff: Run git diff before accepting the work.
  5. Test in your browser: Check forms, links, mobile layout, and error messages.
  6. Check PHP syntax: Make sure changed PHP files contain no syntax errors.
  7. Commit working code: Save a known-good point with Git.
  8. Repeat: Move to the next small feature.

Useful instructions to include in prompts

Follow the existing PhPstrap project structure.

Use Bootstrap 5 components and utilities.

Do not hardcode passwords, API keys, or database credentials.

Do not edit vendor files or third-party packages directly.

Use prepared database statements.

Escape output before displaying user-provided content.

Add CSRF protection to forms that change data.

Run php -l on every PHP file you modify.

Explain any command before running it.

Do not delete files unless they are clearly no longer required.

18) Protect Passwords and API Keys

Never paste real passwords, private keys, database credentials, payment keys, or production API tokens into an AI prompt.

Example placeholder configuration:

DB_HOST=localhost
DB_NAME=example_database
DB_USER=example_user
DB_PASSWORD=replace_with_real_password
If a real password or API key is accidentally committed, removing it from the visible file is not enough. Revoke or rotate the exposed credential.

19) Check That Everything Works

Run the following commands one at a time:

git --version
php -v
composer --version
code --version

Run the command for the AI agent you installed:

claude --version

Or:

codex --version

If you installed Node.js, also run:

node --version
npm --version

Check the current project:

cd "$HOME\Projects\my-phpstrap-app"
git status
php -S localhost:8000 -t .

20) Common Problems

“The term is not recognized”

Example:

composer : The term 'composer' is not recognized

Try the following:

  1. Close every PowerShell and Terminal window.
  2. Open a new PowerShell window.
  3. Run the command again.
  4. Restart Windows if the command is still unavailable.

Check whether Windows can find a program:

where.exe php
where.exe git
where.exe composer
where.exe code
where.exe claude
where.exe codex

Composer is using the wrong PHP version

(Get-Command php).Source
php -v
composer diagnose

A required PHP extension is missing

php --ini
php -m

Open the loaded php.ini file and enable the required extension. Restart the PHP development server afterward.

Port 8000 is already being used

Start the server on another port:

php -S localhost:8001 -t .

Then visit:

http://localhost:8001

The AI agent cannot see the project

Check your current folder:

Get-Location
Get-ChildItem

Return to the PhPstrap project before starting the agent:

cd "$HOME\Projects\my-phpstrap-app"
claude

Or:

cd "$HOME\Projects\my-phpstrap-app"
codex

The page shows a database error

The full version of PhPstrap requires MySQL or MariaDB. Confirm:


21) Beginner Setup Checklist


22) What to Do Next

Your computer is now ready for local PhPstrap development and AI-assisted vibe coding.

Start small, review every change, and let Git protect your progress.