Registry / web-framework / rattail

rattail

JSON →
library0.21.2jsnpmunverified

Rattail is a Vite+ oriented and AI Agent friendly front-end toolchain, currently at version 2.0.6. It provides presets for linting, formatting, pre-commit hooks, and git hooks, a CLI toolchain for publishing, logs, commit lint, and API generation, 140+ utility functions covering common, string, number, array, object, and math scenarios, an axios-based progressive request tool with Vue composition API support (Axle), a chainable validation rule factory (Ruler Factory), and type-safe enum utilities. It ships with TypeScript types, is tree-shakable, and has 90%+ test coverage. Rivals like Vite plugins and utility libraries often focus on one area, while Rattail bundles all these into a single Vite+ ecosystem package. Release cadence appears active with multiple minor versions.

npm install rattail
INSTALL
IMPORT
SIG · RATTAIL
R
rattail
web-frameworkjavascriptv0.21.2
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rattail
✓ import rattail from 'rattail'
✗ const rattail = require('rattail')
Rattail is ESM-only; require() will fail.
defineRattailConfig
✓ import { defineRattailConfig } from 'rattail'
✗ import defineRattailConfig from 'rattail'
This is a named export, not default.
Axle (request tool)
✓ import { createAxle } from 'rattail/axle'
✗ import { Axle } from 'rattail'
Axle is a separate subpath export; import from 'rattail/axle' to avoid pulling unused code. Since v2.
RulerFactory
✓ import { RulerFactory } from 'rattail/ruler'
✗ import { RulerFactory } from 'rattail'
Ruler factory is exported from rattail/ruler subpath. Direct import from rattail may not include it.
enum utilities (createEnum)
✓ import { createEnum } from 'rattail/enum'
✗ import { createEnum } from 'rattail'
Enum utilities are subpath exports; import from 'rattail/enum'.
utility functions (isString, etc.)
✓ import { isString } from 'rattail/utils'
✗ import { isString } from 'rattail'
Utility functions are exported from 'rattail/utils' subpath to enable tree-shaking.

Shows how to install, configure with defineRattailConfig, and use utility functions, Axle, RulerFactory, and createEnum.

// Install: pnpm add rattail @voidzero-dev/vite-plus-core vite-plus // vite.config.ts import { defineRattailConfig } from 'rattail'; export default defineRattailConfig({ // base Vite+ config }); // Use a utility function import { isString } from 'rattail/utils'; console.log(isString('hello')); // true // Use Axle request tool import { createAxle } from 'rattail/axle'; const axle = createAxle({ baseURL: 'https://api.example.com' }); async function fetchData() { const res = await axle.get('/data'); return res.data; } // Use Ruler Factory for validation import { RulerFactory } from 'rattail/ruler'; const rules = new RulerFactory() .required('Name is required') .minLength(2, 'Name too short') .build(); // Use createEnum import { createEnum } from 'rattail/enum'; const Status = createEnum({ Pending: 0, Active: 1, Inactive: 2, });
rattail --version
Debug
Known issues
breakingIn v2.0.0, the package was overhauled to be ESM-only and subpath exports were introduced. Previous v1.x CJS imports no longer work.
fix
Update imports to ESM syntax and use subpath exports (e.g., 'rattail/utils' instead of 'rattail'). If using CommonJS, consider migrating to ESM.
affects: ^2.0.0
breakingIn v2.0.0, 'Axle' was moved to 'rattail/axle' subpath. Direct import from 'rattail' will not work.
fix
Change import { createAxle } from 'rattail/axle'.
affects: ^2.0.0
breakingIn v2.0.0, many utility functions were moved to 'rattail/utils'. Direct imports from 'rattail' are deprecated and may be removed.
fix
Use 'import { isString } from 'rattail/utils'' instead of 'import { isString } from 'rattail''.
affects: ^2.0.0
gotchaThe package requires pnpm >= 10.0.0. Using npm or yarn may cause peer dependency issues.
fix
Install pnpm globally (npm install -g pnpm) and use pnpm for this project.
affects: >=2.0.0
gotchaPeer dependencies @voidzero-dev/vite-plus-core and vite-plus are required. If not installed, imports may fail at runtime.
fix
Ensure these are installed: pnpm add @voidzero-dev/vite-plus-core vite-plus
affects: *
Errors
Common errors & fixes
Cannot find module 'rattail' or 'ERR_REQUIRE_ESM'
Trying to require() an ESM-only module in a CommonJS context.
fix
Use 'import rattail from 'rattail' in an ESM context, or enable ESM in your package.json by adding 'type': 'module'.
Uncaught SyntaxError: The requested module 'rattail' does not provide an export named 'createAxle'
Importing from 'rattail' directly; createAxle is a subpath export from 'rattail/axle'
fix
Change import to 'import { createAxle } from 'rattail/axle'.
Module not found: Error: Can't resolve 'rattail/utils'
The subpath export 'rattail/utils' might not be present in older v1.x versions, or the package version is too old.
fix
Upgrade to rattail >=2.0.0: pnpm update rattail
Could not resolve dependency: peer @voidzero-dev/vite-plus-core@>=0.1.16 from rattail@2.0.6
Missing peer dependency during installation.
fix
Run 'pnpm add @voidzero-dev/vite-plus-core' or use pnpm with auto-install-peers=true.
Upgrade
Version history
0.21.2latest on npm
Audit
Dependencies
@voidzero-dev/vite-plus-corerequiredPeer dependency for Vite+ integration features
vite-plusrequiredPeer dependency for Vite+ integration features
Agent activity
7 hits · last 30 days
node
6
Resources
rattail — npm install rattail · libregistry