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
letstry is a powerful tool designed to provide temporary work-spaces for developers, built in Golang. It allows you to quickly create new projects, save them as templates, and export them to a more permanent location.
6
+
**letstry** is a lightweight yet powerful tool designed to give developers **templated workspaces** directly within their preferred IDE. Written in Go, it lets you spin up new projects quickly, save them as templates, and export them to a permanent location—**all from your VSCode terminal.**
7
7
8
8
## Index
9
9
10
10
-[Installation](#installation)
11
11
-[Usage](#usage)
12
-
-[Create a new session](#creating-a-new-session)
12
+
-[Configuration](#configuration)
13
+
-[Create a new session or project](#creating-a-new-session-or-project)
13
14
-[Export a session](#exporting-a-session)
14
15
-[List active sessions](#listing-active-sessions)
15
16
-[Managing Templates](#managing-templates)
16
-
-[Configuration](#configuration)
17
17
-[Contributing](#contributing)
18
18
-[Development](#development)
19
19
20
20
## Installation
21
21
22
-
Letstry requires Go to be installed on your system. If you do not have Go installed, you can download it from the [official website](https://golang.org/dl/).
22
+
**letstry** requires Go to be installed on your system. If you do not have Go installed, you can download it from the [official website](https://golang.org/dl/).
23
23
24
24
Once Go is installed, to install letstry, run the following command:
> You can retrieve the path to the config file using the `lt path config` command. By default, the configuration is stored in `~/.letstry/config.json`.
51
+
52
+
By default, letstry is set-up as a **temporary workspace manager**. This means calls to `lt new` will result in a temporary workspace being created in your systems temporary directory that will be deleted once it's associated editor window is closed. This behavior can be customized using the `projects_path` and `require_export` configuration fields.
53
+
54
+
**Windows Config Example**
55
+
56
+
```jsonc
57
+
{
58
+
// Projects Path
59
+
//
60
+
// The path in which to store projects. By default, letstry
61
+
// will use a temporary directory.
62
+
//
63
+
// If no projects path is set, `require_export` will be
64
+
// forcibly enabled. This is the default behavior.
65
+
"projects_path":"",
66
+
67
+
// Require Export
68
+
//
69
+
// When true: New projects will be created as letstry sessions.
70
+
// These sessions will be automatically deleted once
71
+
// the editor window is closed.
72
+
//
73
+
// When false: New projects will be stored in `projects_path`
74
+
// and will be persisted after the editor window
75
+
// is closed. No letstry session will be created.
76
+
//
77
+
// You can force `require_export` by passing `--temp` to `lt new`.
78
+
"require_export":true,
79
+
80
+
// Default Editor
81
+
//
82
+
// The default editor to use for new sessions/projects.
83
+
"default_editor":"vscode",
84
+
85
+
// Editors
86
+
//
87
+
// Available editors for new sessions/projects.
88
+
"editors": [
89
+
{
90
+
"name":"vscode",
91
+
"run_type":"run",
92
+
"path":"C:\\Users\\natef\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe",
93
+
"args":"-n",
94
+
"process_capture_delay":2000000000,
95
+
"tracking_type":"file_access"
96
+
}
97
+
]
98
+
}
99
+
```
48
100
49
-
Creating a new session with letstry is simple and efficient. Use the `lt new` command to initialize a temporary project directory and open it in the default editor. This allows for quick prototyping. If you like the results, you can export the session to a more permanent location or save it as a template.
101
+
### Creating a new Session or Project
102
+
103
+
Creating a new session or project with letstry is simple and efficient. Use the `lt new` command to initialize a new project or session and open it in the default editor.
50
104
51
105
```sh
52
106
$ lt new
53
107
```
54
108
55
-
If the VSCode window is closed, the temporary directory will be deleted. Therefore, you should either export your project using `lt export <path>` or save it as a template using `lt save <template-name>`.
109
+
> [!IMPORTANT]
110
+
> If `require_export` is enabled in your configuration or if you have not set a custom `projects_path`, when the VSCode window is closed the sessions temporary directory will be deleted. This is the default behavior for letstry. Therefore, you should either export your project using `lt export <path>` or save it as a template using `lt save <template-name>` (these commands must be run from within the sessions directory.)
56
111
57
112
Lets try sessions can be created from a directory path, a git repository URL, or a template name.
58
113
@@ -124,31 +179,6 @@ To delete a template, use the `lt delete` command.
124
179
$ lt delete <template-name>
125
180
```
126
181
127
-
## Configuration
128
-
129
-
letstry can be configured using a configuration file. The configuration file is located at `~/.letstry/config.json`.
130
-
131
-
The config file allows you to specify different editors if you do not use VSCode.
132
-
133
-
**Windows Config Example**
134
-
135
-
`~/.letstry/config.json`
136
-
```json
137
-
{
138
-
"default_editor": "vscode",
139
-
"editors": [
140
-
{
141
-
"name": "vscode",
142
-
"run_type": "run",
143
-
"path": "C:\\Users\\natef\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe",
144
-
"args": "-n",
145
-
"process_capture_delay": 2000000000,
146
-
"tracking_type": "file_access"
147
-
}
148
-
]
149
-
}
150
-
```
151
-
152
182
## Contributing
153
183
154
184
We welcome contributions to improve letstry. If you have suggestions or bug reports, please open an issue or submit a pull request.
ShortDescription: "a powerful tool for creating temporary workspaces",
83
-
Description: cli.MainName() +" provides a temporary workspace for you to work in, and then destroys it when you are done.",
83
+
ShortDescription: "a lightweight tool designed to give developers templated workspaces",
84
+
Description: cli.MainName() +" is a lightweight yet powerful tool designed to give developers templated workspaces directly within their preferred IDE. Letting you spin up new projects quickly, save them as templates, and export them to a permanent location—all from your IDEs integrated terminal.",
ShortDescription: "Displays paths relevant to LetsTry",
16
+
Description: "Useful for locating your LetsTry config file, your LetsTry session cache file, or the directory in which LetsTry stores new sessions and projects.",
17
+
Arguments: []cli.Argument{
18
+
{
19
+
Name: "file",
20
+
Description: "Can be one of config, projects or sessions. Defaults to \"config\".",
println("require-export enabled, all projects will be stored in a temporary directory and deleted once their corresponding session is terminated.")
44
+
returnnil
45
+
}
46
+
47
+
ifpath=="" {
48
+
println("project-path: custom projects_path not set, all projects will be stored in a temporary directory and deleted once their corresponding session is terminated.")
Copy file name to clipboardExpand all lines: internal/application/commands/sessions/cmd.new-session.go
+22-6Lines changed: 22 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -13,20 +13,31 @@ import (
13
13
funcNewSessionCommand() cli.Command {
14
14
return cli.Command{
15
15
Name: commands.CommandNewSession.String(),
16
-
ShortDescription: "Create a new session",
17
-
Description: "Create a new session using the specified source.",
16
+
ShortDescription: "Create a new session or project",
17
+
Description: "Create a new session or project using the specified source.",
18
18
Arguments: []cli.Argument{
19
19
{
20
20
Name: "source",
21
-
Description: "The source to use for the new session. Can be a git repository URL, a path to a directory, or the name of a letstry template.\n\nIf source is not provided, the session will be created from a blank source.",
21
+
Description: "The source to use for the new session or project. Can be a git repository URL, a path to a directory, or the name of a letstry template.\n\nIf source is not provided, the session will be created from a blank source.",
22
+
},
23
+
{
24
+
Name: "--temp",
25
+
Description: "When set, session will be forcibly stored in a temporary location. This overrides the \"Require Export\" field in your config file.",
0 commit comments