<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kaustubh_Negi</title>
    <description>The latest articles on DEV Community by Kaustubh_Negi (@kaustubh_negi).</description>
    <link>https://dev.to/kaustubh_negi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4104570%2Ff94db2d5-ebc6-4590-bf10-dff3a43375a2.jpeg</url>
      <title>DEV Community: Kaustubh_Negi</title>
      <link>https://dev.to/kaustubh_negi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kaustubh_negi"/>
    <language>en</language>
    <item>
      <title>No pip install? No problem. Building RepoXray with Python's Standard Library</title>
      <dc:creator>Kaustubh_Negi</dc:creator>
      <pubDate>Thu, 03 Sep 2026 16:46:34 +0000</pubDate>
      <link>https://dev.to/kaustubh_negi/no-pip-install-no-problem-building-repoxray-with-pythons-standard-library-3omp</link>
      <guid>https://dev.to/kaustubh_negi/no-pip-install-no-problem-building-repoxray-with-pythons-standard-library-3omp</guid>
      <description>&lt;p&gt;What happens when you want to build a codebase analyzer, and your first instinct is to install a library for everything?&lt;/p&gt;

&lt;p&gt;You install a package for CLI handling.&lt;/p&gt;

&lt;p&gt;Another for parsing.&lt;br&gt;
Another for graphs.&lt;br&gt;
Another for searching.&lt;/p&gt;

&lt;p&gt;And suddenly your “zero-dependency” project has... a lot of dependencies. 😭&lt;/p&gt;

&lt;p&gt;For the Zero Dependency Hackathon, our team decided to build RepoXray, a command-line tool for understanding unfamiliar codebases.&lt;/p&gt;

&lt;p&gt;The catch?&lt;/p&gt;

&lt;p&gt;We couldn't use third-party runtime dependencies.&lt;/p&gt;

&lt;p&gt;So instead of asking “Which package should we use?”, we had to start asking:&lt;/p&gt;

&lt;p&gt;“What do we actually need, and can Python's standard library give us enough to build it ourselves?”&lt;/p&gt;

&lt;p&gt;That turned out to be the interesting part.&lt;/p&gt;

&lt;p&gt;What is RepoXray?&lt;/p&gt;

&lt;p&gt;When you open an unfamiliar repository, you usually want answers to a few basic questions:&lt;/p&gt;

&lt;p&gt;What is this project?&lt;br&gt;
Where is the important code?&lt;br&gt;
What depends on what?&lt;br&gt;
Which files use this one?&lt;br&gt;
If I change something here, what might break?&lt;/p&gt;

&lt;p&gt;RepoXray tries to answer those questions from the command line.&lt;/p&gt;

&lt;p&gt;Its workflow is:&lt;/p&gt;

&lt;p&gt;SCAN → INDEX → RESOLVE → ANALYZE → ANSWER&lt;/p&gt;

&lt;p&gt;It scans a repository, builds a local index, searches its contents, inspects files, resolves local relationships, and performs dependency and impact analysis.&lt;/p&gt;

&lt;p&gt;The idea isn't to replace an IDE or a full language server.&lt;/p&gt;

&lt;p&gt;It's to make exploring an unfamiliar codebase faster and more structured.&lt;/p&gt;

&lt;p&gt;Then the package manager disappeared&lt;/p&gt;

&lt;p&gt;This was the part that changed how we approached the project.&lt;/p&gt;

&lt;p&gt;Normally, reaching for an existing library is often the sensible engineering decision.&lt;/p&gt;

&lt;p&gt;Need graph traversal? There are libraries for that.&lt;br&gt;
Need parsing? There are libraries for that too.&lt;/p&gt;

&lt;p&gt;But the hackathon constraint meant we had to build around what Python already provides.&lt;/p&gt;

&lt;p&gt;Some of the pieces we ended up using were:&lt;/p&gt;

