You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`psyflow` includes a command-line interface (CLI) to streamline your project setup. The CLI helps you create a new task with a standardized and recommended project structure, so you can get to the science faster.
3
+
`psyflow-init` is the command-line interface (CLI) entrypoint for scaffolding new PsychoPy experiments using the built‑in template. It uses Cookiecutter under the hood to generate a standardized project layout, so you can focus on your task logic rather than boilerplate.
4
4
5
-
## Creating a New Project with `psyflow-init`
5
+
Key benefits:
6
6
7
-
The primary command is `psyflow-init`, which scaffolds a new project directory for you.
7
+
-**Standardization**: Enforce a consistent folder structure across all experiments
8
+
-**Rapid setup**: Create a full project scaffold with one command
9
+
-**Flexible modes**: Support both new-directory and in-place initialization
8
10
9
-
### Basic Usage
11
+
##Quick Reference
10
12
11
-
To create a new project, open your terminal, navigate to the directory where you want to create your project, and run:
|`psyflow-init <name>`| Create a new folder `<name>` with project files |`psyflow-init my-new-task`|
16
+
|`psyflow-init` (no argument) | Initialize current directory in-place |`cd existing && psyflow-init`|
17
+
18
+
## 1. Creating a New Project
19
+
20
+
To start from scratch, navigate to the parent directory and run:
12
21
13
22
```bash
14
23
psyflow-init my-new-task
15
24
```
16
25
17
-
This command will create a new folder named `my-new-task` inside your current directory. This new folder contains all the necessary files and subdirectories to start your experiment.
18
-
19
-
### Project Structure
20
-
21
-
After running the command, you will see the following structure:
26
+
This will create a new folder `my-new-task/` containing all the necessary files and subdirectories:
22
27
23
28
```
24
29
my-new-task/
25
30
├── main.py
26
-
├── meta.json
27
31
├── README.md
28
32
├── assets/
29
33
├── config/
@@ -35,16 +39,34 @@ my-new-task/
35
39
└── utils.py
36
40
```
37
41
38
-
This structure helps organize your code, configuration, and data from the very beginning.
42
+
## 2. In‑Place Initialization
39
43
40
-
### In-Place Initialization
41
-
42
-
Sometimes, you might have already created a directory for your project and want to initialize it with the `psyflow` structure. You can do this by running `psyflow-init` without any arguments inside that directory:
44
+
If you already have (or have just created) an empty directory and wish to populate it with the `psyflow` scaffold, run the command without any arguments:
43
45
44
46
```bash
45
-
mkdir my-existing-folder
46
-
cd my-existing-folder
47
+
mkdir my-existing-project
48
+
cd my-existing-project
47
49
psyflow-init
48
50
```
49
51
50
-
This will populate the `my-existing-folder` with the same project structure without creating a new subdirectory. This is useful for integrating `psyflow` into an existing project structure.
52
+
Before copying template files, the CLI checks for existing files or folders with the same names. If any conflicts are found, you will be prompted:
0 commit comments