Skip to content
rgkdegenPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

camelcase: an upside-down camel typing on a keyboard balanced on his hooves

$CAMELCASE contract address (Solana, pump.fun)

coming soon

Night shift Python 3.9+ Zero dependencies MIT license Water breaks: 0

A camel who walks your repo at night.

▶ Play HUMP RUN, the camel runner game

camelcase is a small command line tool and GitHub Action with a camel for a face. Point him at a repository and he treks every file, digs up the TODOs buried in the sand, spits out the keys you dropped, finds the snakes in your desert (snake_case, he hates them), checks that the basics are there and tells you how good a camel your repo is.

No dependencies. One pip install. trek never touches the network.

Meet the camel

Staff ID card: humpy, Senior Good Camel, Repo Hygiene. Clocks in 03:12 UTC. Access: read only.

Name: humpy
Role: Senior Good Camel, Repo Hygiene
Shift: nights, clocks in at 03:12 UTC
Posture: upside down, humps on the ground, keyboard on the hooves
Water: none needed. @retry(on=429, tries=7)
Access: read only. He looks, he reports, he never pushes.

He started as a joke for a video where a camel types with his hooves. Then the joke got a real job: everything on this page is code you can run today.

What he does

trek: digs up every TODO, FIXME and HACK buried in your comments spit: spots GitHub, AWS, Slack, Stripe and OpenAI keys and private keys, masks them, never repeats them
haul: carries back open issues, oldest first, and picks the cargo worth carrying night shift: runs as a GitHub Action every night and leaves a report in the job summary
Command What happens
humpy trek [path] Walks the folder. Reports TODO, FIXME, HACK, XXX and BUG comments with file and line, dropped keys (masked), snake_case names in Python with their camelCase twin, files over 1 MB, and whether README, LICENSE, .gitignore, tests and CI exist. Ends with a score out of 100.
humpy haul owner/name Asks the GitHub API for open issues, oldest first, leaves pull requests behind, counts labels and lists unassigned bug, help wanted and good first issue items. Retries 429s through the oasis.
humpy camel stack_trace_url Prints stackTraceUrl. It is in the name. --style pascal and --style snake too.
humpy grunt He says hello. Sort of.

See him work

This is real output from the tool, run on a small messy project:

Terminal output of humpy trek on a demo project: three basics missing, five TODO-style comments, one masked GitHub token, four snakes, score 46 out of 100, verdict bad camel

And this is his own stable:

Terminal output of humpy trek on this repository: all basics present, nothing buried, no keys, score 95 out of 100, verdict good camel

Yes, his own code is full of snake_case. It is Python. He is working on it.

Take him home

pip install git+https://github.com/rgkdegen/camelcase
humpy trek .                      # trek the folder you are in
humpy trek . --fail-under 80      # exit 1 when the score is below 80
humpy trek . --json               # raw findings for other tools
humpy trek . --md report.md       # also write a Markdown report
humpy trek . --no-snakes          # ignore snake_case (it is fine, really)
humpy haul pallets/flask          # open issues of any public repo
humpy camel good_camel            # goodCamel

haul reads GITHUB_TOKEN (or GH_TOKEN) when it is set, which gives him a bigger water ration (rate limit) and lets him into private repos you can already see.

To make him skip a line, end it with humpy: ignore.

Put him on the night shift

Add this to .github/workflows/night-shift.yml in your own repository:

name: Night shift
on:
  schedule:
    - cron: "12 3 * * *"   # 03:12 UTC, every night
  pull_request:
  workflow_dispatch:

permissions:
  contents: read

jobs:
  trek:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: rgkdegen/camelcase@main
        with:
          fail-under: "80"   # optional: fail the job when the score drops

He writes his report to the job summary, so you find it on the run page in the morning. He asks for contents: read and nothing else.

How the score works

Everybody starts at 100.

He finds He takes away
A missing basic (README, LICENSE, .gitignore, tests, CI) 8 each
A TODO-style comment 2 each, 30 at most
A dropped key 20 each, 40 at most, and the verdict is bad camel whatever the number
A file over 1 MB 5 each, 10 at most
snake_case names in Python 1 per 5 snakes, 6 at most
Score Verdict
90 to 100 good camel
70 to 89 needs water
40 to 69 spat on the carpet
under 40 bad camel

The file from the video

camelcase/hump.py is the code he types in the video, and it runs:

from camelcase.oasis import retry

@retry(on=429, tries=7)  # no water needed
async def cross(repo, issue):
    page = await repo.trek(issue.url)
    bug = page.find("stack trace")
    patch = await bug.chew(twice=True)
    await repo.commit(patch, "fix: retry on 429")
    return "good camel"  # obviously

oasis.retry works on sync and async functions. It retries while the call raises (or returns) something whose status_code is in on, with exponential backoff and jitter, then gives up with GaveUp.

What he does not do

He does not write, fix or merge your code. In the videos he types with his hooves. In real life he reads, reports and grunts. Fixing is still your job.

He also does not replace a real secret scanner. He knows six patterns (GitHub, AWS, Slack, Stripe live and OpenAI keys, private key headers). If he finds one, rotate it: deleting the line does not remove it from git history.

Still in the saddlebag, not built yet: more key patterns, SARIF output for code scanning, a --fix that actually renames your snakes, and a comment on the pull request instead of only the job summary.

Run the tests

git clone https://github.com/rgkdegen/camelcase
cd camelcase
python -m unittest discover -s tests -v

$CAMELCASE

coming soon
  • A memecoin on pump.fun. You do not need it to use this software, it gives no rights to the software and it promises nothing.
  • Check the address character by character before you do anything with it. Only trust the address posted here and on @rgk_degen.
  • Never put in money you cannot afford to lose.

License

MIT. Take the camel, water the camel (optional), credit the camel. Inspired by the good boy next door, SpikeCalls/gitretriever.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages