A CLI tool that scaffolds RTK Query + Axios integration into React or Next.js apps with a single command. Version 1.0.1 installs @reduxjs/toolkit, react-redux, axios, and js-cookie, and copies a ready-to-use redux/ folder with base query setup, root API slice, example service, store, hooks, and Redux provider. It automatically detects whether a src/ directory exists and places files accordingly. Key differentiator: opinionated but minimal setup for RTK Query with Axios as the HTTP client, including cookie-based auth token injection.
npm install rtk-query-axiosNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Scaffolds a redux/ folder with RTK Query + Axios integration, overwriting existing files.
Ensure your project's source structure is consistent before running. Use --force to overwrite.
Review installed versions after scaffolding and adjust package.json if needed.
Edit redux/baseQuery/axiosBaseQuery.ts to read token from your preferred source.
Update the import path in Provider.tsx to match your project's alias configuration.
Configure the '@' path alias in tsconfig.json (paths: {'@/*': ['./src/*']}) or update import paths in the generated files.Ensure the service file exports the hook and the import path matches (e.g., '@/redux/services/example/example').
Use 'npx rtk-query-axios' (exact spelling) and ensure npm >= 5.2.0.