Show HN: Open-source CLI coding framework using Claude

84 points by vysakh0 11 months ago | 21 comments
  • vysakh0 11 months ago
    For the last two weeks I have been using Claude extensively for my coding experiments.

    Made this CLI tool to automate it. And to fix errors by sending it back to the claude api. Also included the vision API to build based on images.

    I built this using this tool itself partly.

    Probably OpenDevin, Agents is the future, maybe even Cursor like autocomplete, for now I find this approach useful.

    Added some examples in the README. Would love some feedback, this is my first python library that I published.

    • toomuchtodo 11 months ago
      Thank you for building and releasing this, very helpful.
      • reallymental 11 months ago
        Not a review of your product, but I have to say that I love the name. Told me you love old school cricket, without mentioning it.
        • vysakh0 11 months ago
          @reallymental heheh, maybe I thought I need a realiable AI coding assistant like Rahul Dravid :) And I can say I'm so far relying it suited to my workflow.
      • CGamesPlay 11 months ago
        How's it work? From briefly glancing through, looks like the first step ("metadata") is to upload all of the code to Claude on a per-file basis and ask it to summarize the "contents or purpose". Is there some automatic selection of metadata, or does it only pull in metadata that the user specifically requests?

        The "dev server monitor" appears to be the killer feature in your project. So it runs a command, monitors the logs for errors, and attempts to fix them automatically. That's fun! How effective is it? Do you have any way to advise the agent while it's working? Example: it detects an error and starts working and I write a message to it "this happened when I uploaded an image on a brand new user account", which it then uses to inform its plan?

        More off topic, I love the prevalence of this kind of project. It only takes a week or two to build yourself a coding assistant for personal use tying into these LLMs, and the results can be quite impressive. It all feels very cyberpunk to me.

        • vysakh0 11 months ago
          @CGamesPlay

          Metadata: For a fresh project that is initiated by this tool, it creates a base metadata file (drd.json in this case) and updates as and when there is new changes. For a new project, you can run a command `drd --i` which would initialise a metadata based on recursively checking each file content (multiple LLM calls).

          Once the metadata file is created, for the subsequent questions it referes metdadata file for the releveant files and loads those file's content into context. For eg, i ask "can you refactor query's main", it would look for "src/query/main.py" and load the content into the context and then respond.

          "dev server monitor": I have tried with scenarios when the module doesn't exists, and it installs and rewrites the modules, type error it fixes. It does all the fix each time and does the restart. I may be biased, it seems to work most of the times I tried. Even during the time if its fix is not correct, it gets it in the next attempt. Need to test in more scenarios.

          Actually the main command if you try "drd 'create a sample elixir proj'" it will run into error coz elixir doesn't exist and it will try to install and recursively heal until it figures out similar to restart. I thought this is a great usecase, and I have been using this to create some other python projects. Thanks for pointing out "dev server monitor" could be a killer feature!!

          Btw, this is tweet thread with videos attached for each example https://x.com/vysakh0/status/1811790449016779261

        • mlamina 11 months ago
          Looks cool! I've been building something similar, based on OpenAI models: https://github.com/PR-Pilot-AI/pr-pilot-cli
          • qrian 11 months ago
            I am an idiot for running this in an unsandbox environment as it decided to rm -rf all files to restart from error, deleting a whole lot of important files.
            • minig33 11 months ago
              Dude we’ve all make a rm -rf fuckup before…
            • sigoden 11 months ago
              A similar coding assistant in less than 100 lines of code.

              https://github.com/sigoden/llm-functions/tree/main/agents/co...

              • vysakh0 11 months ago
                @sigoden this is pretty neat!
              • rpm33 11 months ago
                This is awesome, i just tried it myself for a simple form builder that I needed to send out a survey.

                I will play around more, at first glance, it might be useful for learning new frameworks/langages that require installation of external dependencies.

                what do you wish to do with further?

                • vysakh0 11 months ago
                  Thank you! I have a section for contribution, I want to add more examples on how one can contribute using the tool, they don’t need to do much. They can have an idea or suggestion and the tool can do the work for them. I want more people to contribute to make it better user experience and solved problem.
                • kosolam 11 months ago
                  How is this compares to aider?
                  • vysakh0 11 months ago
                    @kosolam I haven't extensively used aider.chat to compare. One option that exists in Dravid would be "dev server monitor" part, which listens to the errors as the dev server is starting and then autofixing it. But aider.chat is definitely feature rich with docker, playwright and several things. This (Dravid) tool is a minimal terminal specific coding framework.
                    • vysakh0 11 months ago
                      Just realised there is a key difference based on another comment. Adding the same again here.

                      I think it is the approach — especially on error where it fixes on its own. In Dravid for eg if you say “create elixir project” if elixir is not installed, it will try to install on its own and if there is architecture like for eg M1 related it will fix those errors and finally creating the elixir project. There is no hand holding required.

                      • kosolam 11 months ago
                        Ok cool. Good luck. Its very interesting and exciting space.
                  • Vaslo 11 months ago
                    What kind of hardware do you need for this?
                    • lgas 11 months ago
                      It's using the Claude API for inference, which is the only heavy part, so it should run on pretty much anything.
                    • wanderingmind 11 months ago
                      Looks good, but any specific reason to build this instead of using more mature tools like aider?
                      • vysakh0 11 months ago
                        I think it is the approach — especially on error where it fixes on its own. In Dravid for eg if you say “create elixir project” if elixir is not installed, it will try to install on its own and if there is architecture like for eg M1 related it will fix those errors and finally creating the elixir project. There is no hand holding required. That’s the main difference