India's open-source AI coding agent

Build with AI. Keep India in control

I'm building BharatCode as a sovereign alternative to Cursor, Claude Code, and Copilot — built for Indian developers, students, freshers, enterprises, and institutions using open-source and Indian AI models.

$brew install arbazkhan971/tap/bharatcode

also:npm i -g bharatcode-clicurl -fsSL …/install.sh | sh

14K+
YouTube developer community
2 years
free-student compute mission
Opt-in
privacy-preserving data flywheel
bharatcode — ~/rust-api · offline
$ bharatcode --offline
🔒 offline mode — code will not leave this machine
◆ model qwen2.5-coder:32b · provider ollama (local)
› add idempotency keys to the checkout handler
⊙ navigate references CheckoutService — 4 call sites
⊙ edit crates/payments/src/checkout.rs +24 −3
⊙ bash cargo test -p payments
✓ tests green · checkout handler now idempotent
audit ✎ 6 events recorded · bharatcode audit export

Local-first, Rust-powered, open-source, and model-flexible — built to help India own the AI coding workflow layer while keeping private code private by default.

Why this matters

AI coding workflow is becoming foreign-controlled infrastructure.

India should not only consume AI coding tools from the U.S. and China. India should build its own AI developer infrastructure — from compute and models to the coding agents developers use every day.

01

The workflow layer is strategic

AI coding agents are becoming the daily interface through which developers write software, choose models, route code, and learn engineering habits.

02

India must own its layer

The U.S. already dominates tools like Cursor, Claude Code, and Copilot while China is building its own AI model and developer ecosystem. India needs its own open developer infrastructure.

03

Students and freshers are the wedge

Millions of Indian learners should get access to AI coding workflows without being priced out or locked entirely into foreign platforms.

Product + compute mission

Help keep AI coding free for Indian students.

I'm looking for compute partners to help keep BharatCode free for Indian students and freshers for two years. Sponsored compute can turn BharatCode into a national AI coding adoption layer and help India build the data flywheel needed for stronger coding models.

A local-first, open-source coding agent

  • Local-first Rust terminal agent that can run on-device and work with open-source models.
  • Model-flexible architecture for Indian providers, open-weight models, private deployments, and enterprise workflows.
  • Trust primitives for institutions: offline operation, auditability, data control, and predictable rupee-aware costs.

Compute → adoption → models

01Compute
02Free BharatCode access
03Student + fresher adoption
04Opt-in learning data
05Post-training open-source models
06Stronger India-first coding models

The goal is a stronger Indian AI ecosystem powered by sponsored compute, mass adoption, and privacy-preserving consent.

Data and trust

Private code stays private by default.

BharatCode will not train on private user code by default. Any training data contribution will be opt-in, consent-based, and privacy-preserving, with clear controls for users, colleges, and organizations.

Opt-in learning signals may include

Prompt-to-code edit trajectories
Bug diagnosis and patch workflows
Compiler error explanations and fixes
Test failure debugging paths
Student learning and problem-solving workflows
Hinglish and Indian English developer queries
Agent tool-use traces
Code review and documentation workflows
Community and partners

Built with India's developer community, not behind it.

BharatCode already has a 14K+ YouTube developer community that can help educate, onboard, and mobilize Indian developers around sovereign AI coding workflows.

GPU creditsCloud creditsHosted inference capacityModel-serving infrastructureOpen-source model supportUniversity and fresher adoption programsEnterprise and public-sector pilots
Why BharatCode

Built on three non-negotiables

A terminal coding agent designed for India — sovereign by default, open-weight by choice, and shipped as a native Rust agent.

  1. Sovereign by default

    Offline + audited

    Your source never has to leave the machine. An --offline mode rejects every non-localhost provider and disables web tools, while an append-only, tamper-evident audit log records each action — exportable proof for banks, enterprises, and DPDP-regulated teams.

  2. Open-weight first

    Your model, your choice

    Open weights are first-class, not an afterthought — Kimi K2, DeepSeek V3 / R1, and Qwen Coder run locally or on Indian and Asian inference, at a fraction of frontier cost. Around 24 providers are wired in; closed models stay optional, never required.

  3. Rust-native, single binary

    Open source

    A Rust-powered terminal coding agent built for predictable local workflows, open-source extensibility, and a rupee-aware cost ledger that keeps spend legible from the first run.