&lt;p&gt;argparse      → command-line parsing&lt;br&gt;
pathlib / os  → filesystem operations&lt;br&gt;
ast           → Python analysis&lt;br&gt;
re            → pattern matching&lt;br&gt;
hashlib       → file fingerprints&lt;br&gt;
json          → persistent index data&lt;br&gt;
collections   → graph/data structures&lt;br&gt;
sqlite3       → database inspection&lt;br&gt;
zipfile       → archive inspection&lt;br&gt;
unittest      → testing&lt;/p&gt;

&lt;p&gt;We documented 11 meaningful standard-library substitutions in our STDLIB log.&lt;/p&gt;

&lt;p&gt;But the interesting part wasn't finding a one-to-one replacement for every package.&lt;/p&gt;

&lt;p&gt;It was deciding how much functionality we actually needed.&lt;/p&gt;

&lt;p&gt;The hardest part wasn't scanning files&lt;/p&gt;

&lt;p&gt;Walking through a repository and calculating a SHA-256 hash isn't particularly difficult.&lt;/p&gt;

&lt;p&gt;Building a useful index around that information is.&lt;/p&gt;

&lt;p&gt;We had to handle things like:&lt;/p&gt;

&lt;p&gt;added and deleted files&lt;br&gt;
modified files&lt;br&gt;
renamed files&lt;br&gt;
empty projects&lt;br&gt;
corrupt indexes&lt;br&gt;
unchanged files that should be reused&lt;/p&gt;

&lt;p&gt;That led to incremental indexing, where unchanged information can be reused instead of rebuilding everything from scratch.&lt;/p&gt;

&lt;p&gt;The standard library gave us the building blocks.&lt;br&gt;
The actual behavior was ours to design.&lt;br&gt;
Import resolution: don't turn guesses into facts&lt;br&gt;
Another interesting problem was figuring out which files depend on which.&lt;/p&gt;

&lt;p&gt;For Python and JavaScript/TypeScript projects, imports aren't always straightforward file paths.&lt;/p&gt;

&lt;p&gt;There can be relative imports, different extensions, ambiguous candidates, and imports that aren't repository-local at all.&lt;/p&gt;

&lt;p&gt;So RepoXray doesn't pretend every relationship is certain.&lt;/p&gt;

&lt;p&gt;It distinguishes between:&lt;br&gt;
Resolved&lt;br&gt;
Heuristic&lt;br&gt;
Ambiguous&lt;br&gt;
Unresolved&lt;/p&gt;

&lt;p&gt;That was a deliberate choice.&lt;/p&gt;

&lt;p&gt;A tool that confidently gives you the wrong dependency graph is worse than one that admits when it isn't sure.&lt;/p&gt;

&lt;p&gt;Once those relationships exist, we can ask higher-level questions:&lt;/p&gt;

&lt;p&gt;python3 repoxray.py depends-on repoxray.py .&lt;br&gt;
python3 repoxray.py who-uses repoxray.py .&lt;br&gt;
python3 repoxray.py impact repoxray.py .&lt;/p&gt;

&lt;p&gt;So instead of simply searching for text, RepoXray can reason about repository relationships.&lt;/p&gt;

&lt;p&gt;What would we normally install?&lt;/p&gt;

&lt;p&gt;This is where the “Package Killer” idea becomes interesting, even though RepoXray itself isn't a replacement for one specific package.&lt;/p&gt;

&lt;p&gt;For graph-related functionality, for example, NetworkX would be an obvious library to consider.&lt;/p&gt;

&lt;p&gt;But we didn't recreate NetworkX.&lt;br&gt;
We didn't need all of NetworkX.&lt;/p&gt;

&lt;p&gt;We needed a smaller set of graph operations for our specific problem, so we implemented those ourselves using standard-library data structures and traversal logic.&lt;/p&gt;

&lt;p&gt;The same principle applied throughout the project.&lt;/p&gt;

&lt;p&gt;We weren't trying to rebuild the Python ecosystem.&lt;/p&gt;

&lt;p&gt;We were trying to build the functionality our application actually needed without depending on it.&lt;/p&gt;

