Skip to content

📚 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

TutorialCategoryDifficultyRead TimeLink
🚀 Your First Packagist QueryPackagist API🟢 Beginner5 minOpen
⌨️ CLI Quick ReferenceCLI Tool🟢 Beginner8 minOpen
📦 Managing PHP Dependencies from GoDependency Management🟡 Intermediate12 minOpen
🤖 Auto-Detect & Install in CI/CDAuto Install🟡 Intermediate10 minOpen
📈 Dependency DashboardMonitoring🟡 Intermediate10 minOpen
🪞 Package MirrorPackagist API🟡 Intermediate10 minOpen
🔒 Building a Security Audit PipelineSecurity🔴 Advanced15 minOpen
🏭 Satis Private Repository BuilderSatis🔴 Advanced18 minOpen

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.

🖥️ Path 4: CLI-First

No Go code needed, use the ready-made CLI directly.

Prerequisites

bash
# 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.

Released under the MIT License