Skip to main content

VGS CLI

Command Line Tool for programmatic configurations on VGS.

Official Documentation

Table of Contents

Requirements

Python 3.11 or newer with OpenSSL 1.1.1 or newer, or Docker.

Installation

PyPI

Install from PyPI:

python3 -m pip install vgs-cli

Run

Verify the installation:

vgs --version

Running in Docker

Check our official documentation.

AI agent skill

Install the agent skill:

npx skills add verygoodsecurity/skills --skill vgs-cli-guide

The guide covers Dashboard-assisted onboarding, the complete built-in command surface, controlled route and Collect Form changes, service-account automation, Docker, certificates, logs, and troubleshooting. Installation uses the Skills CLI.

Update the agent skill:

npx skills update vgs-cli-guide

Commands

Full command reference:

Tenant terminology

Use tenant and --tenant/-T in new commands. Legacy vault commands and --vault/-V options still work, but print a deprecation warning.

Authentication

Command Purpose
vgs --help List available commands.
vgs login Start an interactive session.
vgs logout End the current session.

Organizations and tenants

Command Purpose
vgs get organizations List accessible organizations.
vgs get tenants List all tenants visible to the authenticated identity.
vgs get tenant -T <TENANT_ID> Get one tenant with provisioning, account, configuration, and merchant state.
vgs generate tenant > tenant.yaml Generate a tenant template.
vgs apply tenant -f tenant.yaml Create and configure a SANDBOX or LIVE tenant through a staged, resumable workflow.
vgs apply tenant -O <ORGANIZATION_ID> -f tenant.yaml Create a tenant when organizationId is omitted from the template.
vgs apply tenant-resources -T <TENANT_ID> -f resources.yaml --dry-run true Validate tenant resources without applying them.
vgs apply tenant-resources -T <TENANT_ID> -f resources.yaml Apply reviewed resources to a tenant.

vgs get tenants does not take an organization option. vgs apply tenant requires the organization ID either in tenant.yaml as data.organizationId or through -O/--organization; if both are present, they must match.

Organization notifications

Command Purpose
vgs get notifications -O <ORGANIZATION_ID> List notification integrations.
vgs get notification-events -O <ORGANIZATION_ID> <INTEGRATION_ID> List configured events for a notification integration.
vgs generate notification > notification.yaml Generate a notification integration template.
vgs apply notification -O <ORGANIZATION_ID> -f notification.yaml Create or update a notification integration from a file.
vgs apply notification -O <ORGANIZATION_ID> --enable <INTEGRATION_ID> Enable a notification integration.
vgs apply notification -O <ORGANIZATION_ID> --disable <INTEGRATION_ID> Disable a notification integration.
vgs delete notification -O <ORGANIZATION_ID> <INTEGRATION_ID> Delete a notification integration.

Notification management requires an active organization, organization-admin access. The CLI masks generated webhook secrets in its output.

Routes

Command Purpose
vgs generate route --protocol http > http-route.yaml Generate an HTTP route template.
vgs generate route --protocol sftp > sftp-route.yaml Generate an SFTP route template.
vgs get routes -T <TENANT_ID> List tenant routes.
vgs apply routes -T <TENANT_ID> -f <FILE> Apply tenant routes.
vgs delete routes -T <TENANT_ID> <ROUTE_ID> Delete one tenant route.

Collect Forms

Command Purpose
vgs get forms -T <TENANT_ID> List Collect Forms.
vgs get form -T <TENANT_ID> <FORM_ID> Get one Collect Form.
vgs generate form > form.yaml Generate a Collect Form template.
vgs apply form -T <TENANT_ID> -f <FILE> Apply a Collect Form from a file.
vgs apply form -T <TENANT_ID> --json '<JSON>' Apply inline Collect Form JSON.
vgs delete form -T <TENANT_ID> <FORM_ID> Delete one Collect Form.

Access credentials and logs

Command Purpose
vgs get access-credentials -T <TENANT_ID> List tenant access credentials.
vgs generate access-credentials -T <TENANT_ID> Generate tenant access credentials. Capture the output securely as shown below.
vgs logs access -T <TENANT_ID> View tenant access logs.
vgs logs operations -T <TENANT_ID> -R <REQUEST_ID> View request operation logs.
vgs logs reveal-decisions -T <TENANT_ID> -R <REQUEST_ID> Show why a request's reveal session decisions were made (outcome, decider, reason, host, and ordered checks).

Access-credential generation is a live mutation that returns secret material. Write it to a new, approved absolute path outside version control with owner-only permissions, and do not display or inspect it in shared logs:

(
  umask 077
  set -o noclobber
  vgs generate access-credentials -T <TENANT_ID> \
    > /absolute/secure/new-access-credentials.yaml
)

Reveal sessions

A reveal session lets an agent platform reveal selected tokens to an allowlist of hosts through a session proxy. Creating, listing, and ending sessions requires the reveal-sessions:* scopes, which must be enabled for your organization by VGS. Use the agent-gateway service-account template for a least-privilege account.

Command Purpose
vgs generate reveal-session > reveal-session.yaml Generate a reveal session template.
vgs apply reveal-session -T <TENANT_ID> -f reveal-session.yaml Create a reveal session.
vgs get reveal-sessions -T <TENANT_ID> List reveal sessions with their state, expiry, allowed hosts, and counters.
vgs delete reveal-session -T <TENANT_ID> <SESSION_ID> End a reveal session. SESSION_ID is RS plus 22 base58 characters.

Required scopes: apply reveal-session and delete reveal-session need reveal-sessions:write; get reveal-sessions needs reveal-sessions:read (reveal-sessions:write does not imply read).

apply reveal-session prints the session's proxy URL and tokens once, and writes Store the proxy URL now: it carries the session secret and is not shown again. to stderr. The URL is <scheme>://<session id>:<secret>@<host>:<port>: treat it as a secret, like a password. Store them immediately: they are not shown again, and get reveal-sessions never lists them. Capture the output as shown for access credentials.

The proxy block includes scheme: https means clients make a TLS connection to the proxy itself, http a plain one (shown as http when the server sends none).

Point a browser at pacUrl (a PAC file that sends all traffic to the gateway), and still supply the session credentials when the proxy asks for them.

Example reveal-session.yaml:

apiVersion: 1.0.0
kind: RevealSession
data:
  aliases:
    - alias: tok_live_card
      format: card_number     # card_number, card_cvc, or text
      bin: "411111"           # optional, 6 to 8 digits
      length: 16              # optional
      storage: VOLATILE       # optional: PERSISTENT (default) or VOLATILE
  allowedHosts:               # optional, up to 20 hosts
    - api.stripe.com
  allowedClientCidrs:         # optional, up to 10 CIDRs
    - 203.0.113.0/24

vgs logs reveal-decisions -T <TENANT_ID> -R <REQUEST_ID> [-o json|yaml] shows the reveal decisions recorded for a request. Fields are snake_case attributes, as the API returns them: outcome, decided_by, reason, host, the ordered checks (check, result, detail), occurred_at, session_id, and alias_hashes. <REQUEST_ID> is the request trace ID used by vgs logs access and vgs logs operations. Plaintext, tokens, and raw aliases are never included.

vgs generate reveal-session also shows the optional egressProxySettings block (type: custom, scheme, hostname, port, username, password).

Agent gateway settings and destinations

The agent gateway decides what a reveal session may do with hosts that are not on its allowedHosts list. Three tenant preferences and a list of destination overrides control it.

Command Purpose
vgs get agent-gateway -T <TENANT_ID> Print the three preferences (an unset autoGuardedRoutes prints null, an unset webhook "" and an unset hold 0) and every destination with its id, hostPattern, action and origin, sorted by hostPattern.
vgs apply agent-gateway -T <TENANT_ID> -f agent-gateway.yaml Set the preferences in the file and make the destination overrides match it, then print the result.

Required scopes: get agent-gateway needs preferences:read and agent-gateway:read; apply agent-gateway needs preferences:write, agent-gateway:write and agent-gateway:read (agent-gateway:write does not imply read, and apply reads the configuration back; without agent-gateway:read the API leaves the agent gateway preferences out of the preference list). The agent-gateway service-account template grants only the reveal-sessions:* scopes, so a service account that runs these commands needs the extra scopes.

The get agent-gateway output can include the step-up webhook URL, which may embed a secret in its path, so do not log it.

Example agent-gateway.yaml:

apiVersion: 1.0.0
kind: AgentGateway
data:
  autoGuardedRoutes: true                        # agentGatewayAutoGuardedRoutes; null leaves it as it is
  stepUpWebhookUrl: https://hooks.example.com/vgs # agentGatewayStepUpWebhookUrl
  stepUpHoldSeconds: 15                          # 0 (default 20) or 5 to 30
  destinations:                                  # optional; omit to leave destinations alone
    - hostPattern: "*.bad.example.com"
      action: block                              # block, trust, or guarded
    - hostPattern: checkout.shop.example.com
      action: trust
    - hostPattern: pay.example.net
      delete: true                               # the only way apply removes an auto row

allowedHosts on a reveal session is optional; without it, the settings above decide every host.

Unlisted hosts are guarded by default. A tenant that never set autoGuardedRoutes gets guarded sessions unless stepUpWebhookUrl is set, which makes them step_up. autoGuardedRoutes: true is guarded even with a webhook, and autoGuardedRoutes: false is step_up with a webhook and strict without one. get agent-gateway prints an unset autoGuardedRoutes as null, with a comment, and apply treats null as "leave it as it is": it never writes or deletes the preference. apply also skips a preference whose value already matches what get prints (unchanged <field>), so applying the output of get writes no preference. While autoGuardedRoutes is unset, setting a webhook where there was none tightens (guarded to step-up); changing or clearing it loosens.