&lt;p&gt;Then we tried to break it&lt;/p&gt;

&lt;p&gt;A demo can show that your program works once.&lt;/p&gt;

&lt;p&gt;Tests tell you what happens when someone tries to ruin your day. 😭&lt;/p&gt;

&lt;p&gt;Our test suite covers cases including:&lt;/p&gt;

&lt;p&gt;empty projects&lt;br&gt;
malformed and corrupt indexes&lt;br&gt;
ambiguous imports&lt;br&gt;
relative imports&lt;br&gt;
JavaScript imports&lt;br&gt;
cycles and self-references&lt;br&gt;
deep traversals&lt;br&gt;
incremental changes&lt;br&gt;
large-file searching&lt;br&gt;
Unicode and spaces in paths&lt;/p&gt;

&lt;p&gt;The full suite finished with:&lt;/p&gt;

&lt;p&gt;Ran 21 tests in 5.960s&lt;/p&gt;

&lt;p&gt;OK&lt;/p&gt;

&lt;p&gt;We also checked that RepoXray could import with Python's site-packages disabled:&lt;/p&gt;

&lt;p&gt;python3 -S -c "import repoxray; print('stdlib import check passed')"&lt;/p&gt;

&lt;p&gt;Result:&lt;/p&gt;

&lt;p&gt;stdlib import check passed&lt;/p&gt;

&lt;p&gt;And we packaged the application as a Python zipapp:&lt;/p&gt;

&lt;p&gt;python3 build.py&lt;/p&gt;

&lt;p&gt;producing:&lt;/p&gt;

&lt;p&gt;dist/repoxray.pyz&lt;/p&gt;

&lt;p&gt;The artifact could then be executed directly with:&lt;/p&gt;

&lt;p&gt;python3 dist/repoxray.pyz --help&lt;br&gt;
What I actually learned&lt;/p&gt;

&lt;p&gt;The biggest surprise was that zero-dependency development isn't really about avoiding imports.&lt;/p&gt;

&lt;p&gt;It's about understanding what those imports are buying you.&lt;/p&gt;

&lt;p&gt;The standard library already gives Python a lot:&lt;/p&gt;

&lt;p&gt;filesystems, hashing, parsing, data structures, serialization, databases, archives, testing, and more.&lt;/p&gt;

&lt;p&gt;But none of those things magically becomes a codebase analyzer.&lt;/p&gt;

&lt;p&gt;The engineering happens in the layer where those pieces are combined into something useful.&lt;/p&gt;

&lt;p&gt;That was probably the best part of the constraint.&lt;/p&gt;

&lt;p&gt;It forced us to stop asking:&lt;/p&gt;

&lt;p&gt;“What package does this problem have?”&lt;/p&gt;

&lt;p&gt;and start asking:&lt;/p&gt;

&lt;p&gt;“What is the actual problem we're solving?”&lt;/p&gt;

&lt;p&gt;Sometimes the answer was a few standard-library calls.&lt;/p&gt;

&lt;p&gt;Sometimes it was significantly more code.&lt;/p&gt;

&lt;p&gt;And sometimes the right answer was simply to accept a limitation instead of trying to recreate an entire ecosystem.&lt;/p&gt;

&lt;p&gt;Final thoughts&lt;/p&gt;

&lt;p&gt;RepoXray isn't trying to prove that third-party packages are bad.&lt;/p&gt;

&lt;p&gt;They're not.&lt;/p&gt;

&lt;p&gt;Packages exist for a reason, and rebuilding mature libraries from scratch is usually not a good use of engineering time.&lt;/p&gt;

&lt;p&gt;The interesting thing about this hackathon was being forced to operate without that safety net.&lt;/p&gt;

&lt;p&gt;We ended up building a codebase analyzer with repository scanning, indexing, search, import resolution, dependency relationships, impact analysis, testing, and a runnable zipapp, all while keeping the runtime dependency-free.&lt;/p&gt;

