Skip to main content

nocto

Simple CLI tool to replace Octopus-style templated variables in file from local environment.

Simple example:

kubectl apply -f $(nocto replace deployment.yaml)

Installation

pipx install nocto

# OR

pip install --user nocto

Usage

 Usage: nocto [OPTIONS] COMMAND [ARGS]...

╭─ Options ───────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion          Install completion for the current shell.                     │
│ --show-completion             Show completion for the current shell, to copy it or          │
│                               customize the installation.                                   │
│ --help                        Show this message and exit.                                   │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────╮
│ replace  Replaces all Octopus-style template variables in `file` and writes it to temporary │
│          file. Returns path to temporary file.                                              │
│ test     Tests if local environment has all the variables required to replace Octopus-stype │
│          templated variables in `file`.                                                     │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯

Test command

 Usage: nocto test [OPTIONS] FILE

 Tests if local environment has all the variables required to replace Octopus-stype templated
 variables in `file`.

╭─ Arguments ─────────────────────────────────────────────────────────────────────────────────╮
│ *    file      FILE  File in which to replace variables [default: None] [required]          │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────────╮
│ --dotenv         --no-dotenv          Use dotenv to load .env file [default: no-dotenv]     │
│ --dotenv-file                   FILE  Optional .env file to use [default: None]             │
│ --var                           TEXT  Directly set variable value. E.g. FOO=BAR             │
│                                       [default: None]                                       │
│ --help                                Show this message and exit.                           │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯

Replace command

 Usage: nocto replace [OPTIONS] FILE

 Replaces all Octopus-style template variables in `file` and writes it to temporary file.
 Returns path to temporary file.

╭─ Arguments ─────────────────────────────────────────────────────────────────────────────────╮
│ *    file      FILE  File in which to replace variables [default: None] [required]          │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────────╮
│ --dotenv         --no-dotenv          Use dotenv to load .env file [default: no-dotenv]     │
│ --dotenv-file                   FILE  Optional .env file to use [default: None]             │
│ --var                           TEXT  Directly set variable value. E.g. FOO=BAR             │
│                                       [default: None]                                       │
│ --help                                Show this message and exit.                           │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯

Download files

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

Source Distribution

nocto-0.0.2.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

nocto-0.0.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file nocto-0.0.2.tar.gz.

File metadata

  • Download URL: nocto-0.0.2.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Darwin/22.6.0

File hashes

Hashes for nocto-0.0.2.tar.gz
Algorithm Hash digest
SHA256 35c7113a51b342aae24dbd03854daaa6393d8ee41d2aeb0a0ce6cb97a4a31efc
MD5 e6f9e7e70f638fe4e356a1b4730cb7c9
BLAKE2b-256 7b5d0873c17964d161a983976e5db43dd54a528c9aa4dd07dd722e88811905ca

See more details on using hashes here.

File details

Details for the file nocto-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: nocto-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Darwin/22.6.0

File hashes

Hashes for nocto-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5fc38b125094436cf33f3dd429435b26ff2f9304a532ab9f56f5322999fe1967
MD5 c25d745afcdf58bc406576b2a716329b
BLAKE2b-256 87c921b7bf0a00ffe98b63a16e565817c07b0d3e8cc980eff3295f49968df0bc

See more details on using hashes here.

Release history Release notifications | RSS feed

1.1.0

2 files

1.0.0

2 files

0.1.0

2 files

This release

0.0.2 This release

2 files

0.0.1

2 files

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