← All procedures
env.get
One environment variable. A secret is masked unless the host reveals it
CLI- Package
- @procedures/env · README
- Path
["env","get"]- CLI
mark env get --name <string>- As data
{"$proc":["env","get"],"input":{}}- Tags
- env, secrets
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/env/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["env","get"], { name: "<name>" });
console.log(JSON.stringify(result));From the command line
$ mark env get --name <string>
As data, in a program
{ "$proc": ["env", "get"], "input": { "name": "<name>" } }Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 1024,
"pattern": "^[^=\\0]+$",
"description": "The name of an environment variable"
}
},
"required": [
"name"
]
},
"output": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the variable"
},
"set": {
"type": "boolean",
"description": "True when the variable has a value. An empty value counts as set"
},
"secret": {
"type": "boolean",
"description": "True when the name matches a pattern of secret names"
},
"masked": {
"type": "boolean",
"description": "True for a secret that the host does not reveal: the output has no value"
},
"value": {
"description": "The value. Absent for a variable that is not set and for a masked secret",
"type": "string"
}
},
"required": [
"name",
"set",
"secret",
"masked"
],
"additionalProperties": false
}
}