Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hey everyone!

I just wanted to share something cool I've been working on - an Autonomous CLI Agent using Ollama! This thing is basically an autonomous agent that does CLI commands. That way it can perform multitude of tasks.

Here's what it does:

1) You give it a query or task you want to accomplish

2) It breaks it down into a clear goal.

3) Then it creates a step-by-step plan to get there.

4) Finally, it executes those steps one by one by only using CLI commands, showing you exactly what it's doing.

I added hardcoded list of CLI commands that are dangerous, so it should not destroy your machine :) I also added a boolean condition in command exectuion, so that in case you want to simulate CLI you can set it to Simulate=True and coomand exectution will be simulated via LLM.

I already tested it like this: I created a python file that intentionally had mistakes (it counted from 1 to 6), and then used this prompt:

``` python3 cli_agent.py "codey.py doesn't work, it should count from 1 to 10. fix the file." ```

After few steps the agent solved the problem, fixed the file and saved it.

Here is the repo: https://github.com/LexiestLeszek/Autonomous-CLI-Agent

Hope to hear your feedback!



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: