@opentusk/cli
v0.6.3
Published
CLI for [OpenTusk](https://opentusk.ai) decentralized storage. Upload, download, and manage files from the terminal. Includes a built-in MCP server for AI agent integration.
Readme
@opentusk/cli
CLI for OpenTusk decentralized storage. Upload, download, and manage files from the terminal. Includes a built-in MCP server for AI agent integration.
Install
npm install -g @opentusk/cliAuthentication
# Login with email/password
opentusk auth login
# Or use an API key
opentusk auth set-key otk_...Usage
# Vaults
opentusk vault list
opentusk vault create my-vault --visibility public
# Files
opentusk upload ./photo.jpg --vault my-vault
opentusk download <fileId> -o ./photo.jpg
opentusk file list --vault my-vault
# Folders
opentusk folder create --vault my-vault --name docs
opentusk folder list --vault my-vault
# Trash
opentusk trash list
opentusk trash restore <itemId>
# Webhooks
opentusk webhook create https://example.com/hook --events file.uploaded file.synced
opentusk webhook list
# Account
opentusk account infoShared Vaults
Shared vaults use SEAL on-chain encryption. Members are managed by Sui address:
# Link your Sui wallet
opentusk sui setup suiprivkey1...
# Create a shared vault (requires connected wallet)
opentusk vault create team-docs --visibility shared
# Grant/revoke access
opentusk vault grant <vaultId> --address 0x...
opentusk vault revoke <vaultId> --member <memberId>
opentusk vault members <vaultId>MCP Server (AI Agent Integration)
The CLI includes a built-in MCP server that lets AI agents (Claude Code, Claude Desktop, Cursor) interact with OpenTusk storage directly.
# Start the MCP server
opentusk mcp serve
# Install config for your agent
opentusk mcp install-config # Claude Code (.mcp.json)
opentusk mcp install-config --target desktop # Claude Desktop
opentusk mcp install-config --target cursor # CursorThe MCP server exposes 29 tools covering vaults, files, folders, trash, shared vault membership, and account management. AI agents can upload, download, read, and organize files without filesystem access.
Agent Configuration
{
"mcpServers": {
"opentusk": {
"command": "opentusk",
"args": ["mcp", "serve"],
"env": {
"OPENTUSK_API_KEY": "otk_...",
"OPENTUSK_SUI_PRIVATE_KEY": "suiprivkey1..."
}
}
}
}Disaster Recovery
Export file metadata and encryption keys for offline recovery:
# Export manifest with Walrus blob IDs and wrapped keys
opentusk export -o backup.json
# Decrypt files offline (no API needed)
opentusk decrypt file.enc --export backup.json -o file.txtFiles can be recovered directly from the Walrus network using the blob IDs in the export manifest, without any dependency on the OpenTusk API.
Global Options
| Option | Description |
|--------|-------------|
| --api-key <key> | Override API key |
| --api-url <url> | Override API URL |
| --format <fmt> | Output format: table, json, plain |
| --quiet | Suppress non-essential output |
| --verbose | Show debug output |
| --no-color | Disable colored output |
