Thank you very much @bdw429s!
You are always so precious and exhaustive in the explanations! 
Thats great! Work good! 
I find my vars env in “Global Shell” context.
I try with too:
var rows = DESerializeJSON( print.unansi( result ) );
and works fine too 
But i want to tell you something more about my code.
I’m trying to port my old deployment system from Ant/Ivy to CommandBox, so some mechanisms must be similar.
For example, I have three files to consider for my environment variables, and these have a hierarchy.
Like this:
It starts with this:
/build/all-envs.properties
All variables written in the previous file can be overwritten by one of these files:
/build/envs/devel.properties
… lastly, this file can overwrite all previous variables:
/build/local-env.properties
If, for example, the variable “db.host” is both in all-envs.properties and in local.properties, I have to take the value present in local.properties.
I’m going ahead like this:
/build/Build.cfc
funcion deploy( env = "devel" ) {
// my global file
var mainConfig = "#dir#/build/all-envs.properties";
// the environment file
var envConfig = "#dir#/build/envs/#arguments.env#.properties";
// the user's file
var localConfig = "#dir#/build/local.properties";
// I create a structure from current environment file
var envItems = getStructFromEnvFile( envConfig );
// I create a structure from the global env file
var mainItems = getStructFromEnvFile( mainConfig );
// I create a structure from the user's env file, if exists
if (FileExists (localConfig)) {
var localItems = getStructFromEnvFile( localConfig );
}
// merge of environment variables.
// local.properies overrides every variable
StructAppend (mainItems, envItems, true);
StructAppend (mainItems, localItems, true);
// delete .env file in webroot...
if (FileExists ("#dir#/.env")) {
cffile (file = "#dir#/.env", action = "delete");
}
// ... than rewrite it with all env variables
for (var item in mainItems) {
cffile( file="#dir#/.env", action="append", output="#item# = #mainItems [item]#" );
}
// install dependencies
command('install').run();
// start the server
command('server start').run();
}
i invoke this procedure from command line:
CommandBox:test-box> run-script deploy:devel
I add this line to my box.json
"deploy:devel": "task run taskFile=build/Build.cfc target=deploy :env=devel",
Ah, that’s simple enough.
In development, every time I launch my “run-script deploy:devel” I would like to reset the environment variables, because they are never reset even when I restart the server.
Do you have any advice for me?
Anything you tell me will be very precious.
Many thanks! 