Skip to main content

YGG Command Line Interface

Project description

YGG CLI

Command line interface for the YGG platform.

Installation

pip install ygg-cli

Configuration

The CLI requires the YGG_API_KEY environment variable to be set. The API key must have *:*:admin:* permissions.

export YGG_API_KEY="ygg_api_..."

Optionally, set the base URL:

export YGG_BASE_URL="https://api.ygg.com"  # Default: http://localhost:9000

Features

List Projects and Environments

List all projects and their environments:

ygg ls

Output:

✓ proj_123 (My Project)
  └─ dev (5 vars)
  └─ prod (8 vars)
✓ proj_456 (Another Project)
  └─ staging (3 vars)

Environment Management

Export environment as .env format:

ygg env <project_id> <env>

Example:

ygg env proj_123 dev
# Outputs:
# DATABASE_URL=postgres://...
# API_KEY=secret123
# REDIS_URL=redis://...

Import environment from stdin:

cat .env | ygg env <project_id> <env>

Example:

cat .env | ygg env proj_123 prod

You can also pipe environment variables directly:

echo "DATABASE_URL=postgres://localhost" | ygg env proj_123 dev

Database Schema Export

Export database schema in B3 format:

ygg db <project_id> <env>

Example:

ygg db proj_123 dev
# Outputs B3 schema format

Project Management

Create a new project:

ygg mkproj <project_id>

Example:

ygg mkproj my-new-project

Rename a project:

ygg mv <old_project_id> <new_project_id>

Example:

ygg mv old-project new-project

Delete a project:

ygg rm <project_id>

Example:

ygg rm proj_123

Environment Management

Create a new environment:

ygg mkenv <project_id> <env>

Example:

ygg mkenv proj_123 staging

Rename an environment:

ygg mv <project_id> <old_env> <new_env>

Example:

ygg mv proj_123 dev development

Delete an environment:

ygg rm <project_id> <env>

Example:

ygg rm proj_123 staging

Requirements

  • Python 3.7+
  • requests library (installed automatically with ygg-cli)

Notes

  • All computations are done in the YGG server. The Python CLI is a thin client that makes HTTP requests.
  • The API key must have *:*:admin:* permissions to work.
  • The key only works for a specific account.

Learn More

Visit ygg.kluglabs.net for more information about the YGG platform.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ygg_cli-0.1.2.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ygg_cli-0.1.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file ygg_cli-0.1.2.tar.gz.

File metadata

  • Download URL: ygg_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for ygg_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2b502b7f76b4c41e58b216b5e9c7918f74c287663bb9f516dbe8214fbae49af4
MD5 f226604a10c5ff8dbc9702fddf176d3d
BLAKE2b-256 03b44487f36232e6362a1c3b031dee3fdea5ca6867672eea35ebb12242d10597

See more details on using hashes here.

File details

Details for the file ygg_cli-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: ygg_cli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for ygg_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0b3a32476a43ada8b90695b9e30b359c05e0a7b38d830e0702befb49bfdca96d
MD5 7957d91ea359e57f9e80d4b3fd5e186d
BLAKE2b-256 d1fc4dfefa1beb18a1963207f7d52e4bf0b78edb0cfa0e9f2bba1f12ab918a65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page