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

Uploaded Python 3

File details

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

File metadata

  • Download URL: crtfiles-2.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 eeb378f35c7f257f06dd654e198679f3db140ea9183400793a20bcbba035fae8
MD5 186c5974af0ac01ed38ca852059ddb0a
BLAKE2b-256 398b5d907a88c3cea5265489b57f3c401d1e6725c405f608ff5f76c11b40efd8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: crtfiles-2.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8ea817ceee2c810b942aed1a91acd88eedb9c901e7c6544c2a05a45f3001bd35
MD5 dae17818f86c8a039247bed6a80e967f
BLAKE2b-256 8a7c29168e557de6be9fa464ef0a643ff63208465fdc842ed7c5aeeff2979229

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.5

2 files

This release

2.0.4 This release

2 files

2.0.3

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