Tyr (referred to as 'Tyrr' in the npm ecosystem due to naming conflicts) is a lightweight, fast, and reliable package manager for Node.js projects, implemented in Rust. It aims to provide efficient dependency management, project initialization, and package installation workflows.
Init:
Initialize a new Node.js project with a basic project structure and a package.json file.Add:
Fetch dependencies from npm and update the package.json file.Lock File Generation:
Create a lock file (tyr.lock) to track dependency versions.Script Execution:
Ability to execute scripts defined in the package.json file.Install Command:
Install dependencies specified in the tyr.lock file.Versioning:
Semantic versioning support for package management and updates.
To begin using Tyrr, simply install it globally using npm:
npm install -g tyrr
Alternatively, you can use npx
to run Tyrr without installing it globally:
npx tyrr <command>
To run Tyr from the source code, ensure that you have Rust installed. You can install Rust by following the instructions on the official website.
Clone the repository:
git clone https://github.com/jkitsao/tyr.git
Navigate to the project directory:
cd tyr
Run Tyr with Cargo:
cargo run <command>
Replace command
with one of the supported commands, such as init, add, etc.
Choose the option that best suits your needs to start using Tyrr and enhance your Node.js development workflow.
The init
command is your gateway to quickly scaffolding a new Node.js project. It guides you through providing essential project details and generates a package.json
file accordingly.
tyrr init
{
"name": "my-awesome-project",
"version": "1.0.0",
"description": "An awesome Node.js project managed with Tyrr",
"main": "index.js",
"author": "Your Name",
"license": "MIT"
}
The add
command allows you to fetch packages from the NPM registry and update the tyr.lock
file to manage package versions and dependencies efficiently.
tyrr add <package-name>
The install
command resolves dependencies listed in both the tyr.lock
file and package.json
file, ensuring your project has all the necessary dependencies installed.
tyrr install
Let's walk through a typical workflow with Tyrr:
tyrr init
tyrr add react
tyrr install
tyrr run dev
Tyrr doesn't require any additional configuration files. It leverages the package.json
and tyr.lock
files to manage project dependencies seamlessly.
Dependency Management:
Support for updating, removing, and listing dependencies.Registry Support:
Allow configuring custom registries for package installation.Concurrency:
Parallel dependency resolution and installation for faster performance.
Tyr is currently in early development and may not be suitable for use in production environments. Use it at your own risk.
Tyrr is an open-source project, and we welcome contributions from the community. If you encounter any bugs or have suggestions for improvements, please feel free to submit a pull request on the GitHub repository.
For feedback, suggestions, or support inquiries, don't hesitate to reach out to us via GitHub Issues or contact us via email at [email protected].
This project is licensed under the MIT License. See the LICENSE file for details.