apply agent-gateway prints one line per change (created, updated, deleted or unchanged) as it is made, restrictive-first: block destinations, preferences that tighten, trust and guarded destinations, deletes, then preferences that loosen. A hostPattern may appear only once in the file.

Destinations are matched by hostPattern, ignoring case, surrounding spaces and one trailing dot. Destinations missing from the server are created, a different action is updated, and origin: manual destinations that the file does not list are deleted. Omit destinations to leave all of them as they are. Each preference is set only when it appears in the file.

Destinations with origin: auto are staged by the gateway for your review and do not affect decisions until you act on them. apply keeps them unless the file names them with delete: true. Listing an auto destination with an action makes it a manual one. A destinations entry has either an action or delete: true, not both. The server refuses patterns that can never receive plaintext (never_host) and invalid values, and apply prints the server's code and detail.

Service accounts

Generate a service-account resource and save the YAML so you can review it before applying it. The general vgs-cli template accepts zero or more tenants; when no tenant is supplied, the generated account has no tenant access.

vgs generate service-account --template vgs-cli -T <TENANT_ID> > service-account.yaml

The agent-gateway template accepts zero or more tenants and needs no --var name; without -T it prints a warning and the account has no tenant access.

For the Agent Web Gateway Control Panel, use agent-web-gateway-admin. It accepts the same tenant options and generates the account name agent-gateway-admin (within the 20-character account-name limit):

vgs generate service-account --template agent-web-gateway-admin -T <TENANT_ID> > service-account.yaml

It grants cards:create, cards:read, and cards:update for saved-card creation, metadata retrieval and CVC/expiry updates, plus aliases:write, reveal-sessions:read/write, and agent-gateway:read/write. It excludes cards:write, cards:delete, and cards:read-pci: the template does not grant card deletion or access to raw PAN/CVC values. Tenant IDs supplied with -T are included in the CLI account export for the control panel. Preference and tenant-management permissions are outside this template's scope. Product scopes must be enabled for the organization.

Payment-credential templates require exactly one tenant and a name containing 1–20 characters:

vgs generate service-account --template <TEMPLATE> -T <TENANT_ID> --var name=<NAME> > service-account.yaml
Template Purpose
vgs-cli Automate common CLI organization, tenant, route, and access-log operations.
public-credential-collect Collect payment credentials without read access.
read-credentials-no-pci Read tokenized credentials without PCI data.
read-credentials-with-pci Read credentials including PCI data.
credentials-admin Read and write payment credentials.
agent-web-gateway-admin Create, read and update cards without deletion or PCI read; create aliases and manage reveal sessions and agent-gateway resources for the control panel.
agent-gateway Create, list, and end reveal sessions (reveal-sessions:read, reveal-sessions:write), with no route, vault, or credential access, for agent platforms. The reveal-sessions:* scopes must be enabled for the organization.

After reviewing the generated scopes, apply the resource to the organization:

vgs apply service-account -O <ORGANIZATION_ID> -f service-account.yaml

The apply response contains a one-time client secret. Run the command only in your private terminal, store the secret in an approved secret manager, and do not commit or share the response. See the service-account documentation for the full workflow.

Certificates

Command Purpose
vgs certificate --help Show certificate commands.

Automation with VGS CLI

If you want to use the VGS CLI for automation, create a service account.

VGS CLI Console

VGS CLI Console is a keyboard-first interactive workspace for managing VGS resources in SANDBOX tenants.

VGS CLI Console

Launch it from an installed VGS CLI:

vgs console

In the Console:

  1. Complete browser authentication and select a SANDBOX context.
  2. Open Organization, select Tenants, then choose Create tenant.
  3. Enter a unique tenant name and complete one of the CMP, HTTP, SFTP, or no-use-case paths.
  4. Review the retained answers before selecting Create tenant. This action creates real SANDBOX resources.
  5. Confirm that the completed tenant becomes the active Console context.

Telemetry

VGS CLI collects limited usage analytics to help VGS understand how the CLI is used and improve the product. To disable telemetry, set VGS_CLI_TELEMETRY_OPTOUT=1 or DO_NOT_TRACK=1.

Metadata

Release files for vgs-cli 1.37.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for vgs-cli 1.37.0
File Interpreter ABI Platform Actions
vgs_cli-1.37.0-py3-none-any.whl Python 3 none any Details for vgs_cli-1.37.0-py3-none-any.whl

Release files / vgs_cli-1.37.0-py3-none-any.whl

Download URL vgs_cli-1.37.0-py3-none-any.whl
Size 205.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c57b723b5a0bb28fb277bfb4df32ddd42ee0462e51aa58f015079e5c0619f9e
BLAKE2b-256 checksum
How to use checksums
8e45ee2d92a57604f96084e392ea5bb8eb077ab99c162bffe71606d98f2ae70f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for vgs-cli 1.37.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for vgs_cli-1.37.0-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.37.0 This release

1 release file Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page