mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-20 09:14:22 +01:00
ignore: python sdk (#2779)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
This commit is contained in:
22
packages/sdk/python/docs/usage/files_projects.md
Normal file
22
packages/sdk/python/docs/usage/files_projects.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Files & Projects
|
||||
|
||||
Access file status and project information.
|
||||
|
||||
```python
|
||||
from opencode_ai import OpenCodeClient
|
||||
|
||||
client = OpenCodeClient()
|
||||
|
||||
# Projects
|
||||
for p in client.list_projects() or []:
|
||||
print(p.id, p.directory)
|
||||
|
||||
# Current path
|
||||
pinfo = client.get_path()
|
||||
print(pinfo.directory)
|
||||
|
||||
# File status
|
||||
files = client.file_status() or []
|
||||
for f in files:
|
||||
print(f.path, f.type)
|
||||
```
|
||||
Reference in New Issue
Block a user