feat(kugetsu): create env directory and files during init
Update cmd_init to create: - ~/.kugetsu/env/ directory - ~/.kugetsu/env/default.env (template) - ~/.kugetsu/env/pm-agent.env (template) Users can then edit these files to add their tokens/secrets.
This commit is contained in:
@@ -947,6 +947,25 @@ EOF
|
|||||||
echo "Created config file: $KUGETSU_DIR/config"
|
echo "Created config file: $KUGETSU_DIR/config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$ENV_DIR"
|
||||||
|
if [ ! -f "$ENV_DIR/default.env" ]; then
|
||||||
|
cat > "$ENV_DIR/default.env" << 'EOF'
|
||||||
|
# Default environment variables for all agents
|
||||||
|
# Add variables that all agents should have access to
|
||||||
|
# Example:
|
||||||
|
# GITEA_TOKEN=your_token_here
|
||||||
|
EOF
|
||||||
|
echo "Created default env file: $ENV_DIR/default.env"
|
||||||
|
fi
|
||||||
|
if [ ! -f "$ENV_DIR/pm-agent.env" ]; then
|
||||||
|
cat > "$ENV_DIR/pm-agent.env" << 'EOF'
|
||||||
|
# PM Agent environment variables
|
||||||
|
# These override default.env for the PM agent
|
||||||
|
# GITEA_TOKEN=your_gitea_token_here
|
||||||
|
EOF
|
||||||
|
echo "Created pm-agent env file: $ENV_DIR/pm-agent.env"
|
||||||
|
fi
|
||||||
|
|
||||||
local existing_base=$(get_base_session_id)
|
local existing_base=$(get_base_session_id)
|
||||||
local existing_pm=$(get_pm_agent_session_id)
|
local existing_pm=$(get_pm_agent_session_id)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user