Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@quantpartners/pca) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
PCA CLI
PCA = Persistent Context Architecture.
Markdown files are the source of truth. RAG is the mandatory access layer. Agents must not read the full pca/ folder by default.
Install
npm installCreate a local .env file with:
OPENAI_API_KEY=sk-...Development
npm run dev -- helpsrc/ is the development source. dist/ is generated by npm run build and is included in the npm package through the files allowlist, but it does not need to be edited by hand during development.
Local global install
npm install
npm run build
npm link
pca helpWindows note:
- PowerShell may block the npm
pca.ps1shim depending on ExecutionPolicy. Usepca.cmd help. - CMD can use
pca help.
To unlink:
npm unlink -g @quantpartners/pcaAlternative:
npm install -g .
pca helpNPX Usage
After publishing to npm:
npx -y @quantpartners/pca@latest help
npx -y @quantpartners/pca@latest doctor
npx -y @quantpartners/pca@latest initRecommended API key setup:
export OPENAI_API_KEY="sk-..."
npx -y @quantpartners/pca@latest initPowerShell:
$env:OPENAI_API_KEY="sk-..."
npx -y @quantpartners/pca@latest initAlternative, less recommended:
npx -y @quantpartners/pca@latest init --api-key "sk-..."Warning: passing API keys via CLI flags can expose them in shell history.
OPENAI_API_KEY
PCA reads OPENAI_API_KEY in this order:
- Explicit
--api-keyflag. - Existing environment variable.
.envin the current project where you runpca..envin this CLI project during local development.
Bash:
export OPENAI_API_KEY="sk-..."PowerShell:
$env:OPENAI_API_KEY="sk-..."CMD:
set OPENAI_API_KEY=sk-...Project .env:
OPENAI_API_KEY=sk-...CLI flag:
pca init --api-key "sk-..."
pca --api-key "sk-..." initPassing API keys via CLI flags can expose them in shell history. Prefer using OPENAI_API_KEY or a local .env file.
Full MVP Flow
npm run dev -- init
npm run dev -- sync
npm run dev -- query "project architecture"
npm run dev -- task "crear hero mobile"
npm run dev -- visual add ./example.png --type reference --note "landing reference"
npm run dev -- closeRecommended working loop:
pca init
pca sync
pca task "crear hero mobile"
# paste .pca/last-task-context.md into Codex
pca close
pca syncCritical Rules
- PCA sin RAG no opera.
- No fallback to reading the full
pca/folder. - Only
PCA_INDEX.mdis read at task start. - Vector Store is required.
- Roadmap/changelog update only after closure confirmation.
MVP Limitations
- No web UI.
- No own database.
- No login, billing, dashboard, or multiuser support.
- No deep Git integration.
- No advanced vector store deduplication or replacement yet.
- Visual memory stores local images plus textual metadata in
pca/visual/visual-index.md; real multimodal analysis comes in v2.
Technical TODOs
- v2: add
pca install codex,pca install cursor, andpca install claudeto install agent-specific PCA rules. Do not useinstallfor global CLI installation. - Add vector store deduplication/replacement in v2 after stable local path to OpenAI file mapping is introduced.
- Add multimodal visual analysis in v2.
Publish to npm
npm login
npm run build
npm pack --dry-run
npm publish --access publicThen test:
npx -y @quantpartners/pca@latest help