11# Val Town CLI
22
3- ` vt ` is the official CLI to work with projects on the
4- [ Val Town] ( https://val.town ) platform.
5-
6- ![ Vt in action!] ( https://wolf-imagedumper.web.val.run/blob/blob_file_1744915159083_recording.gif )
3+ VT is a cli to work with Vals in the [ Val Town] ( https://val.town ) platform.
74
85```
96Usage: vt
10- Version: x .x.xx
7+ Version:x0 .x.xx
118
129Options:
1310
@@ -16,19 +13,19 @@ Options:
1613
1714Commands:
1815
19- clone [projectUri ] [targetDir] [branchName] - Clone a val town project
20- push - Push local changes to a val town project
21- pull - Pull the latest changes for a val town project
22- status - Show the working tree status
23- branch - List or delete branches
24- checkout [existingBranchName] - Check out a different branch
25- watch - Watch for changes and automatically sync with Val Town
26- browse - Open a project in a web browser
27- create <projectName > [targetDir] - Create a new Val Town project
28- remix <fromProjectUri > [newProjectName ] [targetDir] - Remix a Val Town project
29- config - Manage vt configuration
30- delete - Delete a Val Town project
31- list - List all your Val Town projects
16+ clone [valUri ] [targetDir] [branchName] - Clone a Val
17+ push - Push local changes to a Val
18+ pull - Pull the latest changes for the current Val
19+ status - Show the working tree status
20+ branch - List or delete branches
21+ checkout [existingBranchName] - Check out a different branch
22+ watch - Watch for changes and automatically sync with Val Town
23+ browse - Open a Val's main page in a web browser
24+ create <valName > [targetDir] - Create a new Val
25+ remix <fromValUri > [newValName ] [targetDir] - Remix a Val
26+ config - Manage vt configuration
27+ delete - Delete the current Val
28+ list - List all your Vals
3229```
3330
3431## Installation
@@ -50,10 +47,10 @@ To authenticate with `val.town`, just run `vt`, and you should get the dialog
5047```
5148Welcome to the Val Town CLI!
5249
53- VT is a companion CLI to interface with Val Town projects .
50+ VT is a companion CLI to interface with Val Town vals .
5451
5552 With this CLI, you can:
56- - Create and manage Val Town projects
53+ - Create and manage Val Town vals
5754 - Push and pull changes between your local system and Val Town
5855 - Watch a directory to keep it automatically synced with Val Town
5956 - And more!
@@ -63,12 +60,12 @@ Welcome to the Val Town CLI!
6360? Would you like to open val.town/settings/api in a browser to get an API key? (y/n) ›
6461```
6562
66- Respond yes, and ensure you select to create an API key with user read & project
63+ Respond yes, and ensure you select to create an API key with user read & val
6764read+write permissions.
6865
6966Alternatively, you can set the ` VAL_TOWN_API_KEY ` environment variable to
7067authenticate. Either as an environment variable, or place it in a .env in your
71- project .
68+ val .
7269
7370Now you can run ` vt ` again to confirm everything is working:
7471
@@ -83,24 +80,24 @@ vt x.x.xx
8380Let's walk through a complete workflow to get you familiar with the Val Town
8481CLI.
8582
86- First, let's remix a nice starting project .
83+ First, let's remix a nice starting val .
8784
8885``` bash
8986$ vt remix std/reactHonoStarter myNewWebsite
9087
91- √ Remixed " @std/reactHonoStarter" to public project " @you/myNewWebsite"
88+ √ Remixed " @std/reactHonoStarter" to public Val " @you/myNewWebsite"
9289
9390$ cd myNewWebsite
9491```
9592
96- ![ Your new project !] ( https://wolf-imagedumper.web.val.run/blob/blob_file_1744521935175_7f04c371-d619-4062-8bc6-941d56a23eed.png )
93+ ![ Your new val !] ( https://wolf-imagedumper.web.val.run/blob/blob_file_1744521935175_7f04c371-d619-4062-8bc6-941d56a23eed.png )
9794
98- Alternatively, you can use ` vt create ` to create a new empty project . If you
99- don't specify a path, the name of the project will automatically be used.
95+ Alternatively, you can use ` vt create ` to create a new empty val . If you don't
96+ specify a path, the name of the Val will automatically be used.
10097
101- When you ` remix ` , ` create ` , or ` clone ` a project , ` vt ` creates a ` .vt ` that
102- tracks your project metadata. You can think of this like ` .git ` , it is not meant
103- to be manually edited and is used for internal bookkeeping.
98+ When you ` remix ` , ` create ` , or ` clone ` a val , ` vt ` creates a ` .vt ` that tracks
99+ your Val metadata. You can think of this like ` .git ` , it is not meant to be
100+ manually edited and is used for internal bookkeeping.
104101
105102` vt ` also creates an ignore file, ` .vtignore ` , which works like ` .gitignore ` ,
106103and a ` deno.json ` . By having a ` deno.json ` , your editor will be able to make use
@@ -112,17 +109,17 @@ If you use some other editor, you'll want to head over to
112109[ Deno's editor set up] ( https://docs.deno.com/runtime/getting_started/setup_your_environment/ )
113110guide and find how to configure yours.
114111
115- If you use packages in your project , your editor may warn you that you do not
116- have those packages installed (or "cached"). Occasionally you'll want to run
117- ` deno cache . ` to make sure that all the libraries you use in your Val Town
118- project are installed locally.
112+ If you use packages in your val , your editor may warn you that you do not have
113+ those packages installed (or "cached"). Occasionally you'll want to run
114+ ` deno cache . ` to make sure that all the libraries you use in your Val Town val
115+ are installed locally.
119116
120117![ Making changes] ( https://wolf-imagedumper.web.val.run/blob/blob_file_1744522002151_95d9436e-9e8b-4361-880f-bf6d7e970741.png )
121118
122- Let's start editing our project ! Fire up your favorite editor, and then make a
119+ Let's start editing our val ! Fire up your favorite editor, and then make a
123120change to ` README.md ` .
124121
125- Now, let's upload this file to your project with ` vt push `
122+ Now, let's upload this file to your Val with ` vt push `
126123
127124``` bash
128125Pushed:
@@ -152,7 +149,7 @@ until you run `vt push`. If you don't want this behavior, then you can delete
152149them and add ` deno.json ` and ` .vtignore ` to the ` .vtignore ` (the ` .vtignore ` will
153150respect itself being ignored!).
154151
155- ![ Browse the project on the website] ( https://wolf-imagedumper.web.val.run/blob/blob_file_1744522722640_recording.gif )
152+ ![ Browse the Val on the website] ( https://wolf-imagedumper.web.val.run/blob/blob_file_1744522722640_recording.gif )
156153
157154Now run ` vt browse ` to see your file in the Val Town website UI. We advise you
158155use ` vt ` in conjunction with the Val Town website. The CLI can do a lot, but not
@@ -182,7 +179,7 @@ Changes pushed:
182179√ Successfully pushed local changes
183180```
184181
185- Now, if we return to our browser we can see that an http val has been created.
182+ Now, if we return to our browser we can see that an http Val has been created.
186183It's erroring, let's fix that. Write a simple handler to the file:
187184
188185``` ts
@@ -210,16 +207,15 @@ Oftentimes you'll end up in a workflow that looks like
2102074 . Repeat
211208
212209` vt ` 's solution to tightening this loop is ` vt watch ` . With ` vt watch ` , ` vt `
213- will automatically run ` vt push ` when any project files are modified
214- ** locally** .
210+ will automatically run ` vt push ` when any Val files are modified ** locally** .
215211
216212To get automatic website reloading, check out
217213[ this live reload middleware] ( https://www.val.town/x/stevekrouse/live-reload )
218214that works by polling Val Town for updates.
219215
220216### Branching Out
221217
222- One common Val Town project workflow is branching out. ` vt ` 's ` checkout ` and
218+ One common Val Town Val workflow is branching out. ` vt ` 's ` checkout ` and
223219` branch ` command work the same as ` git ` 's.
224220
225221- ` vt checkout <branchName> ` checks out the branch as it is on Val Town. You
@@ -234,8 +230,8 @@ One common Val Town project workflow is branching out. `vt`'s `checkout` and
234230
235231### Management
236232
237- - ` vt list ` lists all your Val Town projects
238- - ` vt delete ` deletes the current project of the folder you are in (with
233+ - ` vt list ` lists all your Val Town vals
234+ - ` vt delete ` deletes the current Val of the folder you are in (with
239235 confirmation).
240236
241237## Configuration
@@ -244,18 +240,18 @@ One common Val Town project workflow is branching out. `vt`'s `checkout` and
244240` <System Configuration Directory>/vt/config.yaml ` . Right now, this file only
245241stores your ` config.yaml ` , and some experimental options.
246242
247- This config can also be overridden locally for specific projects by, when you
248- are in a ` .vt ` directory, using ` vt config set [-g for global] ` (otherwise the
249- global config is modified). This can be useful if someone shares an API key with
250- you so you can collaborate on a project . You can view all configuration options
251- with ` vt config ` , and all the ones you've set with ` vt config get ` .
243+ This config can also be overridden locally for specific vals by, when you are in
244+ a ` .vt ` directory, using ` vt config set [-g for global] ` (otherwise the global
245+ config is modified). This can be useful if someone shares an API key with you so
246+ you can collaborate on a val . You can view all configuration options with
247+ ` vt config ` , and all the ones you've set with ` vt config get ` .
252248
253249Right now, we offer the following configuration options:
254250
255251- ` dangerousOperations.confirmation ` : Whether to do confirmations on actions
256252 that might cause you to lose local state, like ` vt pull ` .
257- - ` editorTemplate ` : The project URI for the editor files that you are prompted
258- about when you run a ` vt clone ` , ` vt remix ` , or ` vt create ` .
253+ - ` editorTemplate ` : The Val URI for the editor files that you are prompted about
254+ when you run a ` vt clone ` , ` vt remix ` , or ` vt create ` .
259255
260256## LLMs
261257
0 commit comments