Documentation
Quick Start
Create an owner, add a snippet, and search it back
Quick Start
Create a local snippet library in under a minute.
1. Install the CLI
bash
npm install --global https://github.com/tanRdev/codecache/releases/latest/download/codecache-cli.tgzWorking from a source checkout instead?
bash
npm install
npm run cache -- init2. Initialize Cache
bash
cache initCache creates a local profile, a unique local owner, and a SQLite database in
your operating system's application-data directory. No environment file,
account, or running server is required.
Use a specific database location when it belongs in an existing backup:
bash
cache init --database /absolute/path/to/cache.sqlite3. Save something useful
bash
cache add ./README.md --title "Project notes" --tag docsYou can also pipe content:
bash
git diff | cache add - --title "Refactor notes" --tag work-in-progress4. Find it again
bash
cache search docs
cache profile list
cache storage validate5. Attach context
bash
cache attachment add <snippet-id> ./notes.md
cache attachment list <snippet-id>Optional: run the browser app
The web app is available from a source checkout:
bash
cp .env.example .env.local
npm run devThe browser app has a single-owner setup flow and is also suitable for self-hosting. See Installation for the required secrets and storage paths.
Optional: connect a remote CLI
bash
cache auth login --name server --base-url http://localhost:3000Remote mode sends the same CLI commands to a Cache server you control.