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
5 changes: 2 additions & 3 deletions .github/workflows/run-evals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ jobs:

- name: Install Upsun CLI
run: |
curl -fsSL https://raw.githubusercontent.com/platformsh/cli/main/installer.sh | VENDOR=upsun bash
echo "$HOME/.platformsh/bin" >> $GITHUB_PATH
curl -fsSL https://raw.githubusercontent.com/upsun/cli/main/installer.sh | bash

- name: Install using-upsun skill
- name: Install upsun skill
run: |
mkdir -p "$HOME/.claude/skills/"
cp -r plugins/upsun/skills/. "$HOME/.claude/skills/"
Expand Down
39 changes: 14 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Upsun plugin for AI coding agents and IDEs. Manage [Upsun](https://upsun.com) pr

| Component | Location | Description |
|-----------|----------|-------------|
| **Skills** | `plugins/upsun/skills/` | `using-upsun` – 130+ CLI commands for deployments, environments, backups, databases, and more |
| **Skills** | `plugins/upsun/skills/` | `upsun` – workflow guide for deployments, environments, backups, databases, and more, with a config reference |
| **MCP Server** | `plugins/upsun/.mcp.json` | Natural-language infrastructure management via [Upsun MCP](https://docs.upsun.com/get-started/ai/using-the-mcp.html) |

## Installation
Expand All @@ -19,13 +19,13 @@ Upsun plugin for AI coding agents and IDEs. Manage [Upsun](https://upsun.com) pr

```bash
# Install Upsun CLI (if not already installed)
curl -fsSL https://raw.githubusercontent.com/platformsh/cli/main/installer.sh | VENDOR=upsun bash
curl -fsSL https://raw.githubusercontent.com/upsun/cli/main/installer.sh | bash

# Or via brew
brew install platformsh/tap/upsun-cli
brew install upsun/tap/upsun-cli

# Authenticate
upsun auth:browser-login
upsun login
```

2. **AI coding agent or IDE** – e.g. [Claude Code](https://claude.ai/code), Cursor, or other MCP-compatible tools
Expand Down Expand Up @@ -53,13 +53,13 @@ After installation, the skill is immediately available to your AI agent. Ask it

### Alternative: Skills only (manual)

To install just the skills without the full plugin, copy the contents of `plugins/upsun/skills/` into your agent's skills directory so that the `using-upsun/` folder ends up directly inside it (for example, at `~/.claude/skills/using-upsun/` for Claude Code). This includes all current and future skills in the repo.
To install just the skills without the full plugin, copy the contents of `plugins/upsun/skills/` into your agent's skills directory so that the `upsun/` folder ends up directly inside it (for example, at `~/.claude/skills/upsun/` for Claude Code). This includes all current and future skills in the repo.

**Claude Code:**

```bash
git clone https://github.com/upsun/ai.git /tmp/upsun-ai
# Copy the contents of the skills directory so that ~/.claude/skills/using-upsun/ is created
# Copy the contents of the skills directory so that ~/.claude/skills/upsun/ is created
cp -r /tmp/upsun-ai/plugins/upsun/skills/. ~/.claude/skills/
```

Expand Down Expand Up @@ -148,28 +148,17 @@ The skill activates automatically when you mention Upsun-related tasks:

### Skill documentation

- **[SKILL.md](plugins/upsun/skills/using-upsun/SKILL.md)** – Main skill navigation and quick reference
- **[references/](plugins/upsun/skills/using-upsun/references/)** - Detailed command documentation
- [COMMAND-INDEX.md](plugins/upsun/skills/using-upsun/references/COMMAND-INDEX.md) - Alphabetical command reference
- [environments.md](plugins/upsun/skills/using-upsun/references/environments.md) - Environment lifecycle
- [deployments.md](plugins/upsun/skills/using-upsun/references/deployments.md) - Deployment patterns
- [backups.md](plugins/upsun/skills/using-upsun/references/backups.md) - Backup/restore procedures
- [services-databases.md](plugins/upsun/skills/using-upsun/references/services-databases.md) - Database operations
- [resources-scaling.md](plugins/upsun/skills/using-upsun/references/resources-scaling.md) - Resource management
- [access-security.md](plugins/upsun/skills/using-upsun/references/access-security.md) - Security and access control
- [integration-variables.md](plugins/upsun/skills/using-upsun/references/integration-variables.md) - Configuration
- [development-tools.md](plugins/upsun/skills/using-upsun/references/development-tools.md) - Developer tools
- [projects-organizations.md](plugins/upsun/skills/using-upsun/references/projects-organizations.md) - Project management
- [troubleshooting.md](plugins/upsun/skills/using-upsun/references/troubleshooting.md) - Common issues
- **[SKILL.md](plugins/upsun/skills/upsun/SKILL.md)** – Workflow guide and common operations
- **[references/config.md](plugins/upsun/skills/upsun/references/config.md)** – `.upsun/config.yaml` reference templates

### Skill architecture

The `using-upsun` skill uses a progressive disclosure architecture:
The `upsun` skill uses a progressive disclosure architecture:

1. **SKILL.md** (entry point) - Workflow navigation and common operations
2. **references/** (on-demand) - Detailed documentation loaded as needed
1. **SKILL.md** (entry point) Workflow navigation and common operations
2. **references/** (on-demand) Detailed documentation loaded as needed

This design minimizes context usage while providing comprehensive coverage.
This design minimizes context usage.

### Plugin structure

Expand All @@ -181,14 +170,14 @@ plugins/upsun/
│ └── plugin.json # Plugin manifest
├── .mcp.json # MCP server configuration
└── skills/
└── using-upsun/ # Upsun skill
└── upsun/ # Upsun skill
```

This structure means the plugin is self-contained and reusable — any agent that installs `upsun@upsun` gets all components automatically.

### Adding documentation

1. Update existing reference files in `plugins/upsun/skills/using-upsun/references/`
1. Update existing reference files in `plugins/upsun/skills/upsun/references/`
2. Add cross-references to related documents
3. Update `SKILL.md` if adding commonly-used commands
4. Test that your agent can find and use the new documentation
Expand Down
27 changes: 15 additions & 12 deletions plugins/upsun/skills/upsun/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: upsun
description: Use when the user wants to do anything on Upsun — first-time setup, deploy, redeploy, branch, merge, backup, restore, scale, SSH, debug, tunnel, logs, domain, variables, integrations, environment lifecycle
allowed-tools: Bash(upsun *:list*) Bash(upsun *:info*) Bash(upsun *:get*) Bash(upsun logs*) Bash(upsun url*) Bash(upsun relationships*) Bash(upsun metrics*) Bash(upsun help*) Bash(upsun list*) Bash(upsun --version)
allowed-tools: Bash(upsun *:list*), Bash(upsun *:info*), Bash(upsun *:get*), Bash(upsun logs*), Bash(upsun url*), Bash(upsun relationships*), Bash(upsun metrics*), Bash(upsun help*), Bash(upsun list*), Bash(upsun --version)
---

You are a developer's assistant for Upsun. Help them ship, debug, and iterate fast — safely.
Expand Down Expand Up @@ -39,23 +39,25 @@ Walk the developer through these steps in order. Do one at a time; confirm each

```bash
# macOS
brew install platformsh/tap/upsun-cli
brew install upsun/tap/upsun-cli

# Linux / WSL
curl -fsSL https://raw.githubusercontent.com/platformsh/cli/main/installer.sh | VENDOR=upsun bash
curl -fsSL https://raw.githubusercontent.com/upsun/cli/main/installer.sh | bash

# Windows (Scoop)
scoop bucket add platformsh https://github.com/platformsh/homebrew-tap.git
scoop bucket add upsun https://github.com/upsun/homebrew-tap.git
scoop install upsun
```

Native Alpine/Debian/RPM packages are also available from `repositories.upsun.com`.

To upgrade an existing installation:
```bash
# macOS
brew upgrade upsun-cli
brew upgrade upsun/tap/upsun-cli

# Linux / WSL
upsun self:update
curl -fsSL https://raw.githubusercontent.com/upsun/cli/main/installer.sh | bash

# Windows (Scoop)
scoop update upsun
Expand Down Expand Up @@ -127,7 +129,7 @@ Note: once a source integration is active, the external repo becomes the source

Never assume a project or environment. Resolve in this order:

1. **MCP available** -> call `list-project`, then `list-environment` and present options
1. **MCP available** -> call `mcp__upsun__list-project`, then `mcp__upsun__list-environment` and present options
2. **Upsun CLI available** -> run `upsun project:list` / `upsun environment:list` and present options
3. **Neither available** -> ask for PROJECT_ID and environment name

Expand All @@ -141,7 +143,7 @@ If inside a linked Git repo, run `upsun project:info` to auto-detect first. If t

- Never assume `main` is production — confirm with `upsun environment:info`
- If a source integration is active, `upsun push` still works but pushes to the source repo, so advanced git-push options (`--activate`, `--deploy-strategy`) are not available.
- **Deployment strategy matters for migrations.** With `rolling` (default), old and new app versions run simultaneously sharing the same database, so schema changes must be backwards-compatible. With `stopstart`, the old version stops before the new starts — avoids that constraint but causes brief downtime. Use `upsun push --deploy-strategy=stopstart` or, for manual deploy types, `upsun deploy --strategy=stopstart`.
- **Deployment strategy matters for migrations.** Default is `stopstart`: the old version stops before the new starts, causing brief downtime but no constraint on schema compatibility. With `rolling` (opt-in), old and new app versions run simultaneously sharing the same database, so schema changes must be backwards-compatible but there is no downtime. Use `upsun push --deploy-strategy=rolling` or, for manual deploy types, `upsun deploy --strategy=rolling`.
- After deploy, offer to tail logs: `upsun logs --tail`

### Branch / Merge (feature environments)
Expand All @@ -164,12 +166,12 @@ If inside a linked Git repo, run `upsun project:info` to auto-detect first. If t

- List relationships from `upsun relationships` (or MCP) before asking which service
- Goal options: interactive shell / export dump (recommend `.sql.gz`) / local tunnel for GUI tools / run migration
- Migration: suggest testing on a staging branch first; consider `stopstart` deploy strategy for non-backwards-compatible schema changes
- Migration: suggest testing on a staging branch first; the default `stopstart` strategy is safe for non-backwards-compatible schema changes (don't opt in to `rolling` unless the schema change is backwards-compatible)
- Tunnel: show the full connection string after opening so the developer can paste it into their tool

### Environment Variables

- Two levels: **project** (all environments) and **environment** (one environment, inherits down the tree). Setting environment-level variables will cause an automatic deployment by default; set `env:deploy:type manual` to make deployments explicit, so multiple variables can be set without triggering a deploy for each one.
- Two levels: **project** (all environments) and **environment** (one environment, inherits down the tree). Setting environment-level variables will cause an automatic deployment by default; run `upsun env:deploy:type manual` to make deployments explicit, so multiple variables can be set without triggering a deploy for each one.
- Variables need the `env:` prefix to appear as OS environment variables. Without it, they only appear in `$PLATFORM_VARIABLES` (base64-encoded JSON).
- Use `--sensitive true` for secrets, to hide the variable value from logs and the console.
- Environment variables are runtime-only by default. To make available at build time, use `--visible-build true`.
Expand All @@ -185,8 +187,9 @@ If inside a linked Git repo, run `upsun project:info` to auto-detect first. If t
### Scale / Resources

- Run `upsun resources:get` to show current allocations for all apps, workers, and services
- CPU and RAM are paired via container profiles (HIGH_CPU, BALANCED, HIGH_MEMORY, HIGHER_MEMORY). Use `upsun resources:set` to adjust.
- Horizontal scaling: set instance count separately. Each instance gets the full selected resources (not divided).
- `upsun resources:set --size <name>:<cpu>` sets the CPU value for an app or service (e.g. `--size myapp:0.25,db:1`); RAM is derived from the container profile. Run `upsun resources:sizes` to list available sizes.
- Profiles (`HIGH_CPU`, `BALANCED`, `HIGH_MEMORY`, `HIGHER_MEMORY`) determine the RAM-per-CPU ratio and are set via `container_profile:` in `.upsun/config.yaml`, not via CLI.
- Horizontal scaling: `upsun resources:set --count <name>:<n>`. Each instance gets the full selected resources (not divided).

### Domain

Expand Down
Loading