@vreko/workspace-identity
v0.0.1
Published
<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/vreko-dev/vreko-cli/main/assets/lockup-white.png" width="400"> <img alt="Vreko" src="https://raw.githubusercontent.com/vreko-dev/
Downloads
72
Readme
Generates a stable, deterministic workspace identifier from the absolute path of a project root using SHA-256(workspaceRoot).slice(0, 12). The same directory always produces the same ID — no state files, no random seeds.
Install
npm install @vreko/workspace-identityUsage
import { getWorkspaceId } from '@vreko/workspace-identity';
const id = getWorkspaceId('/Users/alice/projects/my-app');
// → "a3f8c21b90d4" (12-char hex, stable across machines for the same path)The ID scopes learnings, sessions, and intelligence to a specific project directory. Two checkouts of the same repo at different paths produce different IDs by design.
License
Apache-2.0
