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)
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.0.1-py3-none-any.whl
(6.1 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4476164770b18c3a8afe33307662131b48585002184cd8a4db5351f4ac93b967
|
|
| MD5 |
425e4565bbcf2b69c17a8b1c838a4697
|
|
| BLAKE2b-256 |
638cbc8614e477d98010b50f5fe64192c3d52915e9ddee65a3fa4bb869b1501b
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24407994b74b2861fe792af835dd430681a6ff85da90afbda4bb0e009920ff54
|
|
| MD5 |
e5c5c7fe3b58d7ac9713df07e775bf8b
|
|
| BLAKE2b-256 |
46cb871a2b42768cf80e72023b52fcccf480a5da48d2b946d0c7b87d0ffaa707
|