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.1.tar.gz (6.5 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.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nocto-0.0.1.tar.gz
  • Upload date:
  • Size: 6.5 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.1.tar.gz
Algorithm Hash digest
SHA256 4476164770b18c3a8afe33307662131b48585002184cd8a4db5351f4ac93b967
MD5 425e4565bbcf2b69c17a8b1c838a4697
BLAKE2b-256 638cbc8614e477d98010b50f5fe64192c3d52915e9ddee65a3fa4bb869b1501b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nocto-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24407994b74b2861fe792af835dd430681a6ff85da90afbda4bb0e009920ff54
MD5 e5c5c7fe3b58d7ac9713df07e775bf8b
BLAKE2b-256 46cb871a2b42768cf80e72023b52fcccf480a5da48d2b946d0c7b87d0ffaa707

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

0.0.2

2 files

This release

0.0.1 This release

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