HNHacker News
TopNewBestAskShowJobs

hemantv

330 karma · joined August 6, 2012

YC Badge: 0xb8470cdb57bd27ead0f09a63cfc7b1434e7e8af4
submissionscomments
hemantv··on Show BF: Codeblocks A flexible, privacy-first AI chat client for your desktop
I built Codeblocks for myself because I wanted something more flexible—a chat client where I could control every aspect of how conversations work with AI.

The goal was to experiment with local LLMs and find novel ways they could help with my work. Along the way, it turned into a full desktop app with features I actually wanted: total privacy (everything on my machine), the ability to connect to any provider, smart context management that doesn't break long conversations, and deep customization.

While it's designed with local LLMs in mind, that's not a limitation—you can use any provider you like or mix and match as needed.

---

## Key Features

### Connect to Any LLM Provider

Use whatever works for you:

- OpenAI (GPT-4, GPT-4o, etc.) - Anthropic (Claude 3.5 Sonnet, Opus, Haiku) - Google Gemini - xAI (Grok) - OpenRouter (access to 100+ models) - Local models: Ollama, LM Studio - Any OpenAI-compatible API

Switch between providers whenever you want. Use different models for different tasks—GPT-4 for code, Claude for writing, local models when you want everything offline. Compare responses. No lock-in, just flexibility.

---

### Smart Context Management

Long conversations work the way they should—without falling apart or losing important details.

*How it works:*

- Recent messages stay fully intact - Older content gets summarized automatically (you can use a cheaper model for this if you want) - Images, code blocks, and attachments are handled intelligently - Real-time visual indicator shows your token usage

*You get to choose the strategy:*

- Keep everything until you hit the limit - Keep only recent messages - Auto-summarize older messages - Reference content without including the full text

The goal was to make it so you can chat through 100+ messages without thinking about token limits. The app figures out what to keep detailed, what to compress, and what to just reference.

---

### Conversation Workflows

*Forking:* See a message where you want to try a different direction? Just click it to branch off a new conversation from that point. The original stays intact, and you can explore freely.

*Regeneration:* Not happy with a response? Regenerate it—with the same model or switch to a different one. All versions stick around, so you can flip between them and see what works best.

*Multiple chats:* Keep several conversations going at once. Quick navigation through the sidebar makes it easy to jump between them.

*Model Control:* Configure which model to use per chat, set custom system prompts, and adjust temperature settings. Each conversation can have its own unique setup.

---

### Rich Text Editor

