Skip to content

Commit a891f6c

Browse files
committed
Enhance examples
1 parent 86f1666 commit a891f6c

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

docs/toolhive/guides-cli/filesystem-access.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,20 @@ thv run --permission-profile ./file-permissions.json <SERVER>
115115
For more details on permission profiles and network permissions, see
116116
[custom permissions](./custom-permissions.mdx).
117117

118+
### Combining with built-in network profiles
119+
120+
You can also combine the `--volume` flag with built-in network profiles for a
121+
flexible approach that doesn't require creating a custom profile file. For
122+
example, to run the `aws-diagram` server with no network access and file system
123+
write access:
124+
125+
```bash
126+
thv run --isolate-network --permission-profile none --volume /home/user/aws-diagrams:/tmp/generated-diagrams aws-diagram
127+
```
128+
129+
This approach is useful when you need simple file system access combined with
130+
standard network restrictions.
131+
118132
## Troubleshooting
119133

120134
<details>

docs/toolhive/guides-cli/network-isolation.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,18 @@ Run the server with this combined profile:
231231
thv run --isolate-network --permission-profile ./aws-diagram-profile.json aws-diagram
232232
```
233233

234+
### Alternative: Using built-in profiles with volume mounts
235+
236+
You can achieve the same result without creating a custom profile file by using
237+
the built-in `none` profile and the `--volume` flag:
238+
239+
```bash
240+
thv run --isolate-network --permission-profile none --volume /home/user/aws-diagrams:/tmp/generated-diagrams aws-diagram
241+
```
242+
243+
This approach is more flexible since you can easily change the host directory
244+
without editing a profile file.
245+
234246
## Troubleshooting
235247

236248
<details>

0 commit comments

Comments
 (0)