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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
nocto-0.1.0-py3-none-any.whl
(6.3 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48a7a6694dcea6193e014a8fa81e322fe0da486b096d7df3b139b4a6f5391862
|
|
| MD5 |
ce0153332ab31b2ff89e042773e0f478
|
|
| BLAKE2b-256 |
08fa1dad7206814ded48c5fc019b0faa1cb9651aaba3faa839f23b62b713cc19
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd75de52fe844d0fdb7d296b173201e2b465eda20a2fa3696e0a4bfc54aa05ef
|
|
| MD5 |
61b6c2cb88d5b8de8c7434c016845440
|
|
| BLAKE2b-256 |
3f43327ee6264cab04856a2f10935918cc96b8c10ea6180f35aca70789189287
|