Capabilities

More than an agent — a sovereign toolkit

LSP-backed code intelligence and a 22-tool agent loop, wrapped in the offline mode and audit trail that keep your source where it belongs.

  • LSP-backed code intelligence

    navigate · symbols · rename

    Real Language Server power, not guesswork: go-to-definition, references, and declarations via navigate, plus symbols, rename, code actions, hover, format, and live diagnostics across your project.

  • Agent loop, 22 tools

    bash · edit · patch · grep

    An autonomous loop wired to a full toolset — read/write/edit/multiedit, multi-file patch, glob/grep/ls, bash, web fetch/search, todo, and background jobs — so it can drive a repo end to end.

  • Offline, air-gapped mode

    --offline

    Run with --offline and BharatCode rejects every non-localhost provider and disables web tools — a hard guarantee that your code will not leave this machine.

  • Tamper-evident audit log

    bharatcode audit export

    Every action is recorded to an append-only, tamper-evident audit log. Export the full trail with bharatcode audit export — compliance-grade proof of exactly what the agent did.

  • ~24 model providers

    sarvam · krutrim · ollama …

    Indian-first by design: Sarvam and Krutrim sit beside Anthropic, OpenAI, Gemini (native), OpenRouter, DeepSeek, Kimi, Mistral, Groq, Cerebras, Together, Ollama, and LM Studio — around 24 in all. Bring your own, no lock-in.

  • Verified self-update

    bharatcode update --apply

    bharatcode update checks for releases; --apply downloads, verifies the checksum, and swaps the binary in place. Set auto_update: true to stay current automatically.

  • Benchmark eval harness

    bharatcode eval

    A built-in task suite measures real task success, steps-to-done, and recovery — so quality is something you can measure across every change, not just claim.

  • Shareable recipes

    bharatcode recipes

    Capture parameterized, repeatable workflows as recipes so your whole team runs the same tasks the same way every time — version-controlled alongside the repo.

Bring your own models

Your models. Your machine. Your country.

One agent speaks to 23 providers. Start fully local, pin to India-built models like Sarvam and Krutrim, and your source code never has to leave the country — or reach for open-weight gateways and frontier closed models when you choose to. Your data, your call.

  • LocalRuns fully on your machine — source code never leaves the device.
  • India / AsiaRegion-pinnable inference so data can stay in the country.
  • Open-weightOpen model families — often 10–20× cheaper than frontier closed models.
01

On your machine

Inference runs on the device. Source code never leaves the box — air-gap friendly by default.

  • Ollama

    Local

    Run open models fully on your own machine. Nothing leaves the box.

    Open-weightdata stays on device
  • LM Studio

    Local

    Local model server with a friendly UI. Air-gap friendly.

    Open-weightdata stays on device
02

Made in India

Sovereign, India-built inference on Indian infrastructure — keep traffic in-country.

  • Sarvam

    India-built sarvam-m. Sovereign, made-in-India inference.

    Open-weightIndia / Asia
  • Krutrim

    Ola Krutrim — India-hosted models on Indian infrastructure.

    Open-weightIndia / Asia
03

Open-weight gateways

Frontier-class open models — Kimi K2, DeepSeek, Qwen, GLM — often 10–20× cheaper than closed.

  • OpenRouter

    One key, many models — route to open weights or in-region hosts.

    Open-weightIndia / Asia
  • DeepSeek

    DeepSeek V3 / R1 — strong open-weight coding & reasoning.

    Open-weight
  • Moonshot / Kimi

    Kimi K2 open weights — long-context agentic coding.

    Open-weight
  • z.ai / GLM

    GLM-4.6 open weights — capable, low-cost agentic coding.

    Open-weight
  • Mistral

    Mistral Large and Codestral — open-weight European models.

    Open-weight
  • Groq

    Open-weight models served at very high token throughput.

    Open-weight
  • Cerebras

    Wafer-scale inference for open weights at extreme speed.

    Open-weight
  • Together

    Hosted open weights — Qwen Coder, Llama, DeepSeek and more.

    Open-weight
  • Fireworks

    Fast inference for open-weight coding models.

    Open-weight
  • DeepInfra

    Low-cost hosted open weights — Qwen Coder and friends.

    Open-weight
  • Nebius

    Hosted open-weight Llama and Qwen at scale.

    Open-weight
  • Novita

    Open-weight Qwen and Llama through one hosted gateway.

    Open-weight
