Glitch.js
An unoffical wrapper for the glitch.com
Install / Use
/learn @Zaedus/Glitch.jsREADME
glitchapi.js
⚠️ Important Information ⚠️
Do not store insecurely or share the persitent token or the temporary login code. As far as I know, Glitch does not refresh the token in anyway or the login code. The only way to refresh the login code is by requesting a new one.
Doing so puts your account at risk and potentially your private information.
Install
npm install glitchapi.js
General Examples
Get Project By ID or Name
const Glitch = require('glitchapi.js');
(async () => {
// Get project by domain name
console.log(await Glitch.getProject("domain", "stay-safe-discord"));
// Get project by id
console.log(await Glitch.getProject("id", "e292e1a7-9130-4150-abd3-90b893a95858"));
})()
Get User by ID or Login/@
const Glitch = require('glitchapi.js');
(async () => {
// Get project by domain name
console.log(await Glitch.getUser("login", "Zaedus"));
// Get project by id
console.log(await Glitch.getUser("id", 2643102));
})()
Logged in User Examples
Getting a login token
const Glitch = require('glitchapi.js');
Glitch.emailTempCode("youremail@gmail.com");
Check your email and you will find your code.

MAKE SURE YOU STORE IT SECURELY
Logging in
Creates a Me instance.
const Glitch = require('glitchapi.js');
const me = new Glitch.Me();
me.on("ready", () => {
console.log(`${me.name} (@${me.login})`) // Zaedus (@Zaedus)
})
me.signin("your-code-here")
Setting User Data
Sets various attributes about the user's account like the name, @, and description.
const Glitch = require('glitchapi.js');
const me = new Glitch.Me();
me.on("ready", async () => {
await me.update({
avatarUrl: "https://i.ytimg.com/vi/YBXLVex9FtQ/maxresdefault.jpg", // Must be an online URL
description: "This discription was set with API!", // Sets your description
hasCoverImage: true, // Shows or hides the background image
name: "MyNewName", // Sets your display name
login: "MyNewAt" // Sets your @
})
console.log("User data updated!");
})
me.signin("your-code-here")
Creating a Project
Creates a new projects called "my-new-express-app".
const Glitch = require('glitchapi.js');
const me = new Glitch.Me();
me.on("ready", async () => {
await me.remix("hello-express", {
domain: "my-new-express-app",
description: "My new express app!",
private: false
})
console.log("New project created!");
})
me.signin("your-code-here")
Getting Your Projects
Gets 10 projects and logs the URL associated with them.
const Glitch = require('glitchapi.js');
const me = new Glitch.Me();
me.on("ready", async () => {
const projects = await me.getProjects(10);
projects.forEach(p => {
console.log("https://" + p.domain + ".glitch.me/");
});
})
me.signin("your-code-here")
Updating Project Data
const Glitch = require('glitchapi.js');
const me = new Glitch.Me();
me.on("ready", async () => {
const projects = await me.getProjects(10);
await projects[0].update({
domain: "my-new-domain",
description: "Successfully updated!"
})
console.log("Project updated!");
})
me.signin("your-code-here")
Project Deletion/Undeletion
const Glitch = require('glitchapi.js');
const me = new Glitch.Me();
me.on("ready", async () => {
const projects = await me.getProjects(10);
projects[0].delete();
setTimeout(() => projects[0].undelete(), 2000);
})
me.signin("your-code-here")
Related Skills
node-connect
350.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.9kCreate 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
350.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
