volllly / rotz Goto Github PK
View Code? Open in Web Editor NEWFully cross platform dotfile manager and dev environment bootstrapper written in Rust.
Home Page: https://volllly.github.io/rotz/
License: MIT License
Fully cross platform dotfile manager and dev environment bootstrapper written in Rust.
Home Page: https://volllly.github.io/rotz/
License: MIT License
Provide simple install scripts to install rotz like this:
curl github.com/volllly/rotz/releases/download/latest/install.sh | sh
irm github.com/volllly/rotz/releases/download/latest/install.ps1 | iex
The script should be automatically published in the releases and download the correct binary into a folder that makes sense. Maybe there is a common way to do these things. For windows we could look at how scoop installs itsself.
Add a code tour using https://github.com/microsoft/codetour for learning the codebase.
Hey there, I'm looking for a crossplatform dotfile managing solution, and stumbled across Dotted/Rotz. My main OS is Windows but I have several devices running several different Linux distros. I'm happy to keep using scoop/other package managers to managing installing/uninstalling/updating programs, but I was just wondering if Rotz was ready to use now purely as an alternative to stow for dotfile managing, or if I should use something else in the meantime?
I would like to add Rotz to some package managers to ease installation.
My initial thoughts are:
but this is open for debate ๐
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
junction
, serde
, serde_json
, thiserror
)@docusaurus/core
, @docusaurus/module-type-aliases
, @docusaurus/preset-classic
)react
, react-dom
)These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
Cargo.toml
clap 4.5.4
serde_yaml 0.9.34
serde_toml 0.8.12
serde_json 1.0.116
figment 0.10.18
directories 5.0.1
once_cell 1.19.0
serde 1.0.198
crossterm 0.27.0
itertools 0.12.1
thiserror 1.0.58
baker 0.2.0
miette 7.2.0
indexmap 2.2.6
handlebars 5.1.2
handlebars_misc_helpers 0.15.0
shellwords 1.1.0
path-absolutize 3.1.1
walkdir 2.5.0
wax 0.6.0
whoami 1.5.1
path-slash 0.2.1
velcro 0.5.4
tap 1.0.1
tracing 0.1.40
tracing-tracy 0.11.0
tracing-subscriber 0.3.18
strum 0.26.2
fake 2.9.2
rand 0.8.5
rstest 0.19.0
speculoos 0.11.0
junction 1.0.0
openssl-sys 0.9.102
openssl-sys 0.9.102
openssl-sys 0.9.102
.github/workflows/chat-ops-dispatch.yml
actions/checkout v4
peter-evans/slash-command-dispatch v4
peter-evans/create-or-update-comment v4
.github/workflows/ci.yml
actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
actions/cache v4
actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
actions/cache v4
actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
actions/cache v4
actions/upload-artifact v4
actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
actions/cache v4
actions/download-artifact v4
antonyurchenko/git-release v6
.github/workflows/docs.yml
actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
actions/setup-node v4
actions/upload-pages-artifact v3
actions/deploy-pages v4
.github/workflows/fmt-command.yml
actions/checkout v4
peter-evans/create-or-update-comment v4
docs/package.json
@docusaurus/core 3.2.1
@docusaurus/preset-classic 3.2.1
@easyops-cn/docusaurus-search-local 0.40.1
@ltd/j-toml 1.38.0
@mdx-js/react 3.0.1
clsx 2.1.0
prism-react-renderer 1.3.5
react 18.2.0
react-dom 18.2.0
yaml 2.4.1
@docusaurus/module-type-aliases 3.2.1
@tsconfig/docusaurus 2.0.3
typescript 5.4.5
Hey,
I really like the idea of rotz
. I saw the example for installs and was missing the ability to install a list of tools.
Let me outline my idea:
config.yaml
with variablesvariables:
packages:
darwin:
- visual-studio-code
- vim
- rustup
linux:
- vscode
- emacs
- golang
dot.yaml
where I want to install a set of packagesdarwin:
installs:
cmd: brew install {{ <package> }}
# packages: {{ variables.darwin }}
depends:
- brew
linux:
installs:
cmd: yay install {{ <package> }}
# packages: {{ variables.darwin }}
depends:
- yay
rotz
supports arrays, there could be a packages
property for installs
to install more than one package with cmd
Does this make any sense?
I'm happy to discuss the idea or answer any follow-up questions :)
Cheers
Stefan
We should update the CI build to add a *.zip.sha256
file to each of the the targets and publish that file in releases.
Hi there. As the title says i'm getting this error when i try to run the sync command under Windows.
Error: glob::set::parse
x Could not build GlobSet
`-> failed to parse glob expression
I don't know if i'm doing something wrong but i just initialize rotz with rotz init,
then add things into the .dotfiles folder and then i've tried the sync command and got this error.
First off, fantastic package! My dotfiles are sooo much cleaner than when my old dotbot iteration, zero regrets on making the jump, thanks for your hard work on this ๐โจ.
One thing I just encountered in trying to refactor from using a giant Brewfile to relying on Rotz for my brew installs: it seems that the {{ name }}
of a subdirectory within a subdirectory includes the parent subdirectory. This makes it impossible (? or tricky at least) to use a defaults.yaml
with a package manager to install using the suggested pattern:
# defaults.yaml
installs:
cmd: brew install {{ name }}
depends:
- brew
For example, with the below setup (tools dir is in the root of my dotfiles), the above pattern attempts to do this brew install tools/yazi
, brew install tools/atuin
...etc.
tools
โโโ atuin
โย ย โโโ atuin.toml
โย ย โโโ dot.yaml
โโโ dbt
โย ย โโโ dot.yaml
โโโ defaults.yaml
โโโ dust
โย ย โโโ dot.yaml
โโโ karabiner
โย ย โโโ dot.yaml
โย ย โโโ karabiner.json
โโโ sunbeam
โย ย โโโ dot.yaml
โย ย โโโ xn.py
โโโ yazi
โโโ Catppuccin-frappe.tmTheme
โโโ dot.yaml
โโโ keymap.toml
โโโ theme.toml
โโโ yazi.toml
This is on MacOS Sonoma 14.4.1, Rotz version 0.10.0. Let me know if you need other details. Thanks again!
Is it possible to reference environment variables in the yaml files?
Add an init
command to initialize a new dotfiles repository and config file.
A simple dot.yaml
config like this fails:
links:
Microsoft.PowerShell_profile.ps1: ~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
> rotz link powershell
Linking powershell
Microsoft.PowerShell_profile.ps1 -> ~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
Error: link::linking
ร Could not create link from "C:
โ \Users\Michael\.dotfiles\powershell\Microsoft.PowerShell_profile.ps1" to "C:
โ \Users\Michael\Documents\PowerShell\Microsoft.PowerShell_profile.ps1"
โฐโโถ The system cannot find the path specified. (os error 3)
help: You may need to run rotz from an admin shell to create file links
Creating the directory Powershell
manually fixes the issue. It would be nice if Rotz was able to create the missing directories, because with installs
not working yet I can't even run a script that creates the directory.
I've been trying to get defaults to work, but so far i cant seem to get it working the way i would like to.
My default.toml file is just
[linux] [linux.installs] cmd: sudo pacman --needed --noconfirm -S {{ name }}
But how do i actually get a dot for a particular application to use it?
Assuming i just want to install something, without any other actions (no linking etc.)
Do i just put in an empty file in the respective folder, or do i put something in it?
(Just migrated over to rotz, really nice - thanks!)
We can set install commands per OS (eg, Darwin vs Linux), but there's no way to set different install commands per distro.
In my case, I use Darwin, Ubuntu and Arch Linux. I can have different commands in defaults.yml
for darwin
and linux
, but my linux command can be either apt
or pacman
which means install will only work on 1 of those distributions.
linux:
installs: sudo apt install -y {{ name }}
darwin:
installs:
cmd: brew install {{ name }}
depends:
- brew
Reading /etc/os-release
(if available) could let us define keys based on the value of ID
perhaps:
linux:
ubuntu:
installs: sudo apt install -y {{ name }}
arch:
installs: sudo pacman -S --noconfirm {{ name }}
darwin:
installs:
cmd: brew install {{ name }}
depends:
- brew
It would be nice to add an existing folder/file to be tracked by rotz.
E.g. something like rotz edit vscode add --windows ~/AppData/Roaming/Code/User/snippets/ snippets
would add this folder to the vscode/dot.yaml
file windows links, copy the folder to vscode/snippets
in the repo and create the symlink.
Recurse nested folders and treat dot names as paths. If the folders contain a defaults file merge it with the parent defaults and use it for child dots.
Dot names in the cli and the depends sections are glob patterns.
rotz install devtools/*
installs all dots in the devtools folder.
rotz install **/vim
installs all dots named vim in any folder.
rotz install *
installs all dots in the root folder (like before).
rotz install **
installs all dots in any folder.
depends: [ ../package-managers/scoop ]
uses a path relative to the current dot.
Use https://docs.rs/git-repository/ or https://docs.rs/git2/latest/git2/ to perform git actions instead of relying on a local git installation.
rotz
is missing a sanity check on links
.
PEBKAC from your servitor here happened:
I have a file named config
declared as :
links:
condig:~/.gitconfig
As you can see, there is a typo in the name.
rotz
then created a dead link.
i don't think rotz
should create deadlinks, it should error, telling the file condig
does not exists (and optionally, telling me i am stupid :) ).
PS: Thanks for the tool!
The following dot does not parse right now because link keys which contain a string and an array cannot be mixed at the moment.
links:
some: thing
an: [ arr, ay ]
First of all... Why did I not find this earlier??? Such a great tool! Rust and cross platform, best combo!
I know this project is in its early steps and also only you, @volllly , develop it, so I guess you dont have the time to package it to all platforms. As a temporary solution can you add a step to github actions to build binaries for several platforms? Also add some example one-liner to curl / wget / Invoke-WebRequest them to ~/.bin or something. It would be much easier to not install rust on every computer.
My dotfiles repo mirrors my $HOME
(like a lot of dotfiles repos i guess), so my dot.yaml
currently consists of:
links:
filename: ~/filename
And it's just a bunch of thing: ~/thing
for every file or folder that exists in the repo.
Would it be possible to do
copy to: ~/
links:
- filename
- other filename
maybe with a different key than links
to avoid parsing complexity (idk if rust is like Go where decoding YAML into a data structure imposes somewhat strict requirements on the shape of the input yaml data)
I can whip up a PR
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.