Aidungeon.js
Edit AI Dungeon scenarios in your favorite editor and upload changes.
Install / Use
/learn @magicoflolis/Aidungeon.jsREADME
aidungeon.js
Edit AI Dungeon scenarios in your favorite editor and upload changes.
Features
- Build + minimize scenario scripts to local disk, default folder
./dist. - Update multiple scenarios.
- Supports common AI Dungeon GraphQL queries.
- Supports custom GraphQL queries.
Pre-requirements
- Node.js + basic understanding of Node.JS and
package.jsonworkspaces - Access to your Firebase token
Install
npm:
npm install aidungeon.js
pnpm:
pnpm add aidungeon.js
Getting Your Firebase Token
Tokens will expire after
xamount of time
DevTools (recommended):
- Open your web browsers DevTools,
Ctrl+Shift+I - Navigate to the
consoletab - Copy n paste the code below into the console and hit
Enter - The console will print:
AID_TOKEN="Your Token" - Repeat steps to refresh your token
(async () => {
return new Promise((resolve, reject) => {
if (typeof indexedDB !== 'undefined') {
const dbReq = indexedDB.open('firebaseLocalStorageDb');
dbReq.onerror = reject;
dbReq.onsuccess = (event) => {
const transaction = event.target.result.transaction(['firebaseLocalStorage'], 'readwrite');
const objectStore = transaction.objectStore('firebaseLocalStorage');
const allKeys = objectStore.getAllKeys();
allKeys.onerror = reject;
allKeys.onsuccess = (evt) => {
const key = evt.target.result.find((r) => r.includes('firebase:authUser:'));
objectStore.get(key).onsuccess = (evt) => {
const { value } = evt.target.result;
resolve(`AID_TOKEN="${value.stsTokenManager.accessToken}"`);
};
};
};
} else {
reject(new Error('indexedDB is not defined.'));
}
});
})()
.then(console.log)
.catch(console.error);
Bookmarklet (not recommended):
- Save this URL as a bookmark, clicking it will cause the file to inject itself into the current webpage.
- Does not work on all browsers
- Open your web browsers DevTools,
Ctrl+Shift+I - Navigate to the
consoletab - The console will print:
AID_TOKEN="Your Token" - Repeat steps to refresh your token
javascript:(function(){['https://cdn.jsdelivr.net/gh/magicoflolis/aidungeon.js@master/tests/browser.js'].map(s=>document.body.appendChild(document.createElement('script')).src=s)})();
Example Setup
See upload.js
TODO
- Add better examples
- Support custom queries
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
