CLI for initializing projects in a configurable way.
 
 
 
 
 
 
Go to file
Joshua Potter ef2bb9cc1f Add first fuller pass of README. 2023-11-25 12:43:41 -07:00
.githooks Run formatting with additional rules. 2023-11-24 19:35:34 -07:00
include Add documentation for remaining header files. 2023-11-25 12:18:36 -07:00
specs/test Allow reading in STRING prompts. 2023-11-25 10:37:41 -07:00
src Add documentation for `config`, `dyn_array`, `error`, and `string_buf`. 2023-11-25 11:51:42 -07:00
test Add documentation for `config`, `dyn_array`, `error`, and `string_buf`. 2023-11-25 11:51:42 -07:00
.clang-format Run formatting with additional rules. 2023-11-24 19:35:34 -07:00
.envrc Add automatic, configured formatting. 2023-11-23 08:22:43 -07:00
.gitignore Add documentation for `config`, `dyn_array`, `error`, and `string_buf`. 2023-11-25 11:51:42 -07:00
Doxyfile Add documentation for remaining header files. 2023-11-25 12:18:36 -07:00
Makefile Allow executing `run.sh`. 2023-11-24 20:29:24 -07:00
README.md Add first fuller pass of README. 2023-11-25 12:43:41 -07:00
flake.lock Add example `main.c` file. 2023-11-22 11:50:15 -07:00
flake.nix Add documentation for `config`, `dyn_array`, `error`, and `string_buf`. 2023-11-25 11:51:42 -07:00
main.c Add documentation for `config`, `dyn_array`, `error`, and `string_buf`. 2023-11-25 11:51:42 -07:00

README.md

bootstrap

CLI utility for defining custom project initialization scripts.

TODO:

  • Add evaluator tests.
  • Color output to console.

Overview

bootstrap is a tool for quickly defining your own init-like scripts. If you are familiar with tools like

  • npm init
  • nix flake init
  • django-admin startproject
  • mix phx.new
  • etc.

this project will feel at home. Ultimately the goal is to create (optionally) interactive scripts like those mentioned in the above list to quickly scaffold your new projects in a consistent way.

We start with an example. Consider the following spec, which we'll name example:

{
  "filename": {
    "type": "STRING",
    "prompt": "What file should I create for you?"
  }
}

and its associated builder:

#!/usr/bin/env bash

echo "Creating $FILENAME"
touch "$OUT/$FILENAME"

Running bootstrap with these two files configured will invoke the following interactive script:

> bootstrap example
What file should I create for you? hello-world.txt
Creating hello-world.txt

>

You should now see a new hello-world.txt file in the current directory.

Usage

TODO

Installation

TODO

Specs and Builders

TODO

Other Environment Variables

TODO

Supplied Specs

TODO

Using With Nix

TODO

Development

TODO

Documentation

TODO

Formatting

A pre-commit file is included in .githooks to ensure consistent formatting. Run the following to configure git to use it:

git config --local core.hooksPath .githooks/

If running direnv, this is done automatically if git is installed.