or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

configuration.mdfile-listing.mdfile-management.mdfile-transfer.mdhash-operations.mdindex.mdpublic-links.mdremote-management.md

remote-management.mddocs/

0

# Remote Management

1

2

Functions for creating, configuring, and managing cloud storage remotes. Supports OAuth authentication, custom configuration options, and comprehensive remote validation across 70+ cloud storage providers.

3

4

## Capabilities

5

6

### Remote Creation

7

8

Create new remotes with OAuth authentication and custom configuration options for any supported cloud storage provider.

9

10

```python { .api }

11

def create_remote(remote_name: str, remote_type: Union[str, RemoteTypes],

12

client_id: Union[str, None] = None, client_secret: Union[str, None] = None, **kwargs):

13

"""

14

Creates a new rclone remote with name, type, and configuration options.

15

16

Parameters:

17

- remote_name (str): Name for the new remote (must be unique)

18

- remote_type (Union[str, RemoteTypes]): Cloud provider type (e.g., "onedrive", RemoteTypes.dropbox)

19

- client_id (str, optional): OAuth Client ID for custom authentication

20

- client_secret (str, optional): OAuth Client Secret for custom authentication

21

- **kwargs: Additional key-value pairs for rclone config create command

22

23

Returns:

24

None

25

26

Raises:

27

Exception: If remote with same name already exists

28

RcloneException: If remote creation fails

29

"""

30

```

31

32

### Remote Listing

33

34

List all configured remotes and check for specific remote existence.

35

36

```python { .api }

37

def get_remotes() -> List[str]:

38

"""

39

Retrieves list of all configured rclone remotes.

40

41

Returns:

42

List[str]: List of remote names with trailing colons (e.g., ['onedrive:', 'box:'])

43

"""

44

45

def check_remote_existing(remote_name: str) -> bool:

46

"""

47

Checks if a specific rclone remote is configured.

48

49

Parameters:

50

- remote_name (str): Name of remote to check (with or without trailing ':')

51

52

Returns:

53

bool: True if remote exists, False otherwise

54

"""

55

```

56

57

## Usage Examples

58

59

### Basic Remote Creation

60

61

```python

62

from rclone_python import rclone

63

from rclone_python.remote_types import RemoteTypes

64

65

# Create OneDrive remote with default OAuth

66

rclone.create_remote('onedrive', RemoteTypes.onedrive)

67

68

# Create Dropbox remote using string type

69

rclone.create_remote('dropbox', 'dropbox')

70

71

# Check if remote was created

72

if rclone.check_remote_existing('onedrive'):

73

print("OneDrive remote successfully created")

74

```

75

76

### Custom OAuth Credentials

77

78

```python

79

from rclone_python import rclone

80

from rclone_python.remote_types import RemoteTypes

81

82

# Create remote with custom OAuth credentials

83

rclone.create_remote(

84

'my_onedrive',

85

RemoteTypes.onedrive,

86

client_id='your_client_id_here',

87

client_secret='your_client_secret_here'

88

)

89

```

90

91

### Advanced Remote Configuration

92

93

```python

94

from rclone_python import rclone

95

from rclone_python.remote_types import RemoteTypes

96

97

# Create S3 remote with additional configuration

98

rclone.create_remote(

99

'aws_s3',

100

RemoteTypes.s3,

101

access_key_id='your_access_key',

102

secret_access_key='your_secret_key',

103

region='us-west-2',

104

provider='AWS'

105

)

106

107

# Create SFTP remote with authentication

108

rclone.create_remote(

109

'my_server',

110

RemoteTypes.sftp,

111

host='server.example.com',

112

user='username',

113

port='22',

114

key_file='/path/to/private/key'

115

)

116

```

117

118

### Remote Management Workflow

119

120

```python

121

from rclone_python import rclone

122

from rclone_python.remote_types import RemoteTypes

123

124

# List all existing remotes

125

existing_remotes = rclone.get_remotes()

126

print(f"Configured remotes: {existing_remotes}")

127

128

# Check before creating to avoid conflicts

129

remote_name = 'my_drive'

130

if not rclone.check_remote_existing(remote_name):

131

rclone.create_remote(remote_name, RemoteTypes.drive)

132

print(f"Created new remote: {remote_name}")

133

else:

134

print(f"Remote {remote_name} already exists")

135

136

# Verify creation

137

updated_remotes = rclone.get_remotes()

138

print(f"Updated remotes: {updated_remotes}")

139

```

140

141

## Supported Remote Types

142

143

The RemoteTypes enum includes 72 different cloud storage providers:

144

145

### Major Cloud Providers

146

- **onedrive**: Microsoft OneDrive

147

- **drive**: Google Drive

148

- **dropbox**: Dropbox

149

- **box**: Box

150

- **s3**: Amazon S3

151

- **azureblob**: Azure Blob Storage

152

- **azurefiles**: Azure Files

153

154

### Storage Systems

155

- **local**: Local filesystem

156

- **sftp**: SFTP servers

157

- **ftp**: FTP servers

158

- **webdav**: WebDAV servers

159

- **smb**: SMB/CIFS shares

160

161

### Specialized Providers

162

- **b2**: Backblaze B2

163

- **mega**: MEGA

164

- **pcloud**: pCloud

165

- **koofr**: Koofr

166

- **yandex**: Yandex Disk

167

- **mailru**: Mail.ru Cloud

168

169

### And 50+ Additional Providers

170

Including enterprise storage, backup services, file hosting platforms, and specialized cloud storage solutions.

171

172

## Configuration Options

173

174

Different remote types support various configuration parameters:

175

176

### OAuth-based Providers (OneDrive, Google Drive, Dropbox)

177

- `client_id`: Custom OAuth application ID

178

- `client_secret`: Custom OAuth application secret

179

- `token`: Pre-obtained OAuth token (advanced)

180

181

### S3-compatible Providers

182

- `access_key_id`: Access key for authentication

183

- `secret_access_key`: Secret key for authentication

184

- `region`: Storage region

185

- `endpoint`: Custom S3 endpoint URL

186

- `provider`: Specific S3 provider (AWS, Minio, etc.)

187

188

### SFTP/FTP Providers

189

- `host`: Server hostname or IP

190

- `user`: Username for authentication

191

- `port`: Connection port

192

- `key_file`: Path to SSH private key

193

- `password`: Password authentication

194

195

### Enterprise Systems

196

- Custom authentication parameters

197

- SSL/TLS configuration

198

- Proxy settings

199

- Advanced connection options