DEV Community

I built a free autonomous coding agent for your terminal - bring your own API key

I got tired of paying $20/month for AI coding tools. So I built my own. Codeably is an autonomous coding agent that runs in your terminal. You bring your own API key - so it costs you $0 to run.

What it does

You describe a task in plain English. It figures out what to do and does it:

codeably "add JWT authentication to the express app"
codeably "write unit tests for every function in src/utils.js"
codeably "find and remove all dead code"
codeably "fix the race condition in payment.js"
codeably clean          # scan + remove dead code automatically
codeably review         # AI code review of your git changes
codeably chat           # open a full terminal chat UI

It runs a loop - Observe โ†’ Think โ†’ Act โ†’ Verify โ†’ Done - until the task is finished.

Try it now (no install needed)

npx codeably "your task here"

Or install globally:

npm install -g codeably

7 providers - most with free tiers

You plug in your own key. Here's what's available:

Provider Model Free tier
Groq Llama 3.3 70B โœ… 14,400 req/day FREE
Gemini Gemini 2.0 Flash โœ… 1,500 req/day FREE
Ollama CodeLlama (local) โœ… unlimited FREE offline
OpenRouter 100+ models โœ… free models available
Anthropic Claude Sonnet 4 $5 credit on signup
Mistral Mistral Large free trial credits
OpenAI GPT-4o pay per use

I personally use Groq for daily work - it's fast, free, and the Llama 3.3 70B model is genuinely good at code.

โšก Type cb instead of codeably

One-command shortcut setup:

macOS / Linux / WSL:

bash install-shortcut.sh
source ~/.zshrc
cb "your task"

Windows PowerShell:

.\install-shortcut.ps1
. $PROFILE
cb "your task"

Terminal chat UI

codeably chat
# or
cb chat

Opens a full chat UI right in your terminal:

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ >/< codeably chat                                          โ”‚
โ”‚ groq ยท llama-3.3-70b-versatile                             โ”‚
โ”‚ type /help for commands                                    โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โฏ explain how async/await works
Async/await is syntactic sugar built on top of Promises...

โฏ /switch   โ† switch provider mid-chat
โฏ /history  โ† see conversation history
โฏ /save     โ† save chat to file
โฏ /clear    โ† start fresh
โฏ _

Supports markdown rendering, conversation history, and live provider switching with /switch.

30 tools

File I/O, shell commands, git operations, code search, dead code detection - 30 tools total. A few highlights:

  • patch_file - safe string replacement (no full rewrites)
  • grep_replace - find and replace across multiple files
  • git_commit - stage all and commit with a message
  • confirm_delete - always asks before deleting anything
  • detect_language - auto-detects your project's stack
  • run_script - write and execute multi-line bash

Safety first

Codeably cannot delete files without your explicit approval. Every deletion goes through confirm_delete:

โš  Deletion confirmation required
Reason: unused file, zero imports detected
Files to delete:
  - src/old-utils.js
  - src/deprecated/auth.js
Delete these 2 file(s)? [y/N]:

How it's built

No frameworks. No LangChain. No magic. ~900 lines of vanilla Node.js. One OpenAI-compatible client that works with all 7 providers. A simple loop. 30 tool definitions.

codeably/
โ”œโ”€โ”€ codeably.js       โ† CLI entry + all commands
โ”œโ”€โ”€ runtime/
โ”‚   โ”œโ”€โ”€ agent.js      โ† Observe-Think-Act loop
โ”‚   โ”œโ”€โ”€ client.js     โ† unified LLM client
โ”‚   โ””โ”€โ”€ context.js    โ† codebase snapshot
โ”œโ”€โ”€ tools/
โ”‚   โ””โ”€โ”€ index.js      โ† all 30 tools
โ””โ”€โ”€ ui/
    โ”œโ”€โ”€ renderer.js   โ† terminal UI
    โ””โ”€โ”€ chat.js       โ† terminal chat UI

Real examples

# Add features
codeably "add rate limiting - 100 req/min per IP"
codeably "add input validation to all API endpoints"
codeably "add TypeScript types to all files in src/"

# Clean up
codeably clean
codeably "remove all console.log from src/"
codeably "migrate from callbacks to async/await in api.js"

# Tests
codeably "write integration tests for the auth routes"
codeably "add error boundary tests to the React components"

# Refactor
codeably "split the 400-line UserController into smaller files"
codeably "extract all hardcoded strings into a constants file"

# Review + docs
codeably review
codeably docs

Why I built this

Every AI coding tool I tried had the same problem - you're paying a subscription for access to a model you could call directly yourself. The tool is just a wrapper. So I wrote the wrapper. It took about a week. Now I use it daily and it costs me nothing because Groq's free tier is more than enough. The goal was always: bring your own key, own your agent.

Would love feedback - what features would make this more useful for your workflow?

Comments

No comments yet. Start the discussion.