meme-sniper
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Solana meme sniper run by your SI agent: scans, rug-checks and suggests trades, plus an opt-in launch rail. Paper/suggest by default; live trading, armed exits and launch rail are opt-in. Python, MIT.

Meme Sniper
Solana meme sniper: scans, rug-checks, and suggests buys and sells, plus a gated launch rail with GitHub repo attach. Paper and suggest mode are the defaults (a missing env var does not sign). Armed stops, the owner-position timeout, and the launch rail ship off until you opt in. Python, MIT.
Your agent's trench crew. Meme Sniper scans every new Solana memecoin and rug-checks it. Trade ideas are suggestions until you approve them. It can also launch your own token through a gated launch rail that ships off. You set the wallet, sizes and rules once, and get pinged about what happens.
No hype, no ticker. Just the code.
Always on: loop, cadence and active hours
Meme Sniper is a loop meant to run continuously: the bot runs 24/7 on its cadence and your agent runs the lanes in automations/ on theirs. It is not a one-shot script.
- Keep it running: use an always-on hosted agent (best), or auto-start on boot on your own PC: Windows Task Scheduler "At log on" running
python bots/sniper.py --start, macOS alaunchdagent, Linux asystemd --userservice or@rebootcron. Have the agent's lane jobs saved as recurring automations so they survive restarts. - Active hours (tunable,
bots/.env):ACTIVE_HOURS(default00:00-23:59= always on; e.g.09:00-23:00, overnight22:00-02:00, several windows09:00-12:00,18:00-23:00),ACTIVE_TZ(defaultAmerica/New_York),ACTIVE_DAYS(blank = every day; e.g.mon-fri). Outside the window the loop idles on new buys and new inbox cards (declined with reasonoutside_active_hours), never cuts off an order mid-send, keeps monitoring running, and resumes on its own when the window opens. A sell still needs your approval unless you setARMED_STOPS=1. The stuck-bag watchdog only retries a sell that already went out.TRADING_HOURS/TRADING_TZstill work and apply on top (both windows must allow a buy). - Cadence (tunable): lane cadences
LANE_CADENCE_SNIPER_LANE_MIN(10),LANE_CADENCE_MISC_LANE_MIN(15),LANE_CADENCE_WARDEN_LANE_MIN(20),LANE_MORNING_BRIEF_AT(08:00),LANE_NIGHTLY_EVAL_AT(23:30). Bot-side cadences keep their existing settings (AGENT_INBOX_CADENCE_S,SNIPER_LAUNCH_POLL_S,WALLET_POLL_INTERVAL_S,SNIPER_WATCH_INTERVAL_S). - Check it:
python bots/active_hours.pyprints whether new entries are allowed right now and each lane's cadence (no secrets). - The setup wizard asks active hours right after the agent-autonomy question (
AGENT_MODE).
Works with
Sniper can be run by Grok Bot, Muse, or an agent from any of the larger SI companies: any SI agent that can read and write files and run Python works. No official partnership or endorsement is implied.
Contents
- Always on: loop, cadence and active hours
- Works with
- Glossary
- Paper quick start (dry run)
- What Sniper is
- Read this first: safety defaults
- Safety caps and your settings
- Fixes (policy)
- GitHub basics (new to GitHub? start here)
- What's in this folder
- Quick start
- Install as plugin
- Windows, Mac and Linux
- GitHub sign-in setup
- Messaging / notifications setup
- How the inbox works
- Contributing
- Versions and releases
- Updating
- License
What Sniper is
Four pieces that work together:
- The sniper (
bots/meme_sniper.py). Scores every new Solana launch, runs rug checks, buys, and manages each position with stop loss, take profit and trailing stops. Writes what it sees as small JSON "packets" to an inbox for your agent. - The launch rail (
bots/sub-bots/launch_rail.py). Launches a token for you, with a dev-buy cap (default 0.5 SOL) and a repo gate: the launch must point at a real public GitHub repo. Off by default (see below). Full details:docs/LAUNCH_RAIL.md. - GitHub sign-in and repo attach (
bots/sniper_github.py). Sign in once with GitHub's device code, list your repos, and attach one to a launch. - Contribution review and uploader (also
bots/sniper_github.py). Scans pull requests and suggestion files from other people, queues them for you to review, and packages and publishes your own uploads and releases. Nothing auto-merges.
Around those: an SI "brain" (Grok, OpenAI, Claude, any OpenAI-compatible endpoint, or local Ollama), alerts to your phone, a console dashboard, nightly self-review, and skill files in skills/ that teach your agent how to trade.
Who it's for: people who run an SI agent that can read files, run Python and keep a loop going, and who understand Solana memecoins and their risks.
Glossary
- SI agent: your AI agent (hosted or local) that reads packets, decides and writes signals. Sniper executes and guards; the agent decides.
- Packet / card: a JSON file the bots write to
inbox/(orjson_relay/) for the agent: candidates, rug-check verdicts, acks, alerts. - Signal: what the agent writes back to
json_relay/agent_signals.json(buy, sell, set_protection_batch). - Ack / confirmation: the bot's answer to every signal (
signal_ack_*,trade_confirmation_*orsignal_failure_*with a reason), echoing yourrequest_id. - Rug check (ca-intel): the vet of a contract address before any buy: authorities, holders, liquidity, creator history.
- Flip / hold: position modes. Flip trades in and out on stops and targets; hold keeps a long-term bag.
- Trail: a trailing stop that arms after a gain and exits after a set giveback.
- Scale-in: a small first buy, then the rest only if liquidity and price hold.
- Launch rail: the gated path that launches your own token with a GitHub repo attached. Off by default.
- Paper mode:
SNIPER_PAPER_MODE=1, fills simulated at real quotes, nothing signed or sent. - Inbox lanes: the recurring agent loops in
automations/that draininbox/intoinbox_results/.
Paper quick start (dry run)
Paper mode is the default for new setups and needs no wallet private key: set an RPC, a brain and a HOT_WALLET_ADDRESS (any address, e.g. a fresh burner's). Nothing is signed or sent, and fills come from a simulated balance (SNIPER_PAPER_START_SOL, default 1.0). The private key is asked for only when the owner opts into live.
git clone https://github.com/BadmonLano/meme-sniper.git
cd meme-sniper
python3 -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp bots/.env.example bots/.env # Windows: copy
In bots/.env keep AGENT_MODE=suggest and SNIPER_PAPER_MODE=1 (both shipped defaults), set the burner's HOT_WALLET_ADDRESS, an RPC_URL (Solana's free public https://api.mainnet-beta.solana.com works for a test) and a brain (GROK_API_KEY or local Ollama). Then python bots/sniper.py --smoke and python bots/sniper.py. Paper state lives in bot_logs/paper/. Going live later needs an explicit LIVE confirmation in the wizard.
Read this first: safety defaults
| Setting | Default | What it means |
|---|---|---|
SNIPER_PAPER_MODE |
on (paper) | Missing, blank, or 1 does not sign. Fills are simulated at real quotes. Live signing only when you set this to 0 (or false / no / off) and confirm LIVE. |
AGENT_MODE |
suggest | Buys and sells are suggestions until you approve that trade. auto is an explicit opt-in. |
ARMED_STOPS |
off (0) | A breached stop or take-profit is a suggestion, not a sell. Set 1 only if you want those exits to sell without a fresh approval. |
OWNER_POS_AUTO_TIMEOUT |
off | A bag the bot did not buy is never taken over or sold just because 30 minutes passed. Set on to allow that timeout. |
LAUNCH_RAIL_ENABLED |
off (false) | The launch rail does nothing until you turn it on. It ships off. |
LAUNCH_RAIL_LIVE |
off (0) | Even with the rail on, launches are dry runs until you set this to 1. Both must be on, and paper mode must be off, for a real on-chain launch. |
LAUNCH_MAX_DEV_BUY_SOL |
0.5 | Hard cap on the dev buy for a launch. |
bots/.env |
ignored by git | Your keys live here. Never commit it, zip it or paste it anywhere. Only .env.example (blank) is in the repo. |
Honest notes:
- Agent autonomy is the first setup question.
AGENT_MODE=suggest(default): the agent proposes trades and waits for your/approve.AGENT_MODE=autolets it buy and sell on its own inside the caps; pick it only if you accept that. - Use a burner hot wallet holding only what you can afford to lose. Never your main wallet.
- What wallet access means: the private key in
bots/.envlets the bot sign any transaction from that wallet, not just trades: it could move or spend everything in it. So use a burner, keep the balance small, and sweep profits out (LEDGER_ADDRESS). - Agent buys need a working RPC. Without a reachable
RPC_URL(orHELIUS_API_KEY) buy signals are refused, not queued. - Most memecoins go to zero and many are scams. The gates here reduce risk; they don't remove it. Bugs, RPC outages and bad model output can lose money.
- With the shipped defaults the agent suggests and you approve each buy and sell. Live signing, armed stops, the owner-position timeout, and the launch rail stay off until you opt in. Alerts are notify-only.
- MIT license, no warranty. You're responsible for every transaction it sends.
Safety caps and your settings
These are on by default. Every one is a line in bots/.env; leave it blank to keep the default, set 0 to switch a number off.
| Setting | Default | In plain English |
|---|---|---|
DAILY_LOSS_STOP_SOL |
0.5 | Stop buying for the rest of the day (US Eastern) once you have lost this much SOL on closed trades. |
DAILY_BUY_CAP |
10 | At most this many buys per day. |
BUY_AUTHORITY_GATE |
true | Refuse any token whose dev can still freeze your tokens or mint more. If that can't be checked, it refuses too (BUY_AUTHORITY_FAIL_CLOSED). |
MAX_PUMP_5M_PCT |
50 | Don't chase: skip a token already up more than this % in the last 5 minutes. |
RUG_FAIL_CLOSED |
true | If 4 or more rug-check sources can't be reached (RUG_FAIL_CLOSED_MIN_ERRORS), treat the token as unsafe instead of "unknown". |
CANDIDATE_FLOOR |
true | Hide a token from your agent's inbox unless it has at least CANDIDATE_MIN_LIQ_USD (10,000) of liquidity, no fake-volume flag and no bundled launch. |
TRADING_HOURS / TRADING_TZ |
blank (always) / America/New_York | Only surface and buy tokens in this window, e.g. 09:00-23:00. Overnight windows like 22:00-02:00 work. Monitoring keeps running outside the window. A sell still needs your approval unless ARMED_STOPS=1. TRADING_HOURS_GATES_SCAN=false keeps scanning outside the window but still blocks buys. |
LOSS_STREAK_PAUSE |
3 | After this many losing trades in a row, pause buys for LOSS_STREAK_PAUSE_HOURS (2). |
SIZE_HALVE_AFTER_LOSSES |
2 | After this many losses in a row, buys are half size until a winner. |
MAX_OPEN_POSITIONS |
3 | Never hold more than this many tokens at once. |
MINT_COOLDOWN_HOURS |
72 | After a stop-loss on a token, don't buy that same token again for this many hours. |
SECOND_WIND_V2 |
true | "Second wind" pings (a token that dumped, built a base and is waking up) use the real price history peak, need a 1-3 hour base where volume dried up and came back, skip tokens more than 80% off their peak (SECOND_WIND_MAX_OFF_PEAK_PCT), check holders and bundles, and include a plan: entry zone, stop under the base low, target the old peak. Pings are watch-only, never auto-buys. |
SECOND_WIND_SCORE |
true | Grades every second-wind ping at +1h, +6h and +24h into bot_logs/second_wind_scores.jsonl, so you can see if they actually work. |
SIGNAL_RECHECK |
true | Right before any agent or manual buy, take a fresh price/liquidity snapshot. Refuse if liquidity is under SIGNAL_RECHECK_MIN_LIQ_USD (10,000), if the market cap moved more than SIGNAL_RECHECK_MAX_DRIFT_PCT (50%) since the signal, or if the rug check fails. For the drift check, put mcap_at_signal (the market cap you saw, in USD) in the buy signal; without it the bot uses mcap, expected_mcap or the scan's market cap. A refusal lands in inbox/ as signal_rejected with a one-line summary. |
PEAK_SANITY |
true | Throws out junk "missed runner" numbers (over PEAK_SANITY_MAX_X, 1000x) so the lessons aren't built on bad data. |
First run: the setup wizard and your agent ask you. The wizard asks most of these (see What the setup wizard asks); before it trades, confirm and write the answers into bots/.env: paper or live (default paper; a missing value is also paper), launch rail on or off (default off), armed stops (default off), owner-position auto-timeout (default off), buy size, daily loss stop, daily buy cap, stop loss / trailing stop, same-token cooldown, loss-streak pause, max open positions, and trading hours plus time zone. Press Enter on any question to keep the default. The agent does not turn live mode, the launch rail, armed stops, or the timeout on by itself.
Fixes (policy)
Plain English rules for any agent running this drop:
- The agent proposes patches. You apply them. When it spots a bug it writes an owner card in
owner_inbox/with the evidence, a diff, and a test plan. It does not editbots/(the trading engine) itself. - Fixes for everyone go back as suggestions, not pushes. If the fix would help other users, send it upstream as a suggestion through the review queue (
bots/sniper_github.py). Nothing is auto-merged. - Your copy never auto-pulls. Upstream changes only reach your copy when you choose to update.
- Safety caps only loosen with your OK. The daily loss stop, daily buy cap, fail-closed rug checks, mint/freeze authority gate and max 5-minute pump gate can be tightened only after you say yes, and loosened or switched off only after you say yes. The agent does not change them on its own.
GitHub basics (new to GitHub? start here)
- Repo (repository): a project folder that lives on GitHub, with its full history. This page is one.
- Download ZIP: green Code button → Download ZIP. Gets you a copy with no account and no Git needed.
- Clone: same as downloading, but with Git (
git clone <url>), so you can pull updates later withgit pull. - Star: a bookmark and a thumbs-up. Find your stars under your profile → Stars.
- Watch: the Watch button picks what you get notified about. Custom → Releases pings you only when a new version ships. Notifications show in the bell icon (top right) and by email if you allow it in notification settings.
- Fork: your own copy of the repo under your account. You can change it freely. It does not update itself when the original changes (see Versions and releases).
- Pull request (PR): "here's a change I made in my fork, please consider adding it." The owner reviews and decides.
- Issue: a bug report or question. Issues tab → New issue.
- Release: a named, tested version (like
v1.0.1) with notes and a downloadable zip. Right side of the repo page → Releases.
What's in this folder
| Path | What it is |
|---|---|
bots/sniper.py |
Start here. One launcher: start everything, setup wizard, X sign-in, dashboard, launch a token. |
bots/meme_sniper.py |
The trading engine. |
bots/sniper_ui.py |
Console dashboard (reads state files, never trades). |
bots/sniper_github.py |
GitHub sign-in, repos, PR/suggestion review queue, uploads and releases. |
bots/sub-bots/ |
Helpers: launch rail, alerts, X intel, security warden, model providers, etc. |
bots/chains/ |
Chain plug-ins. Solana is the only live one. |
bots/.env.example |
Every setting, blank, with comments. Copy to bots/.env. |
bots/examples/ |
Sample launch requests (dry-run test included). |
skills/ |
Skill files your agent reads to make decisions. |
automations/ |
Inbox-check prompts for your agent to schedule: sniper lane, warden lane, misc lane, morning brief (see Quick start step 8). |
rules/ |
Your personal trading rules (rules.example.md to start). |
learnings/ |
Lessons the nightly review writes down. |
inbox/ |
Agent inbox: new cards, rejected signals, reviews, for your SI agent to read. |
owner_inbox/ |
Owner cards: alerts and recaps meant for you. |
json_relay/, owner_commands/, inbox_results/ |
Requests, your commands and finished work (see How the inbox works). |
bots/tuner/meme_sniper_filter.default.json |
Shipped filter defaults. First run copies it to meme_sniper_filter.json (git-ignored), which the bot tunes, so git pull stays clean. |
VERSION |
The release version. |
bot_logs/ |
Runtime state and logs (git ignores the contents). |
docs/ |
Deep dives: LAUNCH_RAIL.md, DEPENDENCY_MAP.md. |
SETUP.md |
The full step-by-step setup. Your agent should read all of it. |
CONTRIBUTING.md, SECURITY.md, TIMELINE.md, LICENSE |
How to help, how to report a hole, change history, license. |
Quick start
- Install Python 3.12+ from python.org. On Windows tick Add python.exe to PATH.
- Get the code: green Code button → Download ZIP and unzip it, or
git clone https://github.com/BadmonLano/meme-sniper.gitthencd meme-sniper. - Open a terminal in that folder and install:
Mac/Linux: make a virtual environment first, then install inside it:pip install -r requirements.txt python -m playwright install chromiumpython3 -m venv .venv && source .venv/bin/activate pip install -r requirements.txt python -m playwright install chromium - Make your settings file: copy
bots/.env.exampletobots/.env.- Windows:
copy bots\.env.example bots\.env - Mac/Linux:
cp bots/.env.example bots/.env
- Windows:
- Fill in
bots/.envin a text editor: burner wallet (HOT_WALLET_PRIVATE_KEY,HOT_WALLET_ADDRESS), RPC (RPC_URL/HELIUS_API_KEY), one brain (LLM_MAINplus that provider's key), andSNIPER_PAPER_MODE=1for your first run. - Run it:
python bots/sniper.py(Mac/Linux:python3 bots/sniper.py). Pick 2 Setup wizard first, then 1 Start Sniper.--helplists the options. - Point your agent at
SETUP.mdso it finishes setup (rules, skills, automations, alerts). - Set up your inbox checks. Sniper only writes files; nothing gets decided until your agent checks them. Ask your agent to create one recurring task per prompt below, pasting the prompt file's text as the task (Grok Bot: a routine; Muse or other SI agents: a scheduled task, cron job or heartbeat with the file's text as the prompt). Replace
{AGENT_NAME}/{USER}first, then run each once by hand and checkbot_logs/inbox_cron_audit.log.
| Prompt | Suggested frequency | Watches for |
|---|---|---|
automations/sniper_lane.automation.md |
every 10 min | inbox/meme_sniper - * and trench_news - *: token cards, second-wind pings, digests, boot summaries, signal answers (incl. signal_rejected); arms SL/TP on open bags |
automations/warden_lane.automation.md |
every 20 min | inbox/security_warden - *: wallet moves, Sniper down / zero buys, integrity, medic |
automations/misc_lane.automation.md |
every 15 min | everything else in inbox/ (x_intel, code_tuner, autoagent, log_janitor, launch_rail, owner cards, repo_watch) |
automations/morning_brief.automation.md |
once each morning | reads logs and done packets, sends you one brief |
learnings/nightly_self_eval.automation.md |
once a night | reviews the day's trades and writes lessons |
Offset the start minutes so no two checks start in the same minute. Details: automations/README.md and SETUP.md section 11.
Quick checks: python bots/sniper.py --smoke, python bots/sniper.py --ui-smoke (runs on a temp copy) and python bots/sub-bots/launch_rail.py --help.
Menus
Launcher (python bots/sniper.py): 1 Start Sniper (+ console), 2 Setup wizard, 3 Sign in to X, 4 Live dashboard, 5 Launch a token, 6 Console only, 7 Exit.
Console (opens with 1 or 6): 1 Live dashboard, 2 Logs, 3 Settings, 4 Skills, 5 Launch a token, 6 Sign in to X, 7 Quit UI (engine keeps trading), 8 Stop Sniper. Skills are under 6 Console → 4 Skills (all skill folders, including gork-lore). The token-lore template lives in templates/token-lore/, outside skills/, so plugin loaders don't pick it up as a skill.
What the setup wizard asks
Wallet (key, address, optional cold wallet), RPC (URL, Helius key, Helius plan), the brain (main + fallback and their keys/models), alert channels, owner commands, Pinata, X token, trading values (buy size, default SL/TP, dev-buy cap, own-launch mode and treasury %), Safety caps (daily loss stop 0.5 SOL, daily buy cap 10, same-token cooldown 72h, loss-streak pause 3, max open positions 3, trading hours blank = always, timezone America/New_York), and modes (launch rail on/off, default off, launch live on-chain default no, paper, learning). Enter takes the default shown. Answers go to bots/.env, each comment on its own line. SNIPER_WIZARD_SAFETY=0 hides the Safety caps questions.
Install as plugin
Meme Sniper ships as a plugin: 11 agent skills (meme-hunter, ca-intel, forensics, gork-lore and the sub-skills) plus this repo's bots. The manifest is in .cursor-plugin/plugin.json (Cursor) and .grok-plugin/plugin.json (Grok Bot); both list the same skills.
- Cursor: once listed, open Customize in the sidebar, find meme-sniper, then Install (project or user scope). To try it before then, clone this repo into
~/.cursor/plugins/local/meme-sniper, run Developer: Reload Window, and check under Customize that the skills show up. - Grok Bot or any other SI agent: clone the repo and point your agent at
SETUP.md. It loads the skills fromskills/and sets up the inbox checks inautomations/.
The skills tell your agent how to run the bots. The bots themselves still run on your machine: follow Quick start for the install, then test them as shown below.
Test it safely (paper first, then one small live buy)
- Env setup: copy
bots/.env.exampletobots/.env. Never commitbots/.env(it's git-ignored) and never paste its keys into chat. - RPC and a test wallet: set
RPC_URL(orHELIUS_API_KEY). Make a new burner wallet just for testing, fund it with a small amount of SOL, and put it inHOT_WALLET_PRIVATE_KEY/HOT_WALLET_ADDRESS. Never use your main wallet. Start withSNIPER_PAPER_MODE=1, keep the safety caps at their defaults, and set a tinyOWNER_MAX_BUY_SOL. - Smoke check:
python bots/sniper.py --smoke, thenpython bots/sniper.py→ 2 Setup wizard → 1 Start Sniper. - Rug-check a token: ask your agent to vet a contract address (ca-intel skill), or write it to
json_relay/ca_research_request.jsonyourself:
The verdict lands in{"requests": [{"request_id": "test_vet_1", "ca": "<MINT_ADDRESS>", "intent": "research"}]}json_relay/ca_research_response.jsonand as aca_intelpacket ininbox/. - Small test buy: in paper mode, have your agent send a buy, or add one to
json_relay/agent_signals.json:
Once paper looks right, set{"signals": [{"signal_id": "test_buy_1", "action": "buy", "mint": "<MINT_ADDRESS>", "amount_sol": 0.01, "params": {"stop_loss_pct": 30, "tp_targets_pct": [50]}, "mode": "flip", "reasoning": "plugin test"}]}SNIPER_PAPER_MODE=0and repeat with the smallest size you're OK losing. - Confirm stop/target armed and confirm/fail: every signal gets an answer that echoes your id as
request_id. Look for asignal_ack_*/trade_confirmation_*packet ininbox/(or asignal_failure_*with the reason), plus the row inbot_logs/signals_response_history.jsonl. Then open the console (1 Live dashboard) and check that the position shows its stop loss and take profit armed. If your agent sendsset_protection_batch, that gets its own confirm or fail too. - Clean up: sell the test bag (
"action": "sell") or let the stop or target close it. Then move the handled packets toinbox_results/done/.
Windows, Mac and Linux
The same Python files run on all three. Built and tested on Windows 10/11; macOS and Linux should work but are less tested.
| Thing | Windows | Mac / Linux |
|---|---|---|
| Python command | python |
usually python3 (and pip3) |
| Paths in docs | bots\.env |
bots/.env |
| Terminal | Windows Terminal recommended | Terminal / iTerm |
| GitHub token storage | Windows Credential Manager (via keyring) |
macOS Keychain or Linux Secret Service (via keyring) |
| File locks | msvcrt |
fcntl (picked automatically) |
Windows-only bits in the code, all guarded so they're skipped elsewhere:
bots/sniper.py: sets the console to UTF-8 withctypes.windll(Windows only).bots/sniper.py,bots/sniper_ui.py,bots/cancel_input.py: single-key input viamsvcrt; on Mac/Linux the menus fall back to typed input.bots/sub-bots/agent_scraper.py: cleans up its own stray Chrome via PowerShell on Windows only; on Mac/Linux close a stuck scraper browser yourself.bots/sniper_ui.py:CREATE_NO_WINDOWsubprocess flag (ignored off Windows).
No winreg, scheduled tasks or hard-coded drive paths. Keep the computer awake: trading pauses when it sleeps (Mac: caffeinate -i python3 bots/sniper.py).
GitHub sign-in setup
Optional. Needed only to list your repos, attach one to a launch, review contributions, or publish uploads.
- Go to GitHub → Settings → Developer settings → OAuth Apps → New OAuth App.
- Name: anything (e.g.
Sniper). Homepage URL and Callback URL: your GitHub profile URL (the callback isn't used). - Tick Enable Device Flow. Register.
- If shown, untick "Expire user access tokens". Sniper doesn't refresh tokens yet, so expiring tokens log you out every 8 hours.
- Copy the Client ID (not a secret) into
bots/.env:
You do not need a client secret.GITHUB_OAUTH_CLIENT_ID=your_client_id - Sign in:
Open the link, type the code, approve. Then check withpython bots/sniper_github.py loginstatusandmy-repos.
The token is stored in your OS password store (Credential Manager / Keychain / Secret Service). If keyring is unavailable it falls back to a user-only file in bot_logs/. python bots/sniper_github.py logout removes it. Default scope is read-only public access.
Other commands: repos, resolve, scan-prs, review, queue, upload, watch-drops, publish-upload, publish-release. Run any with --help.
Messaging / notifications setup
All optional. Pick channels with a comma list in bots/.env, e.g. ALERT_CHANNELS=telegram,ntfy. Leave it blank for none. Every setting has a comment in .env.example, and the setup wizard (python bots/sniper.py → wizard) can do this for you and send a test.
Telegram
- In Telegram, message @BotFather →
/newbot→ copy the token. - Send your new bot any message, then open
https://api.telegram.org/bot<TOKEN>/getUpdatesand copychat.id. - Set
TELEGRAM_TOKEN=andTELEGRAM_CHAT_ID=, and addtelegramtoALERT_CHANNELS.
Discord
- Server Settings → Integrations → Webhooks → New Webhook → Copy Webhook URL.
- Set
DISCORD_WEBHOOK_URL=and adddiscord. Treat the URL like a password.
Email (SMTP)
- Set
SMTP_HOST,SMTP_PORT(587 = STARTTLS, 465 = SSL),SMTP_USER,SMTP_PASS,SMTP_FROM,ALERT_EMAIL_TO. Gmail:smtp.gmail.comwith an app password. - Add
email.ALERT_EMAIL_MIN_INTERVAL_Sstops it flooding your inbox.
ntfy (free phone push, iPhone and Android)
- Install the ntfy app, subscribe to a long random topic name.
- Set
NTFY_TOPIC=(andNTFY_URL/NTFY_TOKENif self-hosted or protected). Addntfy.
Owner commands (talk back to it, off by default)
Ask for /roast, /recap or /autopsy [ticker|last] by Telegram through a separate command bot (OWNER_COMMANDS, OWNER_COMMANDS_TG_TOKEN, OWNER_COMMANDS_TG_CHAT_ID) or by dropping a text file in owner_commands/. Replies land in your alert channels and inbox_results/owner_replies/. A roast goes to whoever made the trades: your own trades roast you, the agent's trades get its self-roast. See SETUP.md section 6.5.
iMessage on Mac (optional, community recipe)
Sniper has no built-in iMessage channel yet (imessage in ALERT_CHANNELS is ignored and logged as planned). If you're on a Mac signed into Messages, your agent can forward alerts itself with:
osascript -e 'tell application "Messages" to send "Sniper: test alert" to buddy "+15555550123"'
Run it once by hand first (macOS asks for permission). This is outside Sniper's code and unsupported; ntfy is the easier phone option.
How the inbox works
Sniper and your agent talk through plain files, so any agent that can read and write files works:
- Bots → agent: packets land in
inbox/andjson_relay/(new cards, rejected signals, positions, launch requests). Cards meant for you (alerts, recaps) go toowner_inbox/. - Agent → bots: the agent writes decisions and launch requests back into
json_relay/(e.g.json_relay/launch_requests/*.json). - Every action gets an answer: each thing your agent sends (buy/sell/SL-TP signals, launches, wallet and archetype commands, repo suggestions and decisions, publish, owner commands, code_tuner and meeting notes, filter edits) gets a
confirm_…orfailed_…memo ininbox/with a one-line summary, the reason on failure and the original request id.AGENT_MEMOS=0turns them off. - Done work: results go to
inbox_results/and move toinbox_results/done/. - You → agent: text files in
owner_commands/. - Each request is processed once (tracked in
bot_logs/), so nothing fires twice.
The automations/ files are ready-made loops telling your agent how often to read these. Details in SETUP.md sections 6 and 11.
Contributing
Ideas and fixes are welcome. Everything is reviewed by the repo owner. Nothing is auto-merged.
- Pull request: Fork → change it in your fork → Contribute → Open pull request. Keep it small, say what and why, run the tests (
python bots/sniper.py --smokeand thetest_*.pyfiles). - Suggestion file: no Git needed. Open an issue, or attach a short markdown file describing the change.
- Security holes: don't open a public issue. See
SECURITY.md. - Never include keys, wallets,
.envfiles or logs in a PR.
Full guide: CONTRIBUTING.md.
Versions and releases
- Feature details for each version (vault exception, celebrity-post rule, scale-in/trail/watchdog, celeb_post cards and later) are in
CHANGELOG.md. - Versions look like
v1.0.15(the trading engine inside keeps its own number, v14.3). Each one is a Release with notes on what changed (history inTIMELINE.md). - Forks and downloads don't auto-update. You update when you want:
- ZIP: download the new release, copy your
bots/.env,rules/rules.mdandlearnings/across. - Git clone:
git pull. - Fork: on your fork's page click Sync fork.
- ZIP: download the new release, copy your
- To hear about new versions: Watch → Custom → Releases.
- Read the release notes before updating; new settings appear in
.env.example.
Updating
- Git:
git pullin the folder. - ZIP: download the new release zip and unzip it over the old folder (or next to it and copy your files across).
- Your
bots/.envandbot_logs/are kept either way (git ignores them, and the zip doesn't contain them). The live filter file is ignored too, sogit pulldoesn't conflict with what the bot tuned. - Check
.env.exampleand the release notes for new settings.
License
MIT © 2026 Bentayga Empire LLC. Use it, change it, share it; keep the license notice. No warranty.
More from Bentayga: JOS (@JOSYSTEMS) · theflowcycle.com
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found