Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.2] - 2025-09-25

- Copilot CLI Support

## [0.4.1] - 2025-09-18

### Fixed
Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,20 @@

> [!NOTE]
> **📋 Prerequisites**: Get tokens at [github.com/settings/personal-access-tokens/new](https://github.com/settings/personal-access-tokens/new)
> - **`GITHUB_APM_PAT`** - Fine-grained PAT for access to private APM modules (optional, recommended)
> - **`GITHUB_TOKEN`** - User-scoped fine-grained PAT with read Models scope for GitHub Models API (optional, enables free GitHub Models access with Codex CLI and llm)
> - **`GITHUB_COPILOT_PAT`** - User-scoped Fine-grained PAT with Copilot CLI subscription access
> - **`GITHUB_APM_PAT`** - (optional) - Fine-grained PAT for access to private APM modules
>
> 📖 **Complete Setup Guide**: [Getting Started](docs/getting-started.md)

```bash
# 1. Set your GitHub tokens (minimal setup)
export GITHUB_APM_PAT=your_fine_grained_token_here
export GITHUB_TOKEN=your_token_for_github_models
# 1. Set your GitHub token (minimal setup)
export GITHUB_COPILOT_PAT=your_fine_grained_token_here

# 2. Install APM CLI (GitHub org members)
# 2. Install APM CLI
curl -sSL "https://raw.githubusercontent.com/danielmeppiel/apm/main/install.sh" | sh

# 3. Set up runtime (uses free GitHub Models)
apm runtime setup codex
# 3. Set up runtime (GitHub Copilot CLI with native MCP support)
apm runtime setup copilot

# 3. Create your first AI package
apm init my-project && cd my-project
Expand Down Expand Up @@ -73,7 +72,7 @@ dependencies:
- microsoft/azure-devops-mcp

scripts:
start: "RUST_LOG=debug codex --skip-git-repo-check hello-world.prompt.md"
start: "copilot --full-auto -p hello-world.prompt.md"
```

## What You Just Built
Expand All @@ -93,7 +92,7 @@ APM solves the AI agent context scalability problem through constraint satisfact

```bash
apm init <project> # Initialize AI-native project
apm runtime setup # Install coding agents (codex for now)
apm runtime setup # Install coding agents (copilot recommended)
apm compile # Generate AGENTS.md for compatibility
apm install # Install APM and MCP dependencies from apm.yml
apm deps list # List installed APM dependencies
Expand Down
4 changes: 2 additions & 2 deletions docs/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export GITHUB_APM_PAT=your_fine_grained_token_here
curl -sSL https://raw.githubusercontent.com/danielmeppiel/apm/main/install.sh | sh

# 3. Setup runtime
apm runtime setup codex
apm runtime setup copilot

# 4. Create project
apm init my-project && cd my-project
Expand Down Expand Up @@ -717,7 +717,7 @@ apm list

## Tips & Best Practices

1. **Start with runtime setup**: Run `apm runtime setup codex`
1. **Start with runtime setup**: Run `apm runtime setup copilot`
2. **Use GitHub Models for free tier**: Set `GITHUB_TOKEN` (user-scoped with Models read permission) for free Codex access
3. **Discover MCP servers**: Use `apm search` to find available MCP servers before adding to apm.yml
4. **Preview before running**: Use `apm preview` to check parameter substitution
Expand Down
14 changes: 9 additions & 5 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ Welcome to APM - the AI Package Manager that transforms any project into reliabl

APM requires GitHub tokens for accessing models and package registries. Get your tokens at [github.com/settings/personal-access-tokens/new](https://github.com/settings/personal-access-tokens/new):

### GitHub Tokens Required

APM requires GitHub tokens for accessing models and package registries. Get your tokens at [github.com/settings/personal-access-tokens/new](https://github.com/settings/personal-access-tokens/new):

#### Required Tokens

##### GITHUB_APM_PAT (Fine-grained PAT - Recommended)
Expand Down Expand Up @@ -178,7 +174,15 @@ This creates a platform-specific binary at `./dist/apm-{platform}-{arch}/apm` th

APM works with multiple AI coding agents. Choose your preferred runtime:

### OpenAI Codex CLI (Recommended)
### GitHub Copilot CLI (Recommended)

```bash
apm runtime setup copilot
```

Uses GitHub Copilot CLI with native MCP integration and advanced AI coding assistance.

### OpenAI Codex CLI

```bash
apm runtime setup codex
Expand Down
1 change: 1 addition & 0 deletions docs/integration-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ All integration tests run on:

### E2E Tests Verify:
- ✅ Complete golden scenario from README works
- ✅ `apm runtime setup copilot` installs and configures GitHub Copilot CLI
- ✅ `apm runtime setup codex` installs and configures Codex
- ✅ `apm runtime setup llm` installs and configures LLM
- ✅ `apm init my-hello-world` creates project correctly
Expand Down
2 changes: 1 addition & 1 deletion docs/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Direct integration with OpenAI's development-focused models:

```bash
# Install and configure
apm runtime setup codex
apm runtime setup copilot

# Features
- GitHub Models API backend
Expand Down
74 changes: 59 additions & 15 deletions docs/runtime-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ APM manages LLM runtime installation and configuration automatically. This guide

## Overview

APM acts as a runtime package manager, downloading and configuring LLM runtimes from their official sources. Currently supports two runtimes:
APM acts as a runtime package manager, downloading and configuring LLM runtimes from their official sources. Currently supports three runtimes:

| Runtime | Description | Best For | Configuration |
|---------|-------------|----------|---------------|
| [**OpenAI Codex**](https://github.com/openai/codex) | OpenAI's Codex CLI | Code tasks, MCP support | Auto-configured with GitHub Models |
| [**GitHub Copilot CLI**](https://github.com/github/copilot-cli) | GitHub's Copilot CLI (Recommended) | Advanced AI coding, native MCP support | Auto-configured, no auth needed |
| [**OpenAI Codex**](https://github.com/openai/codex) | OpenAI's Codex CLI | Code tasks, GitHub Models API | Auto-configured with GitHub Models |
| [**LLM Library**](https://llm.datasette.io/en/stable/index.html) | Simon Willison's `llm` CLI | General use, many providers | Manual API key setup |

## Quick Setup
Expand All @@ -19,20 +20,52 @@ APM acts as a runtime package manager, downloading and configuring LLM runtimes
curl -sSL https://raw.githubusercontent.com/danielmeppiel/apm/main/install.sh | sh

# 2. Setup AI runtime (downloads and configures automatically)
apm runtime setup codex

# 3. Set GitHub token for free models (fine-grained token preferred)
export GITHUB_TOKEN=your_github_token
apm runtime setup copilot
```

### Runtime Management
```bash
apm runtime list # Show installed runtimes
apm runtime setup llm # Install LLM library
apm runtime setup copilot # Install GitHub Copilot CLI (Recommended)
apm runtime setup codex # Install Codex CLI
```

## OpenAI Codex Runtime (Recommended)
## GitHub Copilot CLI Runtime (Recommended)

APM automatically installs GitHub Copilot CLI from the public npm registry. Copilot CLI provides advanced AI coding assistance with native MCP integration and GitHub context awareness.

### Setup

#### 1. Install via APM
```bash
apm runtime setup copilot
```

This automatically:
- Installs GitHub Copilot CLI from public npm registry
- Requires Node.js v22+ and npm v10+
- Creates MCP configuration directory at `~/.copilot/`
- No authentication required for installation

### Usage

APM executes scripts defined in your `apm.yml`. When scripts reference `.prompt.md` files, APM compiles them with parameter substitution. See [Prompts Guide](prompts.md) for details.

```bash
# Run scripts (from apm.yml) with parameters
apm run start --param service_name=api-gateway
apm run debug --param service_name=api-gateway
```

**Script Configuration (apm.yml):**
```yaml
scripts:
start: "copilot --full-auto -p analyze-logs.prompt.md"
debug: "copilot --full-auto -p analyze-logs.prompt.md --log-level debug"
```

## OpenAI Codex Runtime

APM automatically downloads, installs, and configures the Codex CLI with GitHub Models for free usage.

Expand All @@ -57,8 +90,6 @@ export GITHUB_TOKEN=your_github_token

### Usage

APM executes scripts defined in your `apm.yml`. When scripts reference `.prompt.md` files, APM compiles them with parameter substitution. See [Prompts Guide](prompts.md) for details.

```bash
# Run scripts (from apm.yml) with parameters
apm run start --param service_name=api-gateway
Expand Down Expand Up @@ -122,15 +153,23 @@ scripts:
```bash
# Run scripts defined in apm.yml
apm run start --param service_name=api-gateway
apm run llm --param service_name=api-gateway
apm run copilot-analysis --param service_name=api-gateway
apm run debug --param service_name=api-gateway
```

### Code Analysis
### Code Analysis with Copilot CLI
```bash
# Scripts that use Codex for code understanding
# Scripts that use Copilot CLI for advanced code understanding
apm run code-review --param pull_request=123
apm run analyze-code --param file_path="src/main.py"
apm run refactor --param component="UserService"
```

### Code Analysis with Codex
```bash
# Scripts that use Codex for code understanding
apm run codex-review --param pull_request=123
apm run codex-analyze --param file_path="src/main.py"
```

### Documentation Tasks
Expand All @@ -145,17 +184,22 @@ apm run summarize --param report_type="weekly"
**"Runtime not found"**
```bash
# Install missing runtime
apm runtime setup copilot # Recommended
apm runtime setup codex
apm runtime setup llm

# Check installed runtimes
apm runtime list
```

**"No GitHub token"**
**"Command not found: copilot"**
```bash
# Set GitHub token for free models
export GITHUB_TOKEN=your_github_token
# Ensure Node.js v22+ and npm v10+ are installed
node --version # Should be v22+
npm --version # Should be v10+

# Reinstall Copilot CLI
apm runtime setup copilot
```

**"Command not found: codex"**
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "apm-cli"
version = "0.4.1"
version = "0.4.2"
description = "MCP configuration tool"
readme = "README.md"
requires-python = ">=3.9"
Expand Down
Loading