Metadata-Version: 2.4
Name: scold-cli
Version: 0.1.2
Summary: Scaffolding generation CLI
Author: João Pedro
Author-email: João Pedro <vieiraleao2005@gmail.com>
License-Expression: GPL-3.0-only
License-File: LICENSE
Classifier: Topic :: Utilities
Requires-Dist: attrs>=25.4.0
Requires-Dist: case-converter>=1.2.0
Requires-Dist: cyclopts>=4.3.0
Requires-Dist: loguru>=0.7.3
Requires-Dist: mako>=1.3.10
Requires-Dist: pydantic>=2.12.4
Requires-Dist: pydantic-settings>=2.12.0
Requires-Dist: questionary>=2.1.1
Requires-Dist: rich>=14.2.0
Requires-Python: >=3.12
Project-URL: Homepage, https://github.com/joaovl5/scold
Project-URL: Issues, https://github.com/joaovl5/scold/issues
Description-Content-Type: text/markdown

# Scold

## About 

`scold` is a CLI tool for reducing manual copy-pasting of boilerplate/scaffolding code, it let's developers define custom templates for different kinds of objects (services, database entities, etc) that `scold` will render when running `scold new <object_type>`, while prompting for questions in the template.

### Usage

We first define a `scold.toml` file at the root of our project:
```toml
[project]
root_dir = "./src/scold/"  # object dirs get this value prepended
# how files get named by default, is overrided by some `file_naming` scoped prop.
# so `SampleRepository` -> `sample_repository` automatically
default_file_naming = "snake_case"

[objects.repository]
dir = "services/repositories/"
# vars get converted into a form that will be prompted when running cli
vars = [
  { field = "object_name", desc = "Name", type = "text", default = "SampleRepository" },  # required for all objects
  { field = "feature_toggles", desc = "Feature Toggles", group = [
    { field = "allow_deletion", desc = "Allow deletion", type = "bool", default = true },
    { field = "allow_extinction", desc = "Allow extinction", type = "bool", default = false },
  ] },
]
```

Then, in the directory for our object 'repository', we must have a `__template` folder (whole folder will be copied) OR a `__template.*` file (only file will be copied). Then you can use Mako's syntax in the template, benefitting from the variables declared in the `scold.toml` file.

When running `scold new repository`, we get a form prompting for our inputs:
<img width="453" height="213" alt="image" src="https://github.com/user-attachments/assets/aa784321-651b-4789-aea5-88105fe7603d" />


## Installation

The easiest way to install the `scold` cli is with [uv](https://docs.astral.sh/uv/getting-started/installation/). You can do the following to install it in your system:
```bash
uv tool install scold-cli
```
