Skip to main content

create files quickly and conveniently with the 'crt' utility

Project description

A fast and convenient tool for creating files


crt is a powerful command-line tool designed for quick and easy file creation, as well as generating projects based on predefined templates. It helps you save time and boost productivity by eliminating the need to manually create files and organize structures.


Features

  • File creation: instantly create files using simple commands.
  • Folder creation: easily create nested directory structures.
  • Template support: use and create templates for common projects and file types.
  • Template management: create, view, delete, and rename custom templates.
  • Flexibility: easily customize templates to fit your needs.

Commands

  • files: create files, folders, and nested structures.
  • temps: create a project using a template.

Command Description

File and Folder Creation

Accepts a string with file and folder names (wrap the string in quotes ""). Use : to separate items, and <> to define folders.

crt {file_name} {extension}

Template Management

Command Description
crt -v View all available templates
crt -t {name} Apply an existing template
crt -t {name} -f Apply a template with content filling
crt -t {name} -p {path} Specify target directory for template creation
crt -t {name} --append Create a new template from the current directory
crt -t {name} --remove Delete an existing template
crt -t {name} --rename {new_name} Rename a template

.gitignore Generation

Command Description
crt -t gitignore py Create .gitignore for Python
crt -t gitignore js Create .gitignore for JavaScript/Node.js
crt -t gitignore java Create .gitignore for Java
crt -t gitignore c Create .gitignore for C
crt -t gitignore c++ Create .gitignore for C++
crt -t gitignore c# Create .gitignore for C#
crt -t gitignore go Create .gitignore for Go

Installation

pip install crtfiles

---> 100%

Examples

Templates

1) View Available Templates

crt -v

--->

Available templates:
 Default:
  • postgres (12 files)
  • fastapi (22 files)
  • react (71 files)
  • tg_bot (19 files)
  • tg_bot_full (96 files)
  • gitignore (py, js, java, c, c++, go, c#)

2) Create a Custom Template

Navigate to your project directory and run:

crt -t my_template -a -p my_project

--->

your_folder/

├── lib/
│   ├── screens/
│   ├── widgets/
│   ├── models/
│   ├── services/
│   ├── utils/
│   ├── assets/
│   └── main.py

├── test/
├── build/
├── README.md
└── .gitignore

3) Apply Template with Content Filling

crt -t fastapi -p my_app -f

--->

Template 'fastapi' applied successfully to: .\\my_app

4) Apply Template Without Content (Structure Only)

crt -t fastapi -p my_app

--->

Template 'fastapi' applied successfully to: .\\my_app

5) Rename a Custom Template

crt -t my_template -rn my_temp

--->

Template renamed: 'my_template' → 'my_temp'

6) Delete a Custom Template

crt -t my_template -rm

--->

Template 'my_template' removed successfully!

Files

1) Create Files

crt main.py:test.py:requirements.txt

--->

your_folder/

├── main.py
├── test.py
└── requirements.txt

2) Create Files with Extension

crt main:test py

--->

your_folder/

├── main.py
└── test.py

3) Create Folders

crt "src<>:image<>:models<>"

--->

your_folder/

├── src/
├── image/
└── models/

4) Create Nested Folders

crt "src<models<>:assets<>>:lib<models<>>"

--->

your_folder/

├── src/
│   ├── models/
│   └── assets/

└── lib/
    └── models/

5) Create Nested Files Inside Folders

crt "app<base.py:control.py>:backends<database<models.py>:base.py>"

--->

your_folder/

├── app/
│   ├── base.py
│   └── control.py

└── backends/
    ├── database/
    │   └── models.py
    └── base.py

.crtignore Configuration

To exclude files and folders from templates, create a .crtignore file in the project root.

Example .crtignore

__pycache__
.venv
venv
.git
.env
*.log
*.tmp
.DS_Store
Thumbs.db

Note

If you are using Windows CMD, wrap the input string in quotes "" to avoid conflicts with folder creation symbols <>.


Feedback

I’m always happy to hear your feedback and suggestions for improving crt.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crtfiles-2.0.1.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crtfiles-2.0.1-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

Details for the file crtfiles-2.0.1.tar.gz.

File metadata

  • Download URL: crtfiles-2.0.1.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for crtfiles-2.0.1.tar.gz
Algorithm Hash digest
SHA256 d1ffe39836516b3c700c64c01b300ac0948fbae2d7407bdf7985f1fc4df7a9ef
MD5 0a7b3d138e8c5b1ab12f8dbd3206a050
BLAKE2b-256 25d0fef27e6b2fefc44ab77abd33ea556320bad0941195fa9e547fe695a51af2

See more details on using hashes here.

File details

Details for the file crtfiles-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: crtfiles-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for crtfiles-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 663ea4754d3debfa2835d5ed354a1b3eb3d45afbb98e57f83454cef27d13efa3
MD5 f1348f7bb17f2d38520c4297363bf1e6
BLAKE2b-256 87b38e4218136492b9113690ce65cca1dd4e112c0ede1526c28403ceaf30ec10

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page