Getting Started¶
This guide will help you get up and running with Nexus quickly.
Installation¶
# Install from PyPI
pip install nexus-ai-fs
# Install with all optional dependencies
pip install nexus-ai-fs[all]
# Install specific features
pip install nexus-ai-fs[postgres] # PostgreSQL support
pip install nexus-ai-fs[semantic-search] # Vector search
Quick Start¶
import nexus
# Connect to Nexus (auto-creates database)
nx = nexus.connect(config={"data_dir": "./nexus-data"})
# Write a file
nx.write("/documents/hello.txt", b"Hello, Nexus!")
# Read a file
content = nx.read("/documents/hello.txt")
print(content.decode()) # "Hello, Nexus!"
# List files
files = nx.list()
print(files) # ['/documents/hello.txt']
# Delete a file
nx.delete("/documents/hello.txt")
# Close connection
nx.close()
Context Manager¶
import nexus
with nexus.connect(config={"data_dir": "./nexus-data"}) as nx:
nx.write("/file.txt", b"content")
content = nx.read("/file.txt")
# Automatically closed
See Also¶
- Core API - Connection and configuration details
- File Operations - Complete file operation reference
- Configuration - Advanced configuration options
- CLI Reference - Command-line interface
Next Steps¶
- Learn about core connection options
- Explore file operations
- Set up permissions and access control
- Try workspace snapshots for version control