Thank you for your interest in contributing!
# Clone the repo
git clone https://github.com/hasna/knowledge.git
cd knowledge
# Install dependencies (Bun)
bun install
# Run tests
bun test
# Run a specific test file
bun test tests/cli.test.tsknowledge/
├── src/
│ ├── cli.js # CLI entry point, argument parsing, commands
│ └── store.js # Persistent store, file locking, ID generation
├── tests/
│ └── cli.test.ts # Integration tests using Bun.test
├── package.json
└── LICENSE
Agent-friendly first: every output should be parseable by an LLM. Prefer --json for structured data. Keep error messages actionable.
Minimal dependencies: keep the dependency footprint small. The store is a plain JSON file.
Safe by default: destructive operations require explicit confirmation flags (--yes).
Concurrent-safe: all store mutations go through withLock(). Do not bypass it.
Use Conventional Commits:
feat(cli): add --tag filter on list command
fix(store): handle empty store file gracefully
docs(readme): add installation instructions
Types: feat, fix, docs, chore, refactor, test
- Fork the repo and create a branch from
main. - Add tests for new functionality.
- Ensure all tests pass:
bun test. - Keep commits atomic and well-described.
- Open a PR with a clear description of the change and motivation.
- 2-space indentation
forloops over array methods where performance matters- Descriptive variable names
- No unnecessary dependencies
- Use the bug report template
- Search existing issues first
- Include: Node/Bun version, OS, steps to reproduce, expected vs actual
Open a feature request issue describing:
- The problem you're solving
- How you envision the solution
- Whether you're willing to implement it