mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-02-24 18:58:11 -05:00
31 lines
526 B
Markdown
31 lines
526 B
Markdown
---
|
|
name: JavaScript
|
|
index: 500
|
|
---
|
|
|
|
# JavaScript Client
|
|
|
|
For developers who want to extend the functionality of Spacedrive, this library allows easy development of [Extensions](), providing full access to Spacedrive's functionality.
|
|
|
|
### Installation
|
|
|
|
```shell
|
|
$ npm i @spacedrive/client
|
|
```
|
|
|
|
Initialize the Spacedrive client
|
|
|
|
```ts
|
|
import spacedrive from '@spacedrive/client';
|
|
|
|
spacedrive.start();
|
|
```
|
|
|
|
Add a location
|
|
|
|
```ts
|
|
const location = await spacedrive.location.create('/Users/jamie/Documents');
|
|
|
|
location.scan();
|
|
```
|