Metadata-Version: 2.4
Name: vgs-cli
Version: 1.31.1
Summary: VGS Client
Home-page: https://github.com/verygoodsecurity/vgs-cli
Author: Very Good Security
Author-email: dev@verygoodsecurity.com
License: BSD
Platform: any
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: base58<3,>=2.1.1
Requires-Dist: click-plugins<2,>=1.1.1
Requires-Dist: click<9,>=7
Requires-Dist: configobj-dev>=2019.9.1
Requires-Dist: cryptography>=44.0.1
Requires-Dist: jsonschema<5,>=3.2.0
Requires-Dist: keyring<26,>=16.1.0
Requires-Dist: keyrings.alt<6,>=3.1
Requires-Dist: pyhumps
Requires-Dist: semver<4,>=3
Requires-Dist: termcolor<3,>=2
Requires-Dist: Jinja2>=2.10
Requires-Dist: vgs-api-client<1,>=0.0.51
Requires-Dist: async-timeout
Requires-Dist: pip>=25.3
Requires-Dist: packaging<26,>=23
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: platform
Dynamic: requires-dist
Dynamic: summary

# VGS CLI

Command Line Tool for programmatic configurations on VGS.

[Official Documentation](https://docs.verygoodsecurity.com/vault/developer-tools/vgs-cli)

## Table of Contents

- [Requirements](#requirements)
- [Installation](#installation)
  - [PyPI](#pypi)
- [Run](#run)
- [Running in Docker](#running-in-docker)
- [Commands](#commands)
- [Code Standards](#code-standards)
- [Automation with VGS CLI](#automation-with-vgs-cli)
- [Sphinx Documentation](#sphinx-documentation)
- [Plugins Development](#plugins-development)

## Requirements
[Python 3](https://www.python.org/downloads/) or [Docker](https://docs.docker.com/get-docker/).

## Installation

### PyPI
Install the latest version from [PyPI](https://pypi.org/project/vgs-cli/):
```
pip install vgs-cli
```

## Run

Verify your installation by running:
```
vgs --version
```

## Running in Docker

Check our [official documentation](https://docs.verygoodsecurity.com/vault/developer-tools/vgs-cli/docker).

## Commands

Full command reference:
- https://docs.verygoodsecurity.com/vault/developer-tools/vgs-cli/commands
- Routes YAML format (`routes.yaml`): https://docs.verygoodsecurity.com/vault/developer-tools/vgs-cli/commands#routes.yaml

Common commands:
- `vgs --help` (list all available commands)
- `vgs login` / `vgs logout`
- `vgs get vaults`
- `vgs get routes -V <VAULT_ID>` / `vgs apply routes -V <VAULT_ID> -f <FILE>` / `vgs delete routes -V <VAULT_ID> <ROUTE_ID>`
- `vgs logs access -V <VAULT_ID>` / `vgs logs operations -V <VAULT_ID> -R <REQUEST_ID>`
- `vgs get access-credentials -V <VAULT_ID>` / `vgs generate access-credentials -V <VAULT_ID>`
- `vgs get organizations`
- `vgs certificate --help`

## Code Standards

We follow the defaults enforced by [Black](https://black.readthedocs.io/en/stable/) and [isort](https://pycqa.github.io/isort/) (with the Black profile). A formatting workflow runs in CI and installs `black`, `isort`, and `ruff`. Before opening a pull request, install the tools with `pip install black isort ruff` and run:

```
black .
isort --profile black .
ruff check .
```

## Automation with VGS CLI

If you want to use the VGS CLI for automation you might be interested in creating a [service account](https://docs.verygoodsecurity.com/vault/developer-tools/vgs-cli/service-account).

## Plugins Development

See [Click - Developing Plugins](https://github.com/click-contrib/click-plugins#developing-plugins).

In order to develop a plugin you need to register your commands to an entrypoint in `setup.py`.

Supported entrypoints:

- `vgs.plugins` - for extending `vgs` with sub-commands
- `vgs.get.plugins` - for extending `vgs get` with sub-commands
- `vgs.apply.plugins` - for extending `vgs apply` with sub-commands
- `vgs.logs.plugins` - for extending `vgs logs` with sub-commands

Example:
```python
entry_points='''
    [vgs.plugins]
    activate=vgscliplugin.myplugin:new_command

    [vgs.get.plugins]
    preferences=vgscliplugin.myplugin:new_get_command
'''
```

### Plugin catalog
- [vgs-cli-admin-plugin](https://github.com/verygoodsecurity/vgs-cli-admin-plugin)
