mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-30 05:29:53 +00:00
ignore: python sdk (#2779)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
This commit is contained in:
parent
fc8db6cdf9
commit
0e60f66604
229 changed files with 22322 additions and 8 deletions
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)
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue