Git Product home page Git Product logo

tsirysndr / envhub Goto Github PK

View Code? Open in Web Editor NEW
30.0 1.0 3.0 19.39 MB

Manage your dotfiles, secrets and packages with ease. Define your $HOME as Code and re-use it everywhere (local machine, CI, server ...) ๐Ÿ’ป ๐Ÿš€ โœจ

License: Mozilla Public License 2.0

Rust 20.68% Nix 1.56% TypeScript 76.92% Shell 0.84%
devbox environment linux macos nix packages pkgx homebrew gnu-stow home-manager

envhub's Introduction

EnvHub

FlakeHub built with nix flakestry.dev crates downloads ci discord

EnvHub is a simple tool to manage dotfiles and packages accross multiple machines.

Written in Rust, internally it uses nix/homebrew/pkgx/devbox to manage packages and home-manager/stow to manage dotfiles.

Made with VHS

๐Ÿšš Installation

Using bash :

curl -sSL https://install.envhub.sh | bash

Using Cargo :

cargo install envhub

Using Nix :

nix profile install --experimental-features "nix-command flakes" github:tsirysndr/envhub

Compile from source :

git clone https://github.com/tsirysndr/envhub.git
cd envhub
nix develop --experimental-features "nix-command flakes"
cargo install --path crates/cli
envhub --help

Using Homebrew :

brew install tsirysndr/tap/envhub

Or download the latest release for your platform here.

๐Ÿš€ Quick Start

Initialize a new environment :

envhub init

It will create a new envhub.hcl file and a dotfiles directory in the current directory.

You can then edit the envhub.hcl file to add packages and add dotfiles to the dotfiles directory.

Enable the environment :

envhub use

๐Ÿ“š Example

The following example will install the hello package, set the EDITOR environment variable to vim, and copy the .screenrc and gradle.properties files from the current directory to the home directory.

# Path: envhub.hcl
packages = [
  "hello"
]

envs {
  "EDITOR" = "vim"
}

file ".screenrc" {
  source = ".screenrc"
}

file ".gradle/gradle.properties" {
  content = "org.gradle.daemon=true"
}

See demo and examples for a more complete example.

๐Ÿงฉ As a Dagger Module

Call from the command line:

dagger -m github.com/tsirysndr/daggerverse/envhub call \
  use --environment github:tsirysndr/dotfiles-example \
  --src .

call from a Fluent CI module:

import { use } from 'jsr:@fx/envhub';

await use(
  ".",
  "github:tsirysndr/dotfiles-example"
);

As a GitHub Action

You can use EnvHub as a GitHub Action to manage your dotfiles and packages in your CI/CD workflow.

- uses: tsirysndr/setup-envhub@v1
  with:
    version: 'v0.2.18'
- run: envhub --help

envhub's People

Contributors

iamando avatar mikaoelitiana avatar tsirysndr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

envhub's Issues

failing installation displayed as completed

I have installed envhub using the bash and while the installation was unsuccessful due the mv: rename /tmp/envhub to /usr/local/bin: Permission denied, the success screen is displayed

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.