Skip to content

Commit 6270315

Browse files
committed
docs: add file synchronization section to README
1 parent e4e2e74 commit 6270315

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,44 @@ for chunk in response:
187187
yield chunk
188188
```
189189

190+
## File Synchronization
191+
192+
Humanloop allows you to clone files from your Humanloop workspace to your local filesystem using the CLI.
193+
194+
```bash
195+
# Pull all files
196+
humanloop pull
197+
198+
# Pull from a directory
199+
humanloop pull --path="examples/chat"
200+
201+
# Pull a specific file
202+
humanloop pull --path="examples/chat/basic.prompt"
203+
204+
# Pull versions deployed to specific environment
205+
humanloop pull --environment="production"
206+
```
207+
208+
To use local files in your code:
209+
210+
```python
211+
# Enable local file support
212+
client = Humanloop(
213+
api_key="YOUR_API_KEY",
214+
use_local_files=True
215+
)
216+
217+
# Use a local prompt file
218+
response = client.prompts.call(
219+
path="examples/chat/basic", # No file extension needed
220+
inputs={"query": "Hello world"}
221+
)
222+
```
223+
224+
For detailed instructions on syncing, see our [Guide to Syncing and Using Local Files](https://humanloop.com/docs/v5/guides/propmts/syncing-local-files).
225+
226+
For information about the `.prompt` and `.agent` file formats, see our [File Format Reference](https://humanloop.com/docs/v5/reference/prompt-and-agent-files).
227+
190228
## Pagination
191229

192230
Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used as generators for the underlying object.

0 commit comments

Comments
 (0)