📚 Tutorials & Guides
Progressive tutorials for controlling the PHP/Composer ecosystem from Go using Composer Skills. Each tutorial is hands-on, with complete runnable code and expected output.
Why Tutorials?
Composer Skills wraps 234 Composer CLI methods and 20 Packagist API methods into a typed Go API. But an API list alone doesn't tell you "how to combine them into a pipeline" — that's exactly what these tutorials solve: starting from your first query, progressively building real-world toolchains.
Reading Guide
- 🟢 Beginner: Only requires Go and network access, no local PHP/Composer installation needed.
- 🟡 Intermediate: Requires PHP 7.4+ and Composer 2.0+ installed locally.
- 🔴 Advanced: Combines multiple subsystems, recommend completing intermediate tutorials first.
Tutorial Overview
| Tutorial | Category | Difficulty | Read Time | Link |
|---|---|---|---|---|
| 🚀 Your First Packagist Query | Packagist API | 🟢 Beginner | 5 min | Open |
| ⌨️ CLI Quick Reference | CLI Tool | 🟢 Beginner | 8 min | Open |
| 📦 Managing PHP Dependencies from Go | Dependency Management | 🟡 Intermediate | 12 min | Open |
| 🤖 Auto-Detect & Install in CI/CD | Auto Install | 🟡 Intermediate | 10 min | Open |
| 📈 Dependency Dashboard | Monitoring | 🟡 Intermediate | 10 min | Open |
| 🪞 Package Mirror | Packagist API | 🟡 Intermediate | 10 min | Open |
| 🔒 Building a Security Audit Pipeline | Security | 🔴 Advanced | 15 min | Open |
| 🏭 Satis Private Repository Builder | Satis | 🔴 Advanced | 18 min | Open |
Grouped by Learning Path
🌱 Path 1: Pure Go, Zero Dependencies Start
No local PHP needed, only using Packagist HTTP API. Suitable for building package search, statistics, and mirror tools.
🛠️ Path 2: Managing Real PHP Projects
Local PHP + Composer already installed, using SDK to replace hand-written exec.Command. Suitable for dependency management and dashboards.
🏗️ Path 3: Building Infrastructure
Embedding Composer Skills into CI pipelines and private repository services. Suitable for DevOps / Platform Engineering.
- 🤖 Auto-Detect & Install in CI/CD → 🔒 Building a Security Audit Pipeline → 🏭 Satis Private Repository Builder
🖥️ Path 4: CLI-First
No Go code needed, use the ready-made CLI directly.
Prerequisites
# Install SDK
go get github.com/scagogogo/composer-skills- 🟢 Beginner tutorials: Only need Go 1.23+ and network access.
- 🟡 / 🔴 tutorials: Also require PHP 7.4+ and Composer 2.0+. If not installed locally, start with 🤖 Auto-Detect & Install in CI/CD.
Can't find what you need?
This tutorial set covers the most common scenarios. For more detailed API references, visit the SDK Documentation to check method signatures and return values.