Powered by Lexical (Facebook's text editor):

- Full markdown support with live preview - Syntax highlighting for code - Drag-and-drop for images

Code blocks get syntax highlighting and one-click copying. Works great in both light and dark themes.

---

### Search & Organization

*Search:* Find anything instantly—across all your conversations, message versions, tags, everything. Results show up as you type.

*Tags:* Create custom tags with colors, throw multiple tags on each chat, filter by whatever you need. You can see which tags you're using most too.

*Filters:* Mix search with tags to zero in on exactly what you're looking for.

---

### Keyboard Shortcuts

Stay productive with hotkeys:

| Shortcut | Action | | -------- | ---------------- | | `⌘N` | New chat | | `⌘/` | Focus chat input | | `⌘⇧S` | Toggle sidebar | | `⌘T` | Tag manager | | `⌘F` | Search | | `⌘↵` | Send message | | `Esc` | Stop generation | | `⌘,` | Settings | | `?` | Show help |

---

### Privacy & Local Storage

Everything lives in `~/.codeblocks/` as JSON files on your computer. That's it. No cloud sync.

Your API keys? On your machine. Your conversations? On your machine. Want to go completely offline? Works perfectly with local models.

Backing up is as simple as copying the folder somewhere safe. The file format is readable JSON, so you're never locked in.

---

### Vision Support

Works with vision-enabled models (GPT-4o, Claude 3.5 Sonnet, Gemini):

- Attach images to messages - Smart context management for images - Configurable image inclusion strategies

---

### Customization

- Light/dark/auto themes - Custom colors and styling - Per-model temperature and context settings - Custom system prompts per chat - Configurable logging levels

---

## Tech Stack

Built with:

- *Electron 30* for desktop integration - *React 18 + TypeScript* for the UI - *Vite 5* for fast builds - *Lexical* for the rich text editor - *Vercel AI SDK* for unified LLM access - *Tailwind CSS 4* for styling - *Ant Design* components

Architecture: Local JSON storage, type-safe with Zod schemas, real-time streaming support, clean IPC separation.

---

## Current Limitations

It's an alpha, so there are definitely rough edges:

- Mostly tested on macOS, so Windows/Linux might be quirky - Schema changes might require manually migrating your data - Error handling could be better in some spots - No export/import UI yet (just copy the files manually for now) - Everything's in English only

Basically, it works well for me, but your mileage may vary. Feel free to report issues as you find them.

---

## What's Next

Planning to add:

- *Custom tools from UI* - Define your own tools that LLMs can call, directly from the interface - *Integrations from UI* - Connect to external services and APIs through a simple UI (no code required) - *Custom tools (programmatic)* - Write your own tools with full control for advanced use cases - *Chat folders* - Hierarchical organization with drag-and-drop - *Export/import* - Markdown export, backup automation - *Analytics* - Token tracking, cost estimates, usage stats

The idea is to make customization accessible—whether you want to click through a UI or write code, both options will be there.

---

## Feedback Welcome

This is an early alpha—still figuring things out. If you try it and have thoughts on what works, what doesn't, or what you'd like to see, please let me know!

Your input helps shape where this goes next.

---

## Who This Is For

Honestly? I built this for myself to experiment with local LLMs and try out ideas for how AI could help with my work. But it might be useful if you're:

- Someone who wants *full control* over how your AI conversations work - *Experimenting with local models* and want a solid interface for them - Looking to *switch between providers* or compare different models - Into *privacy* and want everything on your machine - The kind of person who likes to *customize things* and tweak settings

The flexibility is the whole point—use it however makes sense for you.

---

## Core Ideas

What I was going for:

1. *Your data stays yours* - Everything on your machine, under your control 2. *No lock-in* - Use any provider, switch whenever 3. *Context that works* - Smart management so long conversations don't break 4. *Flexibility* - Fork conversations, compare models, customize everything 5. *Built for local LLMs* - But works with anything

The whole project is about having options and being able to experiment freely.

hemantv··on I'm betting against AI agents, despite building them
Llm are great reflections. Issues I have come across too large of context confuse the llm.

Second since llm are non deterministic in nature how do you know if the quality went from 90% to 30% there is no test you can write. What if model provider degrades quality you have no test for it

hemantv··on Zed AI
Biggest thing missing is templates that are available in vscode.
hemantv··on Every company should be owned by its employees
Individuals have visions not committee. We build monuments for individuals not for committee.

Having said that no man is island of itself. Current incentive structure works great to motivate individuals to start companies

hemantv··on Just Enough Software Architecture (2010)
Game Programming Patterns was one which had a big impact on me.

Other was Effective Engineer

hemantv··on Ask HN: How to navigate co-founder model with ambiguous roles?
You are trying to focus too much on money and control. Instead focus on experience, are you learning new things, are you somewhat enjoying the process.

There are ways to communicate your objections without triggering other person defensive response.

hemantv··on Ask HN: Have you coded any productivity software just for yourself?
This is super cool. I don't know if motivation to build custom widget but very nice architecture.
hemantv··on Ask HN: What took you from being a good programmer to a great one?
Effective Engineer by Edmond Lau and Game Programming Patterns by Robert were great reads
hemantv··on Looking to sell my ramen profitble SaaS side business
How much do you pay for data?
hemantv··on Roger Penrose claims our Universe has been through multiple Big Bangs
https://youtube.com/shorts/x-ZomoV6xhs?feature=share
hemantv··on Roger Penrose claims our Universe has been through multiple Big Bangs
Very similar to Hinduism. Hinduism also describe multi verse, number of species on planet.

A lot of theory in science is around advance Civilization that existed before modern day human (they are usually referred to as Giants). Hinduism talk about how earlier human were larger in height and have been reducing since the beginning.

hemantv··on How do so many talentless people end up getting funded and running startups?
It has very little to do with talent. You need a basic level of intelligence.

After that it's mostly about risk taking, luck, perseverance and temperament.

hemantv··on Kite is saying farewell and open-sourcing its code
I know good developers pay for tools. Maybe the lesson for someone who wants to be best at what they do is do things 90% of people they are competing with wouldn't do.
hemantv··on Show HN: I built my own PM tool after trying Trello, Asana, ClickUp, etc.
Have you looked at Sunsama?

I have few ideas on how you can improve this with lots of integrations. I can be reached at fameoflight@gmail.com if you want to chat.

hemantv··on Show HN: Contact Form Delivery
I love this. Simple and to the point.

You can have free tier of 100 submissions a month which will let people have a taste of service before they are ready to buy. Suggestions about soft limit can applied here to drive more people to convert to paid plan.

Also can add a premium plan which remove the backlink.

hemantv··on Ask HN: Who Is an iPad Pro For?
Because writing notes is about clarity of mind not always about referencing them later.

I want ability to refer back to notes but 99% of case I never refer to them

hemantv··on DaVinci Resolve for iPad
Hate capitalism as much as you want. But it's the only system that consistently uplift people and improve standard of living over time.

It's the best system among all the bad systems out there.

hemantv··on Execution Is Exponential
I think it matters where your skills are. I am currently building Picasso, engineering execution is not a problem but GTM execution is different problem altogether.
hemantv··on Welcome Home, Garry Tan
I have been blocked in your Twitter. We just had differences of opinion on certain things. I guess you might have under lot of stress at that time so I understand.
hemantv··on Teams is killing my Mac every day
This is called distribution. Microsoft moat is average products with above average distribution. I e sales and marketing.
hemantv··on Ask HN: How to have GraphQL in an offline only React Native application
Can't you mock the network layer? That should do the trick.

What's front-end library you are using to query graphql

hemantv··on Lexical – a web text editor framework that powers Facebook
Awesome work. I have been early user of Lexical building getstable.co.

Thanks for great framework and design ;)

hemantv··on Lexical – a web text editor framework that powers Facebook
Seriously wtf
hemantv··on Apple M2 Die Shot and Architecture Analysis – Big Cost Increase and A15 Based IP
Apple generally pay very poorly for quality of talent.

I would love to live in world where 10x engineers are rewarded 10x. Right now it's 25% better pay than median.

hemantv··on Tell HN: I probably spend more on piracy than if I just paid for content
All of this usually stem from lack of passion or goal in other areas of life.

Once you find right goal you won't have time for all this.

Speaking from personal experience

hemantv··on Stripe Crypto
Who is on the hook if credit card fraud happens? If i just want to accept crypto payment what's my incentive?
hemantv··on Stripe Crypto
It's high spread market. Any financial firms are salivating at how to take advantage and profit from it.

Coinbase whole business is spreads.

hemantv··on Copilot Is Shutting Down
I am curious as well.
hemantv··on Americans Stampede into Inflation-Linked Bonds, Smashing Records
The numbers are 2.78 billion. This is big joke
hemantv··on Chatbots: Still dumb after all these years
How much reality (problem space) you can compress in vector or matrix that's the key question.
Page 1 of 8Next →