eserstack Tool — eser/stack on GitHubInstall:
pnpm add jsr:@eserstack/codebase
@eserstack/codebase provides validation tools and project management utilities
for maintaining code quality. It includes 24 validation tools, git hook
management, release tooling, and a workflow integration layer.
cli-system/ owns the operational commands every shipped binary carries —
install, uninstall, update, completions, version, doctor, info —
built once and parameterised by a CliApp so eser, noskills and laroux
each get a tree describing themselves.
import{attachStandardCommands}from"@eserstack/codebase/cli-support";constapp=attachStandardCommands(module.toCommand("noskills",version));It attaches to a binary's ROOT command, never to a Module. That is deliberate:
eser mounts the very same module object the standalone noskills binary
re-roots, so a layer living on the module would appear in both — and
eser noskills version would exist, implying a submodule has a version of its
own.
# Install hooks from .eser/manifest.yml into .git/hooks/
npx eser codebase install
# Show installed hook status
npx eser codebase status
# Remove managed hooks
npx eser codebase uninstall# Check JSON syntax
npx eser codebase validate-json
# Fix missing trailing newlines
npx eser codebase validate-eof --fix
# Validate commit message format
npx eser codebase validate-commit-msg --message "feat(core): add feature"# Preview: prints old -> new version and whether a changelog entry is due
npx eser codebase release patch --dry-run
# Bump VERSION + every package.json, write the CHANGELOG section, commit# "chore(codebase): release v<version>", push, then push the v<version> tag
npx eser codebase release patchThe tag push is the trigger — CI reacts to v*.*.*, never to the commit, and
never creates tags itself (a tag pushed by a workflow's own GITHUB_TOKEN
dispatches nothing). rerelease re-fires the run by recreating the tag at HEAD;
unrelease removes the tag and the GitHub Release. Neither is safe once JSR or
npm has accepted the version — cut a new patch instead.
| Command | Description |
|---|---|
install | Install git hooks from .eser/manifest.yml |
uninstall | Remove managed git hooks |
status | Show git hook installation status |
| Command | Description |
|---|---|
release | Bump, changelog, commit, push, then push the trigger tag |
rerelease | Delete and recreate the current version tag at HEAD |
unrelease | Delete the current version tag and its GitHub Release |
versions | Bump version across all workspace packages |
changelog-gen | Generate CHANGELOG entry from commits |
| Command | Description |
|---|---|
gh contributors | Update contributor list in README.md |
gh release-notes | Sync CHANGELOG to GitHub Releases |
gh release-tag | Create and push the release tag (the release trigger) |
| Command | Description |
|---|---|
validate-eof | Ensure files end with newline |
validate-trailing-whitespace | Remove trailing whitespace |
validate-bom | Remove UTF-8 byte order markers |
validate-line-endings | Normalize line endings to LF |
validate-large-files | Detect files exceeding size limit |
validate-case-conflict | Detect case-conflicting filenames |
validate-merge-conflict | Detect merge conflict markers |
validate-json | Validate JSON syntax |
validate-toml | Validate TOML syntax |
validate-yaml | Validate YAML syntax |
validate-symlinks | Detect broken symlinks |
validate-shebangs | Validate shebang consistency |
validate-secrets | Detect credentials and private keys |
validate-filenames | Enforce filename conventions |
validate-submodules | Detect git submodules |
validate-commit-msg | Validate conventional commit format |
validate-docs | Validate JSDoc documentation |
validate-circular-deps | Detect circular dependencies |
validate-export-names | Validate export naming conventions |
validate-licenses | Validate license headers |
validate-mod-exports | Validate mod.ts export coverage |
validate-package-configs | Validate deno.json/package.json consistency |
Run any tool with --help for options:
npx eser codebase validate-filenames --helpTools are configured through .eser/manifest.yml at the project root. Each tool
receives its options from the workflow step configuration:
stack:
- javascript
- golangworkflows:
- id: defaulton: [precommit, prepush]steps:
# Validation tools with options
- validate-json:
exclude:
- "tsconfig.json"
- validate-filenames:
rules:
- directory: "apps/services/"convention: "snake_case"
- directory: "*"convention: "kebab-case"exclude:
- "Makefile"
- "README.md"
- validate-secrets:
allowMissingCredentials: true
- validate-commit-msg:
forceScope: trueallowAsterisk: trueallowMultipleScopes: truetypes: [ci, chore, docs, feat, fix, perf, refactor, revert, test]# Shell commands for external tools
- shell:
name: deno-formattercommand: deno fmt --checkfixCommand: deno fmt
- shell:
name: go-testscommand: "go test -race ./..."workingDirectory: ./apps/services/timeout: 300import*ascodebasefrom"@eserstack/codebase";// Git operationsconstcommits=awaitcodebase.getCommitsBetween("v1.0.0","HEAD");constbranch=awaitcodebase.getCurrentBranch();// Workspace discoveryconstpackages=awaitcodebase.discoverPackages(".");import*asvalidationfrom"@eserstack/codebase/validation";// Get all registered tools as workflow-compatible objectsconsttools=validation.getWorkflowTools();// Run a specific validator programmaticallyconstvalidator=validation.getValidator("validate-json");constresult=awaitvalidator.validate({root: "."});🔗 For further details, visit the eserstack repository.