JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 16
  • Score
    100M100P100Q63384F
  • License MIT

CoreCode — Advanced multi-model AI coding agent CLI. Run OpenAI, Groq, Gemini, Anthropic, Ollama and any OpenAI-compatible API from your terminal.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@estevamsl/corecode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    CoreCode

    ADVANCED MULTI-MODEL AI CODING AGENT CLI

    npm version npm downloads Node License Providers

    + Any model. Every tool. Zero limits. +


    What is CoreCode?

    CoreCode is a multi-model, multi-provider AI coding agent that runs entirely in your terminal. Switch between OpenAI, Groq (free), Gemini, Anthropic, Ollama and any OpenAI-compatible API — all with simple slash commands, no GUI required.

    Built by Estevam Souza as a fast, extensible, and open alternative to cloud-locked AI tools.

    Key features

    • 7 providers out of the box — Groq, OpenAI, Gemini, Anthropic, Ollama, OpenAI-compatible, Mock
    • Live provider/model switching/provider groq then /model llama-3.3-70b-versatile
    • File agent — mention any file in your message or use @path/to/file
    • Bash tool — run shell commands with !<command> and inject output into context
    • Web search/search <query> via DuckDuckGo, no API key needed
    • Diff tool — AI-generated patches applied automatically via // FILE: markers
    • Syntax highlighting — VS Code Dark+ palette for 8 languages
    • Animated spinner — "Wibbling… Wrangling… Thinking…" while waiting
    • Session management/save, /export, /compact, /retry, /copy
    • Runtime API keys/key groq sk-... without touching .env

    Install

    npm install -g @estevamsl/corecode

    That's it. Then run:

    corecode

    Requires Node.js ≥ 20. No other global dependencies.


    Quick start

    Groq is 100% free, no credit card required. Get your key at console.groq.com.

    2. Set your key

    Option A — environment variable (recommended)

    export GROQ_API_KEY=gsk_your_key_here
    corecode

    Option B — .env file (create in your working directory)

    echo "GROQ_API_KEY=gsk_your_key_here" > ~/.corecode.env

    Option C — set at runtime (no file needed)

    corecode
    # then inside the CLI:
    /key groq gsk_your_key_here
    /provider groq

    3. Start coding

    corecode
    
      ████████╗
      ██╔═══██╗  CoreCode v0.1.7
      ████████╔╝  groq / llama-3.3-70b-versatile
      ╚══════╝
    
    ● cloud   Ready — type /help to begin
    
    > explain this function @src/auth/middleware.ts

    Commands reference

    Session

    Command Description
    /help Show all commands
    /status Provider, model, history count, system prompt
    /version Show CoreCode version
    /env Show API key status for all providers
    /exit / /quit Exit CoreCode

    Model & Provider

    Command Description
    /model Show active model
    /model <name> Switch model
    /model list List builtin models for current provider
    /model list --all Fetch all models via API
    /provider Show active provider
    /provider <name> Switch provider
    /provider list List all providers with FREE / LOCAL / PAID tags
    /add <provider> <model> Register a custom model
    /key <provider> <api-key> Set an API key at runtime (no .env needed)

    Conversation

    Command Description
    /history Show conversation history (truncated)
    /history full Show full message contents
    /clear Clear conversation history
    /reset Clear history + restore default system prompt
    /compact Compress history into a single summary message
    /retry Resend your last message
    /copy Copy last AI response to clipboard

    System Prompt

    Command Description
    /system <prompt> Set custom system prompt
    /system show Show current system prompt
    /system reset Restore default system prompt

    Tools

    Command Description
    /search <query> Search the web via DuckDuckGo
    /tools List available tools and status
    !<command> Execute a shell command, inject output into context
    @<file> Read a file into the conversation context
    @<glob> Read multiple files (e.g. @src/**/*.ts)

    Export

    Command Description
    /save [file] Save conversation as Markdown
    /export [file] Alias for /save

    Providers

    Provider Free Local Models
    Groq ✅ Free ☁️ Cloud llama-3.3-70b, mixtral-8x7b, gemma2-9b, deepseek-r1
    Ollama ✅ Free 🏠 Local qwen2.5-coder, llama3.2, mistral, deepseek-coder
    Mock ✅ Free 🏠 Local mock-demo (no key needed)
    Gemini Tier ☁️ Cloud gemini-2.0-flash, gemini-1.5-pro
    OpenAI 💳 Paid ☁️ Cloud gpt-4o, gpt-4o-mini, o3-mini
    Anthropic 💳 Paid ☁️ Cloud claude-sonnet-4-6, claude-opus-4-6
    OpenAI-compat Varies Both LM Studio, vLLM, Jan, LocalAI, ...

    Groq — free, ultra-fast

    /provider groq
    /model llama-3.3-70b-versatile     # recommended — best quality
    /model llama-3.1-8b-instant        # fastest
    /model deepseek-r1-distill-llama-70b

    Get your free key at console.groq.com — no credit card.

    Ollama — 100% local, offline

    # Install Ollama first: https://ollama.ai
    ollama pull qwen2.5-coder:7b
    
    /provider ollama
    /model qwen2.5-coder:7b

    OpenAI-compatible (LM Studio, vLLM, Jan)

    export OPENAI_BASE_URL=http://localhost:1234/v1
    export CORECODE_DEFAULT_PROVIDER=openai-compatible
    corecode

    Environment variables

    Variable Description
    GROQ_API_KEY Groq API key
    OPENAI_API_KEY OpenAI API key
    GEMINI_API_KEY Google Gemini API key
    ANTHROPIC_API_KEY Anthropic API key
    CORECODE_DEFAULT_PROVIDER Default provider on startup
    CORECODE_DEFAULT_MODEL Default model on startup
    OPENAI_BASE_URL Custom base URL for OpenAI-compatible
    OLLAMA_BASE_URL Ollama URL (default: http://localhost:11434)

    You can also place these in a .env file in your working directory.


    Advanced usage

    Switch provider mid-conversation

    > /provider anthropic
    ● anthropic · claude-sonnet-4-6
    
    > explain async/await in depth
    ● …
    
    > /provider groq
    ● groq · llama-3.3-70b-versatile

    Load all TypeScript files from a project

    > @src/**/*.ts review the authentication flow

    Run a shell command and ask about the output

    > !git log --oneline -20
    > what changed in the last 5 commits?

    Save a conversation to Markdown

    > /save session-2025-01-15.md
    ● saved → /Users/you/session-2025-01-15.md

    Compact a long conversation

    > /compact
    ● 38 messages compacted into summary

    Project structure

    CoreCode/
    ├── src/corecode/
    │   ├── main.ts              # entrypoint
    │   ├── repl.ts              # REPL loop + tool orchestration
    │   ├── commands.ts          # all slash commands
    │   ├── router.ts            # provider routing
    │   ├── state.ts             # session state
    │   ├── banner.ts            # ASCII logo
    │   ├── welcome.ts           # startup info box
    │   ├── highlighter.ts       # syntax highlighting renderer
    │   ├── spinner.ts           # animated loading indicator
    │   ├── setup-wizard.ts      # first-run API key wizard
    │   └── providers/
    │       ├── openai.ts        # OpenAI + OpenAI-compatible
    │       ├── groq.ts          # Groq (OpenAI-compat)
    │       ├── gemini.ts        # Google Gemini
    │       ├── anthropic.ts     # Anthropic Claude
    │       ├── ollama.ts        # Ollama local
    │       └── mock.ts          # Demo mode (no key)
    │   └── tools/
    │       ├── fileTool.ts      # file reading agent
    │       ├── bashTool.ts      # shell command runner
    │       ├── webSearch.ts     # DuckDuckGo search
    │       └── diffTool.ts      # code patch applier
    ├── scripts/
    │   └── build-corecode.ts    # dedicated build script
    ├── dist/cli.mjs             # compiled binary (self-contained)
    ├── bin/corecode             # npm bin wrapper
    └── public/
        └── corecode.png         # logo image

    Build from source

    git clone https://github.com/estevam5s/CoreCode.git
    cd CoreCode
    npm install
    bun run build       # requires Bun ≥ 1.0
    npm link            # register `corecode` globally
    corecode

    Contributing

    Pull requests welcome. See CONTRIBUTING.md for guidelines.


    Author

    Created by Estevam Souza


    License

    MIT © Estevam Souza