Skip to content

Scripts

The project includes various scripts designed to enhance your developer experience. You can run any script using your terminal. Please note that some CLI scripts may require you to adjust the height of your terminal window to avoid UI anomalies. The Relivator allows you to use the following:

  1. 💪 Native Scripts: These are commands configured in package.json and run by the package manager like pnpm, [bun ](https://bun .sh), yarn, or npm. You can run these “native” scripts using commands like bun [dev|build] and bun db:[push|studio].
  2. ⚙️ Custom-Built Scripts: These scripts are written in TypeScript and Python by Reliverse and the community and are mostly located in the addons folder. 🔥 Please be cautious when using transformation scripts, as they are all in their initial versions. Ensure you commit your changes to your version control provider (such as GitHub) before using any of them. They can be executed via the command line using [appts|addons|reli|lint|fix]:* or manually via bun path/to/file or py path/to/file (e.g., py addons/scripts/reliverse/relimter/python/tasks/math-to-mathjs.py).
  3. 🐍 Python Script Manager: Can be executed using reli:manager or py addons/scripts/reliverse/relimter/python/index.py. Before running it, please read the 🐍 Python section below to learn how to prepare your workspace to run this manager.

package.json

Below are some scripts configured in the scripts section of the package.json file (the following text may be outdated in some places, please let us know if you find any inaccuracies):

  • bun appts / bun appts:putout / bun appts:verbose / bun appts:nobuild: These commands perform a comprehensive codebase check. They sequentially run bun knip for various codebase checks, bun format to format code with Biome (or Prettier, coming soon), and bun lint for linting with Biome and ESLint (bun lint:eslint). Linting may take some time, so please be patient. The bun appts:putout command also runs bun lint:putout. Using bun appts:verbose displays detailed ESLint progress, useful if you suspect ESLint is stuck (it may be slow, not stuck). You can manually resolve issues by pressing Ctrl+S multiple times in VSCode until there are no issues in the “Problems” tab. Usually, issues are resolved by the second or third run. If some specific issues persist, it may mean they are not automatically fixed. Please try to fix them manually, contact us, or disable the rule. Many rules in eslint.config.js are disabled by default; enable only what you need. You may also want to run bun reli:setup to choose the RulesDisabled preset if you want to disable all “error” and “warning” rules at once. bun appts then runs bun typecheck for remaining TypeScript errors and bun run build, but you may try bun turbo:appts, which runs bun turbo:build to speed up builds using Turborepo v2. Note that bun turbo:appts is a faster, interactive version of appts but may not work well with the VSCode terminal. Alternatively, you can use bun appts:nobuild, which performs only checking, linting, formatting, and fixing, without building.
  • bun fix:putout-unstable: Putout is a linter and formatter. While the formatter fixes issues reported by the linter, the fix:putout-unstable command also makes changes not flagged by the linter. Ensure you commit your code before running this command, as it might cause unexpected changes. After running it, review and adjust the changes in your codebase using VSCode Source Control (Cmd/Ctrl+Shift+G) or GitHub Desktop.
  • bun db:[push|studio|generate|migrate]: push converts the TypeScript Drizzle schema to SQL and sends it to the DATABASE_URL; studio runs Drizzle Studio on https://local.drizzle.studio; migrate applies migrations generated by the generate command (you may not need this command anymore), based on the drizzle.config.ts file.
  • bun stripe:listen: Runs the Stripe webhook listener and helps set up Stripe environment variables. The Stripe CLI must be installed for this command to work.
  • bun addons: This command allows you to headlessly run some of the scripts located in the addons folder. Many scripts are still not added there, so please check the addons folder and run them manually using bun path/to/file or py path/to/file. This also includes the game @reliverse/academy. In the future, it will have many different interesting features. Currently, it is a quiz with a leaderboard and achievements where you can test your knowledge of Relivator, JavaScript, TypeScript, React, and even ESLint.
  • reli:manager: Learn more in the 🐍 Python section below. This is the alias for the py addons/scripts/reliverse/relimter/python/index.py command.
  • bun latest: Updates all project packages to their latest stable versions, including some specific packages to their latest versions on rc/beta/alpha/next/canary branches.
  • bun reli:vscode [nothing|minimal|default|ultimate]: Enhances VSCode settings with presets by Reliverse. This script adjusts your settings.json, extensions.json, and launch.json files. It will prompt for confirmation before overriding current files. Use RQ20 to learn more about .vscode presets and font installation for the ultimate preset, or use the default preset (which doesn’t contain custom fonts and themes). Choose default, minimal, or nothing if your PC or virtual machine is very slow.
  • bun reli:help: Displays useful information about Relivator and Reliverse.
  • bun lint:compiler: Runs the React Compiler health check. Note that React Compiler is disabled by default; see the FAQ section for more details.
  • bun tw:[v4|v3]: Switches between Tailwind CSS v3 and the alpha v4 version. Important: After using this command, adjust comments in postcss.config.cjs. Also: When using Tailwind CSS v4, remove or comment out tailwindPlugin from eslint.config.js as it doesn’t support v4. Some additional changes in the codebase may be required.
  • bun reli:prepare: Learn more about this script in the previous section (Cmd/Ctrl+F “It is recommended”).
Terminal window
# bun reliverse.config.ts --details
Framework: Relivator v1.2.6 Engine: Reliverse v0.4.0 Hotline: https://discord.gg/Pb8uKbwpsJ
Relivator v1.2.6 Release Blog Post 👉 https://reliverse.org/relivator/v126
Help Relivator become even better! Please star the repo https://github.com/blefnk/relivator
For experienced users: run 'bun reli:prepare' to update all dependencies to the latest versions and check if the code requires any adjustments.
Meet quality standards: run 'bun appts' and 'bun fix:putout-unstable' to get linting, formatting, and more.
Unstable: try 'bun turbo:dev' and faster build with 'bun turbo:build': https://turbo.build/repo
The reactCompiler is enabled in next.config.js - it uses webpack now, so builds take longer.
Clerk: make sure to connect the domain in the Clerk dashboard so services like PageSpeed will work.
Please find Q21 in the FAQ of README.md. Copy the adapted bun scripts and replace the current ones in package.json - scripts for other package managers coming soon.

Python

👋 Hello, dear friend! Nice to see you here! I (@blefnk Nazar Kornienko) have a dream of making the open-source world better and of higher quality. I aspire to leave my mark in history by ensuring people genuinely enjoy programming and create quality products. I’m particularly passionate about clean code. The book “Clean Code” by Robert Martin is a must-have!

That’s why I’ve developed numerous tools in Relivator. Over the past few months leading up to Relivator 1.2.6, I’ve learned a lot. To avoid manually rewriting code, I’ve developed a unified script manager. The current version of the manager is still very unstable. You can visit the addons/scripts/reliverse/relimter/python/index.py file to learn more about how this script manager works.

If you want to use this Python Script Manager (refer to ⚙️ Script to read the introduction), then please ensure your workspace is properly prepared for it. Please note that most scripts are largely untested. Commit your code before running any script. Increase your VSCode terminal window size to avoid UI glitches. Need help? Visit our Discord. Follow the steps below to get started (scroll down to learn even more Python commands):

✅ After following the instructions above, you can safely run the script manager.

  1. Install Python and Ruff. Install the following VSCode extensions: Python and Ruff.
  2. Create a new .venv folder by pressing Cmd/Ctrl+Shift+P and running >Python: Create Environment... (VSCode will prompt you to choose the Python interpreter; choose the one installed in step 1). Then, choose requirements.txt as the package dependencies file.
  3. Please note, VSCode’s terminal automatically activates the environment after each launch. You can verify this by hovering over a [pwsh|bash|cmd] button in VSCode’s terminal and looking for something like “Python: Activated environment for .\.venv\Scripts\python.exe”. However, if you are using another IDE or an external terminal, you may need to activate the virtual environment manually: [Windows] .venv/Scripts/activate; [macOS/Linux] source .venv/bin/activate.
  4. Ensure all requirement are installed correctly, just run pip install -r requirements.txt.

🐍 Everything ready? Nice! Congratulations! Try running the Python Script Manager now by executing: reli:manager or py addons/scripts/reliverse/relimter/python/index.py

Useful Python Commands

We are still working on this section. The following description may currently be slightly incorrect.

Terminal window
# - Install the required dependencies:
pip install -r requirements.txt
# - Make sure you have `pip-tools` installed to use `pip-compile` and `pip-sync`:
pip install pip-tools
# - You can create/update a `requirements.txt` file:
pip freeze > requirements.txt
# - Sync the dependencies:
pip-sync requirements.txt
# - Remove a specific package (e.g., torch):
pip uninstall torch
pip freeze > requirements.txt

Please note: If you have UV installed and you’ve used a command like uv pip install InquirerPy and it shows an error like “The wheel is invalid”, the easiest solution is to just use regular pip commands like pip install InquirerPy.