This guide gets a new client from installation to reading and searching Drive files.
Latest release:
curl -fsSL https://raw.githubusercontent.com/diskd-ai/diskd-cli/main/install.sh | shPinned release:
curl -fsSL https://raw.githubusercontent.com/diskd-ai/diskd-cli/main/install.sh | DISKD_VERSION=v0.1.5 shConfirm the binary:
diskd versionUse JSON output by placing --json before the subcommand:
diskd --json versionUpdate later:
diskd updateBrowser login:
diskd loginThis opens https://app.iosya.com/oauth-apps. Use diskd login --dev for
https://app.upgraide.dev/oauth-apps.
For an already-issued bearer token:
export APIS_BASE_URL="https://apis.iosya.com"
diskd login --token "$APIS_ACCESS_TOKEN"For a CI or service-client credential file:
diskd login --credentials-file ./credentials.jsonThe credential file format is:
{
"issuer": "https://auth.example",
"clientId": "client-id",
"clientSecret": "client-secret",
"audience": "diskd-api",
"apisUrl": "https://apis.iosya.com"
}diskd stores only the returned bearer token in $DISKD_HOME/credentials.
diskd --json whoamiThe output includes workspace and subject metadata decoded from the token. It does not print the token.
List accessible projects:
diskd --json set-context --listSet the current context by project name or id:
diskd set-context "Project Name"Check the current context:
diskd get-contextClear the project context and return to the workspace root:
diskd set-context --rootprintf 'hello diskd\n' > note.txt
diskd mkdir notes
diskd upload ./note.txt --dest notes --force
diskd ls notes
diskd cat notes/note.txtExact or BM25 search:
diskd --json grep "hello diskd" notesSemantic search:
diskd --json vsearch "greeting note" notes/note.txt --top 5For semantic search, a specific file path is more reliable than a directory path when the Drive backend has not expanded directory inodes for vector search.
printf 'name,amount\nalpha,10\nbeta,20\n' > table.csv
diskd upload ./table.csv --dest notes --force
diskd --json biquery "what is the total amount?" notes/table.csv
diskd --json biquery "total amount grouped by name" notes/table.csvbiquery takes a natural-language question. Drive reads the spreadsheet schema,
generates SQL internally, and returns the result table.
Generic Drive DB:
diskd --json database query generic-db "SELECT id, text FROM messages LIMIT 20"Typed Telegram Drive DB through the generic API:
diskd --json database query team-chat "SELECT id, text FROM messages LIMIT 20" --db-type telegramTelegram-specific shortcut:
diskd --json telegram-db query team-chat "SELECT id, text FROM messages LIMIT 20"Use database create, insert, commit, rollback, metadata, drop, and
resolver commands for generic Drive DBs. Use telegram-db create, insert,
commit, metadata, and drop for Telegram SQLite DB shortcuts.