enodo

enodo Used AI

17 devlogs
17h 58m
•  Ship certified
Created by Austin

enodo is an analysis suite for the Open Source ecosystem. Included is git-visualize, a CLI/library written in TypeScript that tabulates repository data and creates visual graphs.

Timeline

2025-08-22 update 1:

alright second feedback, there was a problem with the isomorphic-git library that actually ended up being due to my patch in upstream :p fixed it now, and updated the docs.

i've also been working on a new feature, lang-activity, that displays the language makeup of the repo over time. i'm still working over the code, but hopefully soon i have something that can produce a result!

i've also noticed upon testing my repo from the command line that raw-log doesn't output anything to the console. the rest seem to work though! i'll get that bug fixed, but i probably won't bother cherry picking it to the 0.1.x branch.

Update attachment

2025-08-11 update 1:
haven't worked on this in a while since i've been busy with other stuff IRL, but main work is updating the README and other miscallaneous chores that racked up time. i probably won't work on this again in a while, as there are a lot of responsibilities piling up on my plate as the summer is ending. but version 0.1.4 is published with a README with clearer instructions, as given to me by feedback.

Update attachment

2025-07-09 update 1:

work on 0.2.x has begun! i started off with adding a --dir flag to all of the commands to control what directories to track commits for. originally i was going to use git.listFiles or git.walk to figure out the history for an individual file, but then i realized that git.log already had a built-in flag for directories so i decided to add pass that in for now. i might cleanup the internal getRepoLog function to put the repo argument within the object. i said i'd also work on adding an API for 0.2.x so i'll do that next. the next big feature i'll probably implement is code language makeup in LOC over time, should be a fun exercise in data parsing.

also i fixed a typo in one of the CLI arguments.

Update attachment

Ship 1

1 payout of shell 261.0 shells

Austin

over 1 year ago

Austin • Covers 14 devlogs and 15h 28m

2025-07-07 update 2:

whoooops there was a bug i didnt catch... the rendering didnt work if there was no file to overwrite. 0.1.2 now published.

Update attachment

2025-07-07 update 1:

WE'RE LIVE!! run npx git-visualize to try it out!!

since the last devlog i implemented confirmation before overwriting, and grouping duplicate authors.

for confirmation before overwriting, i imported @inquirer/confirm since it seemed fairly minimal and i liked the styling ootb. though with that said i should probably fix the imports to be more minimal.

for grouping duplicate authors, i really liked the solution i came up with. basically, i added _names and _emails properties to the processed objects, and stored them as Set objects. the existing name/email properties are just the first occurrence found (no need to go overboard with counting occurrences). when going through the list of commits, it checks if either the name/email exists within the Set, and if not, adds it. the Set object is nice because it can't store duplicate items and in theory should be faster.

then, i researched how to publish, and got to 0.1.0! before realizing i should probably add more metadata... so that's why it's at 0.1.1. i could probably setup a github actions thing to automatically publish/release/tag but we'll see if i end up doing that. i do intend to setup a separate branch to work on 0.2.x, which should not conflict with gh actions prematurely publishing.

Update attachment

2025-07-06 update 1:

whooops its been a day already...

so fixing the line graph issue turned out to be pretty trivial, it was a sorting issue just like i expected. there's probably a more optimal way of parsing the commit log so i don't have to resort to sorting it at the end, but oh well that's an issue for another day. the next few things to work on are:

  • confirm before overwriting file to disk
  • group authors if existing name/email exists
  • code cleanup/grouping to prepare for...
  • accessible API

i think i'll work on the first two, then figure out how to publish to npm, then do the next two as 0.2.0. i should probably ship soon.

Update attachment

2025-07-05 update 1:

long time no see again!

again, some irl stuff, but i finally got around to implementing author-activity! it was pretty much copy-pasted from the other commands, and copilot helped a lot. i'm surprised how much of the code conventions i had going on it also caught.

i am so so close to feeling confident in shipping 0.1.0, but i really want to fix the weird line issue going on with graph generation, combine duplicate author entries, cleanup code, and add an actual API so it could be used inside of node projects.

there was also a weird issue with puppeteer not launching the browser, but it got fixed for some reason by updating dependencies :|

Update attachment

2025-06-30 update 2:
pnpm update -r

also, i manually updated prettier, and i removed the manual patch i had for isomorphic-git and imported index.js directly. this should be a more maintainable stop gap.

Update attachment

2025-06-30 update 1:
hey long time no see!!!!

i was busy with some irl events (some fun, some more serious) over the past few days, but i got back to work on this tonight! a couple of things:

first, i've decided on a feature scope that's good enough for me to consider as shipped. and once i ship this i'll also publish to npm at version 0.1.0! i just want to implement one more command, author-activity, that tracks the activity of the top N authors over time in a repo. given everything i've scaffolded, this shouldn't be too hard. another requirement was to add an --interval flag to author-activity and commit-activity, which is what i worked on today.

on the days i wasn't coding i researched a bit into commander-js, and unfortunately they don't have an OOTB way of getting strongly typed selective flag options. it's not like it's hard to roll on your own, but i think it would be a nice convenience thing to add to the library. however, a little bit of typescript alchemy makes this possible.

// Handle interval option
// (this type definition is not confusing at all)
type AllowedIntervals = 'day' | 'month' | 'year'
const allowedIntervals: AllowedIntervals[] = ['day', 'month', 'year']
if (!allowedIntervals.includes(interval as AllowedIntervals)) {
    throw new Error(
        `Interval must be one of: ${allowedIntervals.map((f) => `"${f}"`).join(', ')}`
    )
}
const safeAllowed = interval as AllowedIntervals

with fresh eyes at my code i also found some bugs and some places to improve the code readability. for example, i replaced a use of Array.prototype.reduce() with a simpler Array.prototype.join() statement that still worked out.

however, after adding the flag, i noticed the weird rendering issue with the line was still happening (as shown in the picture). it's likely a date ordering issue in array creation (which i could get around by re-sorting) and/or some config option for observable plot, so i'll have to debug that later.

finally, with the flag done, i noticed the title and y-axis label for the graph could be improved, so i added those. i'll have to get to work on author-activity next, but before that there's one last fix i want to implement with auto-combining duplicate author entries.

Update attachment

2025-06-26 update 1:
phew late night again! was busy with some irl stuff today but got a lot of work done!

first i think i decided on a flashier monorepo name: enodo. good rule of thumb for whoever may be looking through this, naming your project a related latin word makes it 10x cooler. trust. no bias. at all. (cough cough ultro robotics)

i finally got commit-activity working!!! headlining work of the day, a lot of reading docs and a little copilot here and there c: though i ran out of autocomplete. it honestly is a breath of fresh air though, since i get to be more intentional with my use of AI and handwrite the things i want to handwrite. and if i want to, i can always let AI code a section quickly, i still look over it, i'm still in the driver's seat at the end of the day.

speaking of AI, regexes! i wrote a quick one for getting a prettified git URL and wired it up to a bunch of test cases to make sure it was reasonably reliable. i'm not sure if there's an off-the-shelf regex but oh well. there goes the niagara river.

export const prettyURL = (url: string) =>
    // You really think I did this by hand?
    url.match(/([^/:\s]+\/[^/\s?]+?)(?:\.git)?(?:\?[^/]*)?\/?\s*$/)?.at(1)

okay but at least we have to agree that regexes are a valid enough task to vibe code. i like being in control of what i write, but for this one very little thing i really don't want to be in control... who wants to write /([^/:\s]+\/[^/\s?]+?)(?:\.git)?(?:\?[^/]*)?\/?\s*$/????

it's not even like regexes are fully standard anyways...

Update attachment

2025-06-25 update 2:
a lot of updates for this update since SoM was down!

first off, i improved the chart styling. i first tried just directly importing the styling from observable framework by building the notebooks package, but that led to some string parsing errors and figured that it was likely not worth the time doing that. however, i asked copilot to make some quick styling and it's an improvement! i ended up making a helper function that wraps the plot outer HTML in its own HTML, which would also help for maintainability if i want to change default styling across all functions later down the line.

the next things are a few small improvements. i first made it so that the title's top {x} label would follow the number of authors actually displayed, which accounts for small repos like octocat/Hello-World. then, i configured plot to not show chart labels for nonintegers, which again, coves the octocat/Hello-World edge case. finally, i added a --max flag that makes the max authors configurable, which is demonstrated in this chart!

there are a few small things i want to work on next, including more styling and flags, but i really want to get to finishing commit-activity and decide on next major features to implement.

on a side note, yesterday i was looking through the isomorphic-git docs more and they don't have a git blame feature... i'll have to research more about git and either implement it upstream or have a naive implementation in my project. one of the features i have planned needs that command.

Update attachment

2025-06-25 update 1 (whoops its tomorrow today):

researching the library more i realized a few things that are kinda dealbreakers without some cursed designs:
- adding headings wraps an svg and header elements inside of a figure element, which means i can't directly write it to an .svg file
- puppeteer can only output elements to a raster image or a pdf
- therefore the only way i could get to vector is to first go through pdf, which means... chart -> DOM element -> HTML -> PDF -> SVG [the pain is awfulll]

a bonus is that the output file is very strongly typed (which is a good thing), so i tried reformatting the string by removing the file extension and adding it back, which could have worked but the syntax didn't end up being correct and i found out you could use as to make things simpler. anyways witness this beautiful typescript code:
ts
// WTF TYPESCRIPT WHY DO I HAVE TO DO THIS
// there's definitely a better way to do this but this was
// the first way i thought of and its so cursed i love it
const coerced: `${string}.${ImageFormat}` | undefined = (() => {
for (const fmt of allowedFormats) {
if (output.endsWith(`.${fmt}`)) {
return `${output.slice(-(`.${fmt}`.length))}.${fmt}`
}
}
return undefined
})()

i do finally have a proof of concept working for the new system which is good enough for me for now... ill sleep on this. dennis ritchie is probably rolling in his grave at the sheer inefficiency of this code.

Update attachment

2025-06-24 update 3:
so.. i finally got to work porting to observable plot and honestly, it's soo much more ergonomic of an api. i found out unfortunately that when adding title and subtitle elements, observable plot renders to a `` element, not an svg, so i think i'll just have to rely on puppeteer for all of the rendering anyways. 300 MB bundle size incoming 👀

just to see what would happen i decided to make a graph of a very... notable... repository and didn't truncate the author list, and got this! :3 i should probably have better example repos, but i'm not on my good computer and my other example repo is react, which takes a while. feel free to suggest medium-size repos i should clone!

Update attachment

2025-06-23 update 2:
not much for this update, but updated a few docs to point to pnpm and have a flashy description:

> git-visualizer — An analysis suite for the Open Source ecosystem

a bit melodramatic, i know :) more flashy names are TODO.

also i figured out how not to import an entire browser by default for the CLI. i'll use jsdom for regular svg output then have puppeteer be an optional dependency that gets dynamically imported with the CLI warning the user if it's not installed. i think i'll start rewriting chart.js code later today. observable plot should make feature work faster, and once i get to the dependency force graph i can fall back to plain d3, which observable-plot depends on anyway.

Update attachment

2025-06-24 update 1:
....idk what to say tests suck to write
a lot of this time was sitting idly

i'm gonna take a lil break then get onto porting to observable plot/puppeteer for graph generation... should also enable windowed graphs which would be really cool, albeit add an entire... browser... as a... dependency... 😭😭surely there has to be a better option?

Update attachment

2025-06-23 update 2:
first i decided to add a simple feature that's needed for the notebook: raw data output. all in all the command was like 20 lines of additional code and plus copilot pretty much autocompleted 60% of it.

after that though i noticed when bundling that there were two warnings: an unnecessary import and circular dependencies. i knew what was causing the circular dependency issue, but the import was new to me, eslint hadn't raised any warnings. i found out it was because i used an import only for a type, and ended up importing the whole function :p

onto the circular dependency issue, i had been meaning to do it but one of the functions, tempClone, was a really thin wrapper around git.clone that was better off being inlined in the one function that consumes it. i inlined the function and.. voila! no more circular dependency issues. i ran the test suite for the outside function and it still passed, so all good there. (that being said, i really should add more tests... i only have five... ill probably work on that next.)

after that, i wandered online and then decided to wire up two plugins to eslint and prettier. one was an import sorting plugin from trivago (!!) and the other reworked confusing conditionals. i'm not sure if this exists but my dream plugin would refactor/flatten nested if-else statements... copilot usually works fine though.

i knew that i wanted node: imports first, then unscoped packages, then scoped, then relative imports. i'd been kinda following that, but very loosely, so the former plugin would make things a lot nicer. unfortunately the plugin is configured with regexes, which suuuuck to do by hand so i used copilot :pp took a few tries but it got there!

another thing that had broke with the monorepo refactor was eslint and prettier ignore cases.. so i cleaned up after those as well. i wrote a recursive .gitignore finder in my eslint config (god what a day to be in javascript land) and added more stuff to the root .gitignore. yknow what life would probably be a lot easier if i just made one gitignore file... but oh well, time wasted is time wasted, we learn from our mistakes.

i don't have the energy left in me to work on other features, since i'll be using observable plot for the notebook, which means i should probably switch over chart creation to that in the CLI... basically a lot of the more important work is boring stuff and not features. might write unit tests to end off the day because even that's less boring to me.

Update attachment

2025-06-23 update 1:
i started this project before i realized hack club made this, so thats a lot of hours not counted but welp :p

so far i just updated the README since i turned this into a monorepo, the original CLI/library I plan on publishing to npm, which i could then use for the data science project in the other package. i do think its pretty tho :3

upstream just asked me to rebase my changes for a PR i sent them, so i'll get onto that next... im not sure if those hours will count though since its a different repo, but whatever

Update attachment