Nift is a minimal build system designed for quickly bootstrapping projects on Linux.
It's useful for full-stack hackathon projects and personal projects, enabling you to quickly generate reusable templates with common file structures and configurations, so you can start coding right away.
- Quick Project Setup: Use templates to generate boilerplate code and directory structures.
- Fullstack Generation: Quickly create connected front and backends.
- Customizable Templates: Create and manage templates tailored to your workflow.
- Verbose Mode: View directory structures and manage templates via an intuitive CLI menu.
Nift includes some standard project templates.
- Next.js (React)
- Django (python)
- Flask (python)
- C++: A C++ project with Google Test and Doxygen, built with CMake.
- Python (Script): A Python CLI project using
click, virtual environment, dependency management, argument parsing, packaging, and a README.
Feel free to enhance these templates or add your own to the repository.
git clone https://github.com/Archii0/nift.git
cd niftRun the deployment script to set up Nift:
sudo ./deploy.shThis will:
- Move the
/templatesdirectory to/var/nift. - Place the Nift script in
/usr/bin/, making it globally accessible.
To generate a project using a template, run:
nift <project-name>Nift will:
- Create a new directory named
<project-name>. - Copy the chosen template files into the directory.
- Replace placeholders (e.g.,
PROJECTNAME) in filenames and file content with the specified<project-name>.
Enable verbose mode for additional functionality:
nift <project-name> [-v|--verbose]In verbose mode, you can:
- Browse available templates via a CLI menu.
- View directory structures of templates, such as:
C++/ ├── CMakeLists.txt ├── lib/ ├── Makefile ├── src/ ├── CMakeLists.txt ├── main.cpp ├── tests/ ├── CMakeLists.txt ├── main.cpp
Before modifying templates, undeploy Nift:
sudo ./undeploy.shThis removes Nift's deployed files, allowing you to safely edit templates.
Create a new folder in the /templates directory to define your template. Use PROJECTNAME as a placeholder in filenames and file content for dynamic substitution.
File: PROJECTNAME.c
/* PROJECTNAME.c */
#include "PROJECTNAME.h"
int main(int argc, char *argv[]) {
printf("Nifty.");
return 0;
}Templates are ideal for standardizing common project elements, such as:
- Main function stubs.
- Type definitions and imports.
- Build system files (e.g., Makefiles).
- Directory structures for larger projects.
Git does not track empty directories. To preserve them, you can:
- Add a placeholder file (e.g.,
.gitkeep). - Automate directory creation in your build scripts.
Once your templates are ready, redeploy:
sudo ./deploy.shContributions are welcome! Submit a pull request to:
- Add new templates.
- Improve existing templates.
- Enhance Nift's functionality.
This project is licensed under the MIT License.
If you encounter issues or have questions, open an issue on the GitHub repository.