Skip to content

Commit 9d44953

Browse files
committed
Add APM CLI - init, install, compile, deps
1 parent 63bc6b4 commit 9d44953

64 files changed

Lines changed: 13825 additions & 5 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
- [⚡ Get started](#-get-started)
1919
- [📽️ Video Overview](#️-video-overview)
2020
- [🔧 Specify CLI Reference](#-specify-cli-reference)
21-
- [📚 Core philosophy](#-core-philosophy)
21+
- [� APM Integration](#-apm-integration)
22+
- [�📚 Core philosophy](#-core-philosophy)
2223
- [🌟 Development phases](#-development-phases)
2324
- [🎯 Experimental goals](#-experimental-goals)
2425
- [🔧 Prerequisites](#-prerequisites)
@@ -82,6 +83,7 @@ The `specify` command supports the following options:
8283
|-------------|----------------------------------------------------------------|
8384
| `init` | Initialize a new Specify project from the latest template |
8485
| `check` | Check for installed tools (`git`, `claude`, `gemini`, `code`/`code-insiders`, `cursor-agent`) |
86+
| `apm` | APM - Agent Package Manager commands for Context management |
8587

8688
### `specify init` Arguments & Options
8789

@@ -124,7 +126,25 @@ specify init my-project --ai claude --debug
124126
specify check
125127
```
126128

127-
## 📚 Core philosophy
129+
## � APM Integration
130+
131+
Spec Kit includes full APM (Agent Package Manager) functionality for managing modular context packages and files:
132+
133+
### Unified Initialization
134+
```bash
135+
# Creates both SDD and APM structures
136+
specify init my-project --ai claude
137+
```
138+
139+
### APM Commands
140+
```bash
141+
# Core APM commands available under 'apm' subcommand
142+
specify apm compile # Generate AGENTS.md from your context
143+
specify apm install # Install APM package dependencies
144+
specify apm deps list # List available APM packages
145+
```
146+
147+
## �📚 Core philosophy
128148

129149
Spec-Driven Development is a structured process that emphasizes:
130150

@@ -427,6 +447,7 @@ rm gcm-linux_amd64.2.6.1.deb
427447

428448
- Den Delimarsky ([@localden](https://github.com/localden))
429449
- John Lam ([@jflam](https://github.com/jflam))
450+
- Daniel Meppiel [@danielmeppiel](https://github.com/danielmeppiel)
430451

431452
## 💬 Support
432453

pyproject.toml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,38 @@ version = "0.0.4"
44
description = "Setup tool for Specify spec-driven development projects"
55
requires-python = ">=3.11"
66
dependencies = [
7+
# Existing spec-kit dependencies
78
"typer",
8-
"rich",
9+
"rich>=13.0.0",
910
"httpx[socks]",
1011
"platformdirs",
1112
"readchar",
1213
"truststore>=0.10.4",
14+
# APM dependencies (from awd-cli, excluding runtime/embargo items)
15+
"click>=8.0.0",
16+
"colorama>=0.4.6",
17+
"pyyaml>=6.0.0",
18+
"requests>=2.28.0",
19+
"python-frontmatter>=1.0.0",
20+
"tomli>=1.2.0; python_version<'3.11'",
21+
"toml>=0.10.2",
22+
"rich-click>=1.7.0",
23+
"watchdog>=3.0.0",
24+
"GitPython>=3.1.0",
1325
]
1426

1527
[project.scripts]
1628
specify = "specify_cli:main"
1729

30+
[project.optional-dependencies]
31+
dev = [
32+
"pytest>=7.0.0",
33+
"pytest-cov>=4.0.0",
34+
"black>=23.0.0",
35+
"isort>=5.0.0",
36+
"mypy>=1.0.0",
37+
]
38+
1839
[build-system]
1940
requires = ["hatchling"]
2041
build-backend = "hatchling.build"

src/apm_cli/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""APM-CLI package."""
2+
3+
from .version import get_version
4+
5+
__version__ = get_version()

src/apm_cli/adapters/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Adapters package."""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Client adapters package."""
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
"""Base adapter interface for MCP clients."""
2+
3+
from abc import ABC, abstractmethod
4+
5+
6+
class MCPClientAdapter(ABC):
7+
"""Base adapter for MCP clients."""
8+
9+
@abstractmethod
10+
def get_config_path(self):
11+
"""Get the path to the MCP configuration file."""
12+
pass
13+
14+
@abstractmethod
15+
def update_config(self, config_updates):
16+
"""Update the MCP configuration."""
17+
pass
18+
19+
@abstractmethod
20+
def get_current_config(self):
21+
"""Get the current MCP configuration."""
22+
pass
23+
24+
@abstractmethod
25+
def configure_mcp_server(self, server_url, server_name=None, enabled=True, env_overrides=None, server_info_cache=None, runtime_vars=None):
26+
"""Configure an MCP server in the client configuration.
27+
28+
Args:
29+
server_url (str): URL of the MCP server.
30+
server_name (str, optional): Name of the server. Defaults to None.
31+
enabled (bool, optional): Whether to enable the server. Defaults to True.
32+
env_overrides (dict, optional): Environment variable overrides. Defaults to None.
33+
server_info_cache (dict, optional): Pre-fetched server info to avoid duplicate registry calls.
34+
runtime_vars (dict, optional): Runtime variable values. Defaults to None.
35+
36+
Returns:
37+
bool: True if successful, False otherwise.
38+
"""
39+
pass

0 commit comments

Comments
 (0)