Skip to content
Agentmart
Submit a tool

deploy-to-connect

Deploy or publish Python and R content to a Posit Connect server using rsconnect-python or the R rsconnect package.

Skill by posit-pbc

IndexedMIT★ 547
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/posit-dev-deploy-to-connect

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Deploy or publish Python and R content to a Posit Connect server using rsconnect-python or the R rsconnect package. Handles interactive apps and dashboards, web APIs, rendered documents, and prepared bundles/manifests. Use whenever the user asks to deploy, publish, or redeploy content to Posit Connect, or mentions rsconnect. Consult this skill instead of guessing flags or commands.

Use cases: backend, devops, writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/deploy-to-connect

What's inside

Skill name
deploy-to-connect
Description
Deploy or publish Python and R content to a Posit Connect server using rsconnect-python or the R rsconnect package. Handles interactive apps and dashboards, web APIs, rendered documents, and prepared bundles/manifests. Use whenever the user asks to deploy, publish, or redeploy content to Posit Connect, or mentions rsconnect. Consult this skill instead of guessing flags or commands.
License
MIT
Metadata
author: posit-pbc · version: 4.0
Instructions
366 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

<!--
Maintainer note: edit this skill in posit-dev/connect only.
Downstream copies are overwritten by the sync workflow.
-->

# Deploying to Posit Connect

This guide covers Python, R, and static content on a Connect server.
A registered Connect Model Context Protocol (MCP) server can also provide publishing tools.

Choose the deployment route that matches the content and available tools:

- Python — [posit-cli](https://github.com/posit-dev/posit-cli), which provides the `posit` CLI and is published on PyPI. Its `posit connect` commands wrap [rsconnect-python](https://github.com/posit-dev/rsconnect-python).
- R — the R [`rsconnect`](https://rstudio.github.io/rsconnect/) package, pointed at a Connect server.
- A registered Connect MCP server — use its publishing tools when they support the content.

If the user asks a question ("how do I…", "what is the command…") rather than asking for a deploy, answer from this guide and stop.

At the end, report which server you deployed to, which content type you picked, any tool you installed, and any assumption you made.

---

## Stage 1 — Detect the content

Infer the language and framework from the files in the project directory. Common signals:

| Signal in project dir | Likely content |
| --- | --- |
| `app.py` | Python web app — Shiny for Python, Streamlit, Dash, Gradio, Panel, or Bokeh |
| `app.R`, or `ui.R` + `server.R` | Shiny for R |
| `plumber.R` / `entrypoint.R` containing `plumb()` | Plumber API (R) |
| `*.qmd` | Quarto document |
| `*.Rmd` | R Markdown |
| `*.ipynb` | Jupyter notebook / Voila |
| `index.html`, or a directory containing HTML, CSS, JavaScript, or image files | Static HTML site |
| `manifest.json` | Prebuilt bundle — deploy it directly, no framework guess needed |
| A bare `.py` or `.R` — no framework import, no `ui.R`/`server.R`/`plumber.R`/`entrypoint.R` alongside | Script — a batch/ETL job that Quarto renders and Connect can schedule |

### Confirm the guess

The imports in `app.py` name the framework:

```console
grep -Eo 'import (shiny|streamlit|dash|gradio|panel|bokeh)|from (shiny|streamlit|dash|gradio|panel|bokeh)' app.py
```

A bare ASGI or WSGI object means `fastapi` or `flask`.

Dependency files confirm the language: `requirements.txt` and `pyproject.toml` for Python, `DESCRIPTION` and `renv.lock` for R.

Quarto renders a script only if it opens with a front-matter comment: `# %% [markdown]` around a `---` block in Python, `#' ---` in R. Most scripts lack one — add it before the deploy (Stage 5).

If the content is ambiguous (both Python and R files, or an `app.py` with no recognizable import), use your discretion, and report the assumption you made.

---

## Stage 2 — Inventory your tools

Probe the environment and build a capability set:

```console
command -v posit                                     # posit-cli on PATH
command -v rsconnect                                 # rsconnect-python on PATH
command -v uv                                        # uv (installs and runs Python tools)
uv tool list 2>/dev/null | grep posit-cli            # posit-cli installed via uv
command -v Rscript                                   # R present
Rscript -e 'cat(requireNamespace("rsconnect", quietly=TRUE))' 2>/dev/null   # R rsconnect package
command -v quarto                                     # quarto CLI
command -v git                                        # git
```

With `uv` present, Python content needs no install step. `uv tool run --from posit-cli posit ...` fetches and runs the CLI on demand.
If an authenticated Connect MCP server is registered, include its publishing tools in the capability set.

---

## Stage 3 — Pick a route

Cross the detected content (Stage 1) with your capabilities (Stage 2).

### Registered Connect MCP server

If a registered Connect MCP server offers publishing tools for this content, follow the guidance provided by that server.
Otherwise, use a publishing client below.

### Python content

Use posit-cli. With `posit` on `PATH`:

```console
posit connect deploy <framework> ./my-app
```

Off `PATH` but with `uv` present:

```console
uv tool run --from posit-cli posit connect deploy <framework> ./my-app
```

Both forms take identical arguments. The rest of this guide writes the bare `posit connect ...` form. Prefix it with `uv tool run --from posit-cli` when you use the second route.

`posit connect` mounts the full `rsconnect` command set, so `posit connect <command>` and `rsconnect <command>` take the same arguments and share the same saved servers. If `rsconnect` is on `PATH` and you cannot get `posit`, run `rsconnect <command>` in place of `posit connect <command>`.

`<framework>` is one of `api`, `bokeh`, `bundle`, `dash`, `fastapi`, `flask`, `git`, `gradio`, `html`, `manifest`, `nodejs`, `notebook`, `panel`, `pyproject`, `quarto`, `shiny`, `streamlit`, `tensorflow`, `voila`. For anything outside that list, `posit connect deploy other-content` prints guidance.

The frameworks and flags depend on the installed version, so confirm against `posit connect deploy --help` rather than this list. If `uv tool run` resolves a stale cached version, add `--refresh`: `uv tool run --refresh --from posit-cli posit ...`.

### R content

Use the R `rsconnect` package, through `Rscript -e '...'` or an R session:

- Shiny for R, Plumber API, or any app directory → `deployApp()`
- A single R Markdown or Quarto document → `deployDoc()`
- A full R Markdown or Quarto site → `deploySite()`

If `Rscript` is absent, deploy the R content through posit-cli with a `manifest.json`:

- A `manifest.json` already exists — deploy it directly:
  ```console

From posit-dev/skills, MIT.

More from posit-dev/skills

Signals

Stars
547
Forks
57
Open issues
6
Last commit (this folder)
Sep 8, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
4.0
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026
Cite this page

deploy-to-connect skill. Agent Mart. https://agentmart.dev/skills/posit-dev-deploy-to-connect (last updated 2026-10-24)