D9 fork setup
Agent Skills for d9 (Directus 9 fork) — install with: npx skills add LaWebcapsule/d9-skills
npx -y skills add LaWebcapsule/d9-skills --skill d9-fork-setupAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Complete development environment setup for d9 (Directus 9 fork) — reduces onboarding from 2 days to 2 hours.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
3.4 KB, as published. Nobody here has run it
Skill: d9 Fork Setup
Purpose
Set up a complete d9 development environment from scratch. This skill covers all the pitfalls that typically make Directus fork setup take 2 days for a new developer, reducing it to approximately 2 hours.
Triggers
- A new developer is setting up d9 for the first time
- Someone has cloned the d9 repository and needs to get it running
- A fresh environment is being set up (new machine, CI, Docker)
Actions
Prerequisites
- Install Node.js v18 or higher (v20 LTS recommended, v24 works but see
node-v24-windows-escapeskill) - Install pnpm 10:
npm install -g pnpm@10 - Ensure Git is configured
Setup
-
Clone the repository:
git clone https://github.com/AurelienMusic/directus9.git cd directus9 -
Install dependencies:
pnpm install -
Configure environment:
# Copy the env template cp api/src/cli/utils/create-env/env-stub.liquid api/.env # Edit api/.env with your database credentials # Minimum required: # DIRECTUS_SECRET=your-random-secret-here # DIRECTUS_DB_CLIENT=pg (or mysql, sqlite3) # DIRECTUS_DB_CONNECTION_STRING=postgres://user:pass@localhost:5432/d9 -
Build all packages (REQUIRED before first run):
pnpm build -
Bootstrap the database:
cd api npx directus database install npx directus database migrate:latest cd .. -
Create admin user:
cd api npx directus users create --email [email protected] --password your-password --role admin cd .. -
Start development:
pnpm dev
Errors Prevented
-
"Module not found" on first run: Skipping
pnpm build(step 7) causes import errors because internal packages haven't been compiled. The error messages point to missing modules that ARE in the repo but need building first. This is the #1 onboarding trap. (2h average debug time) -
"env-stub.liquid not found": Copying the .env file from the wrong location or creating it manually without all required variables. The template at
api/src/cli/utils/create-env/env-stub.liquidhas all variables with documentation. (30min) -
Wrong pnpm version: Using pnpm 8 or 9 instead of 10 causes dependency resolution errors. The
pnpm-lock.yamlformat is version-specific. (1h) -
Database not bootstrapped: Running
pnpm devbeforedatabase install+migrate:latestcauses API crashes with missing table errors. (30min) -
Missing DIRECTUS_SECRET: Starting without a secret in
.envcauses the server to use a default value, which is a security vulnerability. It also causes sessions to invalidate on every restart. (Silent security issue)
Restrictions
- Do NOT rename
DIRECTUS_*environment variables toD9_*— the engine expects theDIRECTUS_prefix (seepreserve-directus-code-identifiersskill) - Do NOT skip
pnpm buildeven if you only want to work on the app — API packages are dependencies - On Windows, use Git Bash or WSL for CLI commands — CMD may have path issues with pnpm
- SQLite works for development but is not recommended for production