JSPM

zypecode

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

    ZypeCode — A terminal-native coding assistant powered by free AI APIs

    Package Exports

    • zypecode
    • zypecode/dist/cli.js

    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 (zypecode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    ZypeCode

    ZypeCode is a powerful, open-source AI-powered coding CLI (Command Line Interface) assistant that runs entirely on free AI API keys. It functions as a terminal-native coding agent, allowing you to converse, read/write codebase files, and execute shell commands inside a premium Terminal User Interface (TUI).


    Features

    • đŸ’ģ Terminal-Native TUI: An interactive workspace interface with syntax-highlighted messages and real-time streaming built with React and ink.
    • 🔑 100% Free AI APIs: Full integration with free tiers of Google Gemini, Groq, Mistral, Cohere, Together AI, OpenRouter, and Cerebras.
    • 🔄 Auto-Fallback & Multi-Model Switching: If a provider fails (e.g. rate limit reached), ZypeCode automatically transitions to the next available configured provider mid-session.
    • 🛠 Actionable Tools: Core agent tools for reading, writing, search grep-ing, and executing shell commands (requires approval).
    • â†Šī¸ FS Undo Stack: Instantly revert any file edits or new creations made during a session using the /undo TUI command.

    How It Works (Agent Loop)

            User Input (Terminal)
                      │
                      â–ŧ
       Build Dynamic Codebase Context
     (Scans workspace, ranks files, loads notes)
                      │
                      â–ŧ
           Invoke AI Model Stream
                      │
                      â–ŧ
            Parse Response Delta
            ╱                  ╲
    Tool Calls Detected?      Final Output?
          ╱                      ╲
        YES                       NO
        ╱                          ╲
    Show tool details               Render response
    Verify safety (approve?)         Wait for next input
    Execute & feed output
        ▲
        └───────── Cycle ────────────┘

    Quick Install

    To install ZypeCode globally on your system, clone the repository and install it using npm:

    # Clone the repository
    git clone https://github.com/Antigravity/zypecode.git
    cd zypecode
    
    # Install dependencies and build
    npm install
    npm run build
    
    # Link binary globally
    npm link

    Once linked, you can invoke the CLI from any folder using:

    zype
    # or
    zypecode

    Getting Free API Keys

    ZypeCode is designed to run completely free. Sign up for API keys here:


    CLI Usage Reference

    # Start interactive TUI session in current directory
    zype
    
    # Run a one-shot instruction and exit
    zype "add error handling to src/cli.ts"
    
    # Force start with a specific provider/model
    zype --provider groq --model llama-3.3-70b-versatile
    
    # Add API Keys directly via CLI
    zype config set GEMINI_API_KEY=your_key_here
    zype config set GROQ_API_KEY=your_key_here
    
    # List all supported providers and their configuration status
    zype providers

    TUI Commands Reference

    Inside the interactive chat interface, the following slash commands are available:

    Command Action
    /help Display list of all available commands and summaries
    /model <provider>/<model> Switch provider and model (e.g. /model groq/mixtral-8x7b-32768)
    /provider <name> Switch provider and use its default model (e.g. /provider mistral)
    /clear Clear conversation history
    /context Display list of scanned project files and token counts
    /approve Toggle auto-approve mode for code edits and commands
    /cost Display session token usage
    /theme <name> Switch color theme (dark | light | minimal)
    /undo Revert the last file change or deletion

    Configuration File (~/.zype/config.toml)

    ZypeCode stores configurations inside your user directory. You can edit the TOML file directly to adjust global defaults:

    [default]
    provider = "gemini"          # Default provider
    model = "gemini-2.0-flash"   # Default model
    auto_approve = false         # Auto-approve file writes and commands
    max_tokens = 8192            # Context window token budget
    theme = "dark"               # Color theme: dark | light | minimal
    
    [providers.gemini]
    api_key = "AIza..."
    model = "gemini-2.0-flash"
    
    [context]
    max_file_size_kb = 100       # Skip files larger than 100KB
    ignore_patterns = ["node_modules", ".git", "dist", "*.lock"]
    auto_index = true

    Contributing

    We welcome contributions! Please open issues or submit PRs to help improve ZypeCode.

    License

    This project is licensed under the MIT License.