@chimp-stack/core
v0.4.7
Published
> Shared configuration and environment loader for the growing chimp toolchain.
Readme
🧠 @chimp-stack/core
Shared configuration and environment loader for the growing chimp toolchain.
This package contains the core logic for reading .chimprc config files, loading environment variables, and handling shared behavior between tools like git-chimp, doc-chimp, and review-chimp.
📦 Installation
Install via npm:
npm install @chimp-stack/coreOr in a monorepo:
npm install --workspace=@chimp-stack/core🛠 Usage
In your tool package (e.g., git-chimp, review-chimp), import and use the helpers:
import { loadChimpConfig, getEnv } from '@chimp-stack/core';
const config = loadChimpConfig('gitChimp');
const env = getEnv();📁 Config File: .chimprc
This package looks for a .chimprc file in the current project or in your home directory (~/.chimprc).
{
"gitChimp": {
"model": "gpt-4",
"tone": "dry sarcasm",
"prMode": "draft"
},
"reviewChimp": {
"severity": "high"
}
}The structure is namespaced per tool. You can override values via CLI flags if needed.
🏗 Exported Functions
| Function | Description |
| -------------------------- | ----------------------------------------------------------------------------- |
| loadChimpConfig(scope) | Loads config for the given tool (gitChimp, docChimp, etc) from .chimprc |
| getEnv() | Validates and returns required environment variables (e.g., OPENAI_API_KEY) |
| resolveChimpConfigPath() | Returns the resolved file path of the active .chimprc |
🧪 Development
Build
npm run buildThis uses tsup to emit both ESM and CJS output to dist/.
Lint
npm run lint🚀 Publishing
This package can be independently published from the monorepo (if applicable) using npm publish or through CI pipelines like semantic-release.
If used inside a Turborepo or other monorepo setup, make sure its package.json has a name field and correct main/exports paths for npm publishing.
🐒 Part of the Chimp Stack™
git-chimp– commit & PR generator
sourcedoc-chimp– auto-documentation from commits and code sourcereview-chimp– coming soon: let the monkey do your code reviewscore– this package
source
“Because even the best engineers deserve a monkey on their shoulder.”