04

Frontier, by choice

Closed frontier models for when you opt in — the same agent, your decision to make.

  • xAI / Grok

    Grok models over an OpenAI-compatible endpoint.

    Closed
  • Cohere

    Command models via Cohere’s compatibility API.

    Closed
  • Perplexity

    Sonar models for web-grounded answers.

    Closed
  • Google Gemini

    Native Gemini 2.5 Pro / Flash, plus an OpenAI-compatible shim.

    Closed
  • OpenAI

    GPT and o-series frontier models via the native API.

    Closed
  • Codex (ChatGPT)

    Use your ChatGPT subscription via Codex OAuth — no API key.

    Closed
  • Anthropic

    Claude frontier models via the native Messages API.

    Closed

Data stays in India. Local runtimes keep code on the device; region-pinned inference keeps it in-country. Built for banks, enterprises, and DPDP-regulated teams that can't ship source to a foreign cloud.

How it compares

An honest look at the landscape

Every tool here is good at something. BharatCode is the one built to prove sovereignty — an enforced offline mode and a tamper-evident audit log, on top of being open-weight-first and cost-aware in rupees.

BharatCodeOpen source
This is us
Offline / air-gapped mode
Yes--offline
Tamper-evident audit log
Yesaudit export
Data residency
YesLocal-first
Open-weight-first
YesBy design
Multi-provider
Yes~24 providers
Cost-aware (INR)
YesINR ledger
Language
Rust
License
Apache-2.0
OpenCodeOpen source
Offline / air-gapped mode
No
Tamper-evident audit log
No
Data residency
PartialProvider-dependent
Open-weight-first
PartialSupported, not default
Multi-provider
YesMulti-provider
Cost-aware (INR)
No
Language
TypeScript
License
MIT
gooseBlock · OSS
Offline / air-gapped mode
No
Tamper-evident audit log
No
Data residency
PartialLocal supported
Open-weight-first
PartialSupported, not default
Multi-provider
YesMulti-provider
Cost-aware (INR)
No
Language
Rust
License
Apache-2.0
Claude CodeAnthropic
Offline / air-gapped mode
No
Tamper-evident audit log
No
Data residency
NoCloud (US)
Open-weight-first
NoClaude only
Multi-provider
NoAnthropic only
Cost-aware (INR)
No
Language
TypeScript / Node
License
Proprietary

Comparison reflects each project’s typical configuration and public licensing. Capabilities of fast-moving tools change — verify against upstream docs before standardising.

Get started

Up and running in one command

Install the binary, then point it at a hosted open-weight provider or a fully local model. Same agent either way — your data stays in India.

  1. Step 01: Install the binary

    A single static binary — no daemon, no telemetry, no Rust toolchain required. Pick whichever fits your machine.

    homebrew
    brew install arbazkhan971/tap/bharatcode
    npm
    npm install -g bharatcode-cli
    curl · macOS / linux
    curl -fsSL https://raw.githubusercontent.com/arbazkhan971/bharatcode-cli/main/install.sh | sh
    windows · powershell
    irm https://raw.githubusercontent.com/arbazkhan971/bharatcode-cli/main/install.ps1 | iex
  2. Step 02: Run with a hosted open-weight provider

    Export one key and go. Open-weight models like DeepSeek V3/R1 run 10–20× cheaper than frontier closed models.

    hosted provider
    export DEEPSEEK_API_KEY=...        # or MOONSHOT_API_KEY, GROQ_API_KEY, etc.bharatcode
  3. Step 03: Run fully local

    No API key, no network round-trip — your source code never leaves your machine. Point at a local Ollama or LM Studio model.

    ollama
    bharatcode --provider ollama --model qwen2.5-coder:32b
    lm studio
    bharatcode --provider lmstudio --model qwen2.5-coder-32b-instruct

A few real flags

  • bharatcode --continueresume your most recent session.
  • bharatcode run --jsonheadless NDJSON event stream for CI and automation.
  • /goalkick off bounded autonomous work from inside the TUI.