
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
@cyberdrk/gram
Advanced tools
A CLI tool for interacting with Instagram via their undocumented GraphQL/REST API using cookie-based authentication.
This project uses Instagram's undocumented web API (and cookie auth). Instagram can change endpoints, query IDs, and anti-bot behavior at any time — expect this to break without notice.
npm install -g @arein/gram
# or
pnpm add -g @arein/gram
# or
bun add -g @arein/gram
# one-shot (no install)
bunx @arein/gram whoami
# Show the logged-in account
gram whoami
# View your home feed
gram feed
gram feed --count 50
# View the explore/discover feed
gram explore
# View a post
gram post CxyzABC1234
gram https://www.instagram.com/p/CxyzABC1234/
# View a user profile
gram user instagram
gram user @instagram --json
# Search for users, hashtags, places
gram search "coffee shop"
gram search "photography" --type hashtags
# Like/unlike posts
gram like CxyzABC1234
gram unlike CxyzABC1234
gram feed [-n count] [--json] [--json-full] — get your home feedgram explore [-n count] [--json] [--json-full] — get the explore/discover feedgram post <shortcode-or-url> [--json] [--json-full] — view a post by shortcode or URLgram comments <shortcode> [-n count] [--json] — view comments on a postgram likers <shortcode> [--json] — view users who liked a postgram <shortcode-or-url> — shorthand for gram post <shortcode-or-url>gram user <username> [--json] — view a user profilegram posts <username> [-n count] [--json] — get a user's postsgram following [username] [-n count] [--json] — get users that someone follows (defaults to you)gram followers [username] [-n count] [--json] — get someone's followers (defaults to you)gram search <query> [--type <type>] [--json] — search for users, hashtags, and places
blended (default), users, hashtags, placesgram like <shortcode> — like a postgram unlike <shortcode> — unlike a postgram save <shortcode> — save/bookmark a postgram unsave <shortcode> — unsave/unbookmark a postgram comment <shortcode> "<text>" — comment on a postgram follow <username> — follow a usergram unfollow <username> — unfollow a usergram whoami [--json] — show the currently authenticated usergram check — check credential availability and sourcesgram query-ids [--refresh] [--json] — inspect or refresh cached GraphQL query IDsGram uses your existing Instagram web session. It resolves credentials in this order:
--session-id, --csrf-token, --ds-user-idSESSION_ID, CSRF_TOKEN, DS_USER_ID (or prefixed with INSTAGRAM_/IG_)@steipete/sweet-cookie (Safari, Chrome, Firefox)sessionid — Your Instagram session cookiecsrftoken — Cross-site request forgery tokends_user_id — Your user ID (optional but recommended)~/Library/Cookies/Cookies.binarycookies~/Library/Application Support/Google/Chrome/<Profile>/Cookies~/Library/Application Support/Firefox/Profiles/<profile>/cookies.sqliteOverride browser order via --cookie-source (repeatable).
Config precedence: CLI flags > env vars > project config > global config.
~/.config/gram/config.json5./.gramrc.json5Example ~/.config/gram/config.json5:
{
// Cookie source order for browser extraction
cookieSource: ["safari", "chrome", "firefox"],
chromeProfile: "Profile 1",
chromeProfileDir: "/path/to/Chrome/Profile",
firefoxProfile: "default-release",
cookieTimeoutMs: 30000,
timeoutMs: 60000
}
Environment shortcuts:
GRAM_TIMEOUT_MSGRAM_COOKIE_TIMEOUT_MS--session-id <token>: Instagram sessionid cookie--csrf-token <token>: Instagram csrftoken cookie--ds-user-id <id>: Instagram ds_user_id cookie--cookie-source <safari|chrome|firefox>: browser cookie source (repeatable)--chrome-profile <name>: Chrome profile name--chrome-profile-dir <path>: Chrome/Chromium profile directory--firefox-profile <name>: Firefox profile name--cookie-timeout <ms>: cookie extraction timeout (milliseconds)--timeout <ms>: request timeout (milliseconds)--plain: stable output (no emoji, no color)--no-emoji: disable emoji output--no-color: disable ANSI colors (or set NO_COLOR=1)--json: Machine-readable JSON--json-full: JSON with raw API response in _raw field--plain: Stable output without emoji or colorsGram can be used as a library:
import { InstagramClient, resolveCredentials } from '@arein/gram';
const { cookies } = await resolveCredentials({ cookieSource: 'safari' });
const client = new InstagramClient({ cookies });
// Get user profile
const userResult = await client.getUser('instagram');
if (userResult.success) {
console.log(userResult.user);
}
// Get home feed
const feedResult = await client.getHomeFeed();
if (feedResult.success) {
console.log(feedResult.posts);
}
// Like a post
const post = await client.getPost('CxyzABC1234');
if (post.success) {
await client.like(post.post.id);
}
// Search
const searchResult = await client.search('coffee', 'users');
Instagram's web app uses query IDs that rotate periodically. Gram:
src/lib/query-ids.json~/.config/gram/query-ids-cache.json (24h TTL)gram query-ids --refreshOverride cache path: GRAM_QUERY_IDS_CACHE=/path/to/file.json
pnpm install
pnpm run build # dist/ + bun binary
pnpm run build:dist # dist/ only
pnpm test
pnpm run lint
MIT
FAQs
CLI tool for interacting with Instagram via GraphQL/REST API
The npm package @cyberdrk/gram receives a total of 61 weekly downloads. As such, @cyberdrk/gram popularity was classified as not popular.
We found that @cyberdrk/gram demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.