posit-cli
A friendly command-line interface for Posit products, in the spirit of gh.
$ posit connect login https://connect.example.com # OAuth, tokens in your OS keyring
$ posit connect api v1/user -q .username # gh-api-style raw request
$ posit connect deploy streamlit ./my-app # everything rsconnect can do
This project is in early-stage development and so far only supports Posit Connect's APIs.
Installation
Install posit-cli from PyPI with
uv:
uv tool install posit-cli
To get unreleased changes, install from GitHub instead:
uv tool install git+https://github.com/posit-dev/posit-cli.git
If you authenticate to GitHub over SSH, use the git+ssh:// form (uv requires
the git@ username):
uv tool install git+ssh://git@github.com/posit-dev/posit-cli.git
Each of these puts the posit executable on your PATH. To upgrade later, run
uv tool upgrade posit-cli. See uv's
Git authentication docs
for tokens and other hosts.
Getting started
1. Log in. Point posit at your Connect server and authenticate. This runs
an OAuth 2.1 flow in your browser and saves the tokens in your OS keyring, so
you only do it once per server:
$ posit connect login https://connect.example.com
2. Try a request. Confirm you're connected by asking Connect who you are:
$ posit connect api v1/user -q .username
3. Deploy something. Anything rsconnect can deploy, posit can too:
$ posit connect deploy streamlit ./my-app
That's it — from here, explore posit connect --help for the full command set.
Authentication
posit connect login runs an OAuth 2.1 flow and stores tokens in your OS
keyring; posit connect api and the deploy commands reuse those credentials
automatically (including token refresh). You can also point at a server ad hoc
with --server/CONNECT_SERVER and --api-key/CONNECT_API_KEY.
posit connect api
A gh api-style raw REST client, authenticated with your saved credentials.
PATH is relative to the Connect API root (the /__api__ prefix is added for
you):
$ posit connect api v1/user # GET, pretty-printed JSON
$ posit connect api v1/user -q .username # filter with a jq expression
$ posit connect api "v1/content?limit=3" -q '.[].name'
-q/--jq runs the response through jq, like
gh api --jq: string results print unquoted, one per line.
-i/--include prepends the HTTP status line and response headers to the
output (handy for inspecting rate limits, request IDs, or the server version):
$ posit connect api v1/user -i
--paginate (GET only) follows Connect's pagination and prints all pages'
results combined. It handles both of Connect's pagination styles — the
cursor style (e.g. v1/audit_logs) and the page-number style (e.g.
v1/users, v1/groups) — and leaves unpaginated endpoints unchanged:
$ posit connect api v1/users --paginate -q 'length' # count every user
PATH may also be a full URL on the configured server — convenient for pasting
a paging.next link straight back in. A URL for a different host is rejected.
Query parameters vs. request body
Like gh api, -f/-F fields default to a POST request body (adding any
field flips the method to POST unless you pass -X). To send query
parameters on a read, put them in the path or force GET:
$ posit connect api "v1/users?page_size=5" # query params in the path
$ posit connect api v1/users -X GET -f page_size=5 # or force GET
$ posit connect api v1/content -f name=my-app # POST body (creates content)
posit connect *
posit wraps rsconnect-python:
it re-exposes the full rsconnect command set under posit connect, in addition to the api utility.
Using posit with Claude Code
This repo ships a skill (at skills/posit-cli/) that teaches
coding agents to drive posit — auth, posit connect api, and deploys. Install
it with the skills CLI:
npx skills add posit-dev/posit-cli
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file posit_cli-0.1.1.tar.gz.
File metadata
- Download URL: posit_cli-0.1.1.tar.gz
- Upload date:
- Size: 69.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fd011f8e25a7b47f99c89a368e70c46a3b967d0a3503d0c97ea3d38dcb2774c
|
|
| MD5 |
240f6536e1c9b0df012dad4e101db663
|
|
| BLAKE2b-256 |
02938c40b4314f9c5a322888439e500998ab0681ebcb7d97486aaddcae5ff1df
|
Provenance
The following attestation bundles were made for posit_cli-0.1.1.tar.gz:
Publisher:
release.yaml on posit-dev/posit-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
posit_cli-0.1.1.tar.gz -
Subject digest:
8fd011f8e25a7b47f99c89a368e70c46a3b967d0a3503d0c97ea3d38dcb2774c - Sigstore transparency entry: 2345649191
- Sigstore integration time:
-
Permalink:
posit-dev/posit-cli@ce29b800d1a25a2ed060a346d79e1154802d784e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/posit-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@ce29b800d1a25a2ed060a346d79e1154802d784e -
Trigger Event:
push
-
Statement type:
File details
Details for the file posit_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: posit_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90a7009b8e8532a5bc0173365608fbec8c69df2bd04cf9552ec0e84e82266cc1
|
|
| MD5 |
a54d618b717e47bbe7f0e119a5252649
|
|
| BLAKE2b-256 |
7beacf3590804abdffcbfe90e409477406a66ec9f722f734e35061440cde2338
|
Provenance
The following attestation bundles were made for posit_cli-0.1.1-py3-none-any.whl:
Publisher:
release.yaml on posit-dev/posit-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
posit_cli-0.1.1-py3-none-any.whl -
Subject digest:
90a7009b8e8532a5bc0173365608fbec8c69df2bd04cf9552ec0e84e82266cc1 - Sigstore transparency entry: 2345649226
- Sigstore integration time:
-
Permalink:
posit-dev/posit-cli@ce29b800d1a25a2ed060a346d79e1154802d784e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/posit-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@ce29b800d1a25a2ed060a346d79e1154802d784e -
Trigger Event:
push
-
Statement type: