You could use arangosh command (more) and list all collections in a database using db._collections(). Then you can run a query that goes through every document in a collection and gets its ATTRIBUTES (source).
Example bash script:
#!/bin/bash
read -p "Database: " DATABASE
read -p "Username: " USERNAME
read -s -p "Password: " PASSWORD
echo
ARANGOSH_SCRIPT=$(cat <<-END
const getAttributes = (collection) => db._query(\`
FOR rec IN \${collection}
FOR attr IN ATTRIBUTES(rec)
RETURN DISTINCT attr
\`).toArray();
db._collections().forEach((collection) => {
if (collection.properties().isSystem) {
// ignore system collections
return;
}
const collectionName = collection.name();
print(\`\${collectionName}: \${JSON.stringify(getAttributes(collectionName))}\`);
});
END
)
arangosh --server.database "$DATABASE" \
--server.username "$USERNAME" \
--server.password "$PASSWORD" \
--javascript.execute-string "$ARANGOSH_SCRIPT"