&lt;p&gt;And somewhere along the way, a simple restriction turned into one of the more useful engineering exercises we've done.&lt;/p&gt;

&lt;p&gt;Not:&lt;/p&gt;

&lt;p&gt;“How do we avoid using packages?”&lt;/p&gt;

&lt;p&gt;But:&lt;/p&gt;

&lt;p&gt;“What can we actually build with what we already have?”&lt;/p&gt;

&lt;p&gt;For a first-year student team, that's a question I'm pretty happy we got to explore.&lt;/p&gt;

&lt;p&gt;And yes, I'm still signing up for more hackathons.&lt;/p&gt;

&lt;p&gt;Apparently I learn slowly. 😭&lt;/p&gt;

&lt;p&gt;RepoXray: &lt;a href="https://github.com/saksham-2x7/repoxray" rel="noopener noreferrer"&gt;https://github.com/saksham-2x7/repoxray&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What package would you normally reach for when building something like this? 👀&lt;/p&gt;

</description>
      <category>hackathon</category>
      <category>devtool</category>
      <category>python</category>
      <category>opensource</category>
    </item>
    <item>
      <title>So... what happens when a first-year student decides to take hackathons seriously?</title>
      <dc:creator>Kaustubh_Negi</dc:creator>
      <pubDate>Tue, 01 Sep 2026 15:31:34 +0000</pubDate>
      <link>https://dev.to/kaustubh_negi/so-what-happens-when-a-first-year-student-decides-to-take-hackathons-seriously-3dka</link>
      <guid>https://dev.to/kaustubh_negi/so-what-happens-when-a-first-year-student-decides-to-take-hackathons-seriously-3dka</guid>
      <description>&lt;p&gt;Probably sleep deprivation. Definitely Git commits. And somehow, three projects later, I'm still here. 👀&lt;/p&gt;

&lt;p&gt;I'm a first-year B.Tech CSE (AI-ML) student at Yenepoya School of Engineering &amp;amp; Technology, Bengaluru, and part of the Kalvium program.&lt;/p&gt;

&lt;p&gt;I've been getting increasingly interested in AI/ML, software development, developer tools, and building things that actually do something. And recently, I've found hackathons to be one of the fastest ways to turn "I think I could build this" into "wait... it's actually running." 🚀&lt;/p&gt;

&lt;p&gt;Over the last few months, I've had the chance to work on a few projects:&lt;/p&gt;

&lt;p&gt;🏢 DayFlow&lt;/p&gt;

&lt;p&gt;An HRM system built for the Odoo × NMIT Hackathon, where we explored how an intelligent workforce management system could bring different HR workflows together.&lt;/p&gt;

&lt;p&gt;📱 L.A.S.A.&lt;/p&gt;

&lt;p&gt;A Local AI Smartphone Assistant for the iQOO × ReSkill Hackathon, exploring how AI could become a more natural part of the smartphone experience rather than another app you have to open.&lt;/p&gt;

&lt;p&gt;🔎 RepoXray&lt;/p&gt;

&lt;p&gt;A zero-third-party-runtime-dependency codebase analyzer built for the Zero Dependency Hackathon.&lt;/p&gt;

&lt;p&gt;This one was particularly interesting because we had to build the entire thing using Python's standard library. No installing a convenient package whenever something got annoying. 😭&lt;/p&gt;

&lt;p&gt;And apparently three hackathons weren't enough, because I'm currently taking part in PromptWars and an AI Innovation Hackathon with a six-member team.&lt;/p&gt;

&lt;p&gt;I'm still very much at the beginning of this journey, so I'm not here pretending I have everything figured out.&lt;/p&gt;

&lt;p&gt;I'm here to build, break, learn, document the process, and hopefully make the next project slightly less chaotic than the previous one.&lt;/p&gt;

&lt;p&gt;This is my first post on DEV, so here's to whatever comes next. 🥂&lt;/p&gt;

&lt;p&gt;What was the first project that made you feel like, "Okay, I'm actually building software now"?&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
