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-style templated   │
│          variables in `file`.                                                                           │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Test command

Usage: nocto test [OPTIONS] FILE

 Tests if local environment has all the variables required to replace Octopus-style 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]         │
│ --stdout         --no-stdout          Write output to stdout instead of temporary file                  │
│                                       [default: no-stdout]                                              │
│ --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.1.0.tar.gz (6.7 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.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nocto-0.1.0.tar.gz
  • Upload date:
  • Size: 6.7 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.1.0.tar.gz
Algorithm Hash digest
SHA256 48a7a6694dcea6193e014a8fa81e322fe0da486b096d7df3b139b4a6f5391862
MD5 ce0153332ab31b2ff89e042773e0f478
BLAKE2b-256 08fa1dad7206814ded48c5fc019b0faa1cb9651aaba3faa839f23b62b713cc19

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nocto-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd75de52fe844d0fdb7d296b173201e2b465eda20a2fa3696e0a4bfc54aa05ef
MD5 61b6c2cb88d5b8de8c7434c016845440
BLAKE2b-256 3f43327ee6264cab04856a2f10935918cc96b8c10ea6180f35aca70789189287

See more details on using hashes here.

Release history Release notifications | RSS feed

1.1.0

2 files

1.0.0

2 files

This release

0.1.0 This release

2 files

0.0.2

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