Skip to main content

Package version Supported Python versions

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.

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.3.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.3-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: crtfiles-2.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 99c2df68e1e5e48fa573d3e906a5a3969ef0a893c45a0af39786c5bf7ad99e98
MD5 0ced3e17a5b1b1f23300c018d5ae098b
BLAKE2b-256 aa424dc3500c42d2634f9000b21d833ad6a4b3bcc20bf07dd9d9b840abf74bdf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: crtfiles-2.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 970d19c6a0e8e5a24677adf4818027975fd729cffe4bbab9dd7a7bdf6cb75a99
MD5 2853301f503d1d343dfefb1b99342f6f
BLAKE2b-256 76e708c540252a98f7e79f1002e125ccd0456e7dd6f1f72c87c67882000688fe

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.5

2 files

2.0.4

2 files

This release

2.0.3 This release

2 files

2.0.2

2 files

2.0.1

2 files

2.0

2 files

1.1.7

2 files

1.1.6

2 files

1.1.5

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1

2 files

1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page