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
Copy file name to clipboardExpand all lines: docs/features/goal.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,16 +79,19 @@ $ ~ algokit goal
79
79
```
80
80
81
81
## Working with Files in the Container
82
+
82
83
When interacting with the container, especially if you're using tools like goal, you might need to reference files or directories. Here's how to efficiently deal with files and directories:
83
84
84
85
### Automatic File Mounting
86
+
85
87
When you specify a file or directory path in your `goal` command, the system will automatically mount that path from your local filesystem into the container. This way, you don't need to copy files manually each time.
86
88
87
89
For instance, if you want to compile a `teal` file:
Here, `/Path/to/inputfile/approval.teal` and `/Path/to/outputfile/approval.compiled` are paths on your local file system, and they will be automatically accessible to the `goal` command inside the container.
93
96
94
97
### Manual Copying of Files
@@ -98,6 +101,7 @@ In case you want to manually copy files into the container, you can do so using
98
101
```
99
102
docker cp foo.txt algokit_algod:/root
100
103
```
104
+
101
105
This command copies the `foo.txt` from your local system into the root directory of the `algokit_algod` container.
102
106
103
107
Note: Manual copying is optional and generally only necessary if you have specific reasons for doing so since the system will auto-mount paths specified in commands.
@@ -106,7 +110,7 @@ Note: Manual copying is optional and generally only necessary if you have specif
106
110
107
111
If you want to run multiple commands or interact with the filesystem you can execute `algokit goal --console`. This will open a [Bash](https://www.gnu.org/software/bash/) shell session on the `algod` Docker container and from there you can execute goal directly, e.g.:
108
112
109
-
```
113
+
```bash
110
114
$ algokit goal --console
111
115
Opening Bash console on the algod node; execute `exit` to return to original console
112
116
root@82d41336608a:~# goal account list
@@ -115,4 +119,21 @@ root@82d41336608a:~# goal account list
Some `goal` commands require interactive input from the user. By default, AlgoKit will attempt to run commands in non-interactive mode first, and automatically switch to interactive mode if needed. You can force a command to run in interactive mode by using the `--interactive` flag:
125
+
126
+
```bash
127
+
$ algokit goal --interactive wallet new algodev
128
+
Please choose a password for wallet 'algodev':
129
+
Please confirm the password:
130
+
Creating wallet...
131
+
Created wallet 'algodev'
132
+
Your new wallet has a backup phrase that can be used for recovery.
133
+
Keeping this backup phrase safe is extremely important.
134
+
Would you like to see it now? (Y/n): n
135
+
```
136
+
137
+
This is particularly useful when you know a command will require user input, such as creating new accounts, importing keys, or signing transactions.
138
+
118
139
For more details about the `AlgoKit goal` command, please refer to the [AlgoKit CLI reference documentation](../cli/index.md#goal).
0 commit comments