CLI tool for generating Cube Record type definitions from a CubeJS server
npm install @general-dexterity/cube-records-codegenCLI tool for generating TypeScript definitions from Cube.js server metadata.
This package generates TypeScript type definitions from your Cube.js schema, enabling:
- Full IntelliSense support in your IDE
- Type-safe queries with compile-time validation
- Automatic synchronization with your Cube.js schema
- Watch mode for development workflows
``bash`
npm install --save-dev @general-dexterity/cube-records-codegenor
pnpm add -D @general-dexterity/cube-records-codegenor
yarn add --dev @general-dexterity/cube-records-codegen
`bashGenerate types to stdout
npx @general-dexterity/cube-records-codegen --baseUrl http://localhost:4000/cubejs-api
Development & Contributing
$3
`bash
Clone the repository
git clone https://github.com/general-dexterity/cube-records.git
cd cube-records/packages/codegenInstall dependencies
pnpm installBuild the package
pnpm build
`$3
`bash
pnpm dev # Watch mode compilation
pnpm test # Run tests
pnpm typecheck # Type checking
pnpm dev:cli # Test CLI locally (requires build first)
`$3
1. Fork the repository
2. Create your feature branch (
git checkout -b feature/amazing-feature)
3. Commit your changes using conventional commits (git commit -m 'feat: add amazing feature')
4. Push to the branch (git push origin feature/amazing-feature`)MIT