Initialize Asha in current project - creates Memory/, .asha/, and databases
Sets up Asha framework in current project with memory and configuration files.
/plugin marketplace add pknull/asha-marketplace/plugin install asha@asha-marketplaceOptional: --minimal (skip Vector DB) or --full (accept all defaults)Sets up Asha framework for the current project.
Arguments: $ARGUMENTS
${CLAUDE_PROJECT_DIR}/
├── Memory/
│ ├── sessions/archive/
│ ├── reasoning_bank/
│ ├── vector_db/
│ ├── activeContext.md
│ ├── projectbrief.md
│ ├── communicationStyle.md
│ ├── workflowProtocols.md
│ └── techEnvironment.md
├── Work/markers/
├── .asha/
│ ├── .venv/
│ └── config.json
└── CLAUDE.md
if [[ -f "${CLAUDE_PROJECT_DIR}/.asha/config.json" ]]; then
echo "Asha already initialized in this project"
echo "To reinitialize, delete .asha/ and run again"
exit 0
fi
If already initialized, inform user and stop.
mkdir -p "${CLAUDE_PROJECT_DIR}/Memory/sessions/archive"
mkdir -p "${CLAUDE_PROJECT_DIR}/Memory/reasoning_bank"
mkdir -p "${CLAUDE_PROJECT_DIR}/Memory/vector_db"
mkdir -p "${CLAUDE_PROJECT_DIR}/Work/markers"
mkdir -p "${CLAUDE_PROJECT_DIR}/.asha"
For each template in ${CLAUDE_PLUGIN_ROOT}/templates/:
Memory/<filename> doesn't exist, copy itTemplates to copy:
activeContext.mdprojectbrief.mdcommunicationStyle.mdworkflowProtocols.mdtechEnvironment.mdfor template in activeContext.md projectbrief.md communicationStyle.md workflowProtocols.md techEnvironment.md; do
if [[ ! -f "${CLAUDE_PROJECT_DIR}/Memory/$template" ]]; then
cp "${CLAUDE_PLUGIN_ROOT}/templates/$template" "${CLAUDE_PROJECT_DIR}/Memory/$template"
echo "Created Memory/$template"
else
echo "Skipped Memory/$template (exists)"
fi
done
if [[ ! -f "${CLAUDE_PROJECT_DIR}/CLAUDE.md" ]]; then
cp "${CLAUDE_PLUGIN_ROOT}/templates/CLAUDE.md" "${CLAUDE_PROJECT_DIR}/CLAUDE.md"
echo "Created CLAUDE.md"
else
echo "Skipped CLAUDE.md (exists)"
fi
Unless --minimal is specified:
python3 -m venv "${CLAUDE_PROJECT_DIR}/.asha/.venv"
"${CLAUDE_PROJECT_DIR}/.asha/.venv/bin/pip" install -r "${CLAUDE_PLUGIN_ROOT}/tools/requirements.txt"
If venv creation fails, warn but continue (Vector DB will be unavailable).
# ReasoningBank
"${CLAUDE_PLUGIN_ROOT}/tools/run-python.sh" "${CLAUDE_PLUGIN_ROOT}/tools/reasoning_bank.py" stats
# Vector DB check
"${CLAUDE_PLUGIN_ROOT}/tools/run-python.sh" "${CLAUDE_PLUGIN_ROOT}/tools/memory_index.py" check
Write .asha/config.json to mark project as initialized:
cat > "${CLAUDE_PROJECT_DIR}/.asha/config.json" << 'EOF'
{
"version": "1.0.0",
"initialized": "$(date -Iseconds)",
"plugin": "asha@asha-marketplace"
}
EOF
Display:
.asha/
Memory/sessions/
Memory/vector_db/
Memory/reasoning_bank/