1HATCH-NEW(1)                     User Commands                    HATCH-NEW(1)
2
3
4

NAME

6       hatch new – Creates a new Python project
7

SYNOPSIS

9       hatch new [OPTIONS] [NAME]
10

DESCRIPTION

12       Creates a new Python project.
13
14       Values  from  your config file such as name and pyversions will be used
15       to help populate fields.  You can also specify things like  the  readme
16       format  and which CI service files to create.  All options override the
17       config file.
18
19       By default a virtual env will be created in the project  directory  and
20       will  install the project locally so any edits will auto-update the in‐
21       stallation.  You can also locally install the created project in  other
22       virtual envs using the --env option.
23

OPTIONS

25       -ne, --no-env
26              Disables the creation of a dedicated virtual env.
27
28       -py, --python TEXT
29              A  named  Python  path to use when creating a virtual env.  This
30              overrides --pypath.
31
32       -pp, --pypath TEXT
33              An absolute path to a Python executable to use when  creating  a
34              virtual env.
35
36       -g, --global-packages
37              Gives created virtual envs access to the global site- packages.
38
39       -e, --env TEXT
40              Forward-slash-separated  list  of  named  virtual envs to be in‐
41              stalled in.  Will create any that don’t already exist.
42
43       --basic
44              Disables third-party services and readme badges.
45
46       --cli  Creates a cli.py in the package directory and an entry point  in
47              setup.py  pointing to the properly named function within.  Also,
48              a  __main__.py  is  created   so   it   can   be   invoked   via
49              python -m pkg_name.
50
51       -l, --licenses TEXT
52              Comma-separated list of licenses to use.
53
54       -i, --interactive
55              Invokes interactive mode.
56
57       -h, --help
58              Show a help message and exit.
59

EXAMPLES

61       Here is an example using an unmodified config file:
62
63              $ hatch new my-app
64              Created project `my-app` here
65              $ tree --dirsfirst my-app
66              my-app
67              ├── my_app
68              │   └── __init__.py
69              ├── tests
70              │   └── __init__.py
71              ├── LICENSE-APACHE
72              ├── LICENSE-MIT
73              ├── MANIFEST.in
74              ├── README.rst
75              ├── requirements.txt
76              ├── setup.py
77              └── tox.ini
78
79              2 directories, 8 files
80

SEE ALSO

82       tree(1)
83
84       hatch(1)
85
86       hatch-build(1),    hatch-clean(1),   hatch-conda(1),   hatch-config(1),
87       hatch-env(1), hatch-grow(1), hatch-init(1), hatch-install(1), hatch-py‐
88       path(1),      hatch-python(1),     hatch-release(1),     hatch-shed(1),
89       hatch-shell(1), hatch-test(1), hatch-uninstall(1), hatch-update(1)
90
91
92
93                                 Feburary 2022                    HATCH-NEW(1)
Impressum