Metadata-Version: 2.4
Name: devenvcp
Version: 1.1.1
Summary: Template init tool for devenv inspired by nix flake init
License-File: LICENSE
Requires-Python: >=3.13
Requires-Dist: colorama>=0.4.6
Description-Content-Type: text/markdown

# Devenvcp

Template init tool for devenv inspired by nix flake init to copy your devenv templates so you don't need to use nix flakes for it.

## Installation
### From Pypi
```sh
pip install devenvcp
```

### From nix flake
Add this to your inputs
```nix
inputs.devenvcp.url = "git+https://codeberg.org/claymorwan/devenvcp"
```

Then you can install the package using the nix module:
```nix
{
  import = [
    # For NixOS
    inputs.devenvcp.nixosModules.default
    # For home-manager
    inputs.devenvcp.homeModules.default
  ];
  
  programs.devenvcp.enable = true;
}
```

Alternatively install the package like so:
```nix
environment.systemPackages = [
  inputs.devenvcp.packages.${pkgs.stdenv.hostPlatform.system}.default
];
```

for home-manager:
```nix
home.packages = [
  inputs.devenvcp.packages.${pkgs.stdenv.hostPlatform.system}.default
];
```

You can also directly run
```sh
nix run git+https://codeberg.org/claymorwan/devenvcp -- <args>
``` 
## Usage
Create a `devenvcp.toml` file in which you can add your templates like so
```toml
[python]            # name of template
path = "./python"   # relative path your template's directory
aliases = ["py"]    # list of string to use as aliases in the cli
```

Then run the following
```sh
devenvcp path/to/dir/containing/config <template>
# for example
devenvcp ~/.dotfiles/NixOS/dev-shells/devenv python
```

## Configuration
You can define a default path by setting the env `DEVENVCP_DEFAULT` to a correct, then just run the command as usual without the path:
```sh
devenvcp <template>
# for example
devenvcp python
```
The path here should be an absolute path.

If you're using the nix module, you can set the default path with an option:
```nix
{
  programs.devenvcp = {
    enable = true;
    defaultPath = "absolute/path/to/dir/containing/config";
  };
}
```
### Wait can't I just use this with anything else and not just devenv ?

I mean yea, I made it with devenv in mind at first but nothing stops u from using it with to template like anything else lol, I might rename the project eventually who knows
