Skip to main content

AI coding assistant TUI — multi-provider, session-aware

Project description

flexcoder

AI coding assistant TUI — alternative to opencode / claude code / codex.

Install

pip install flexcoder

File structure

flexcoder/
├── pyproject.toml
├── config.toml.default          template for ~/.flexcoder/config.toml
└── flexcoder/
    ├── main.py                  CLI entry point  (print("initialisation...") line 1)
    ├── config.py                TOML config loader/saver
    ├── providers.py             provider registry + verified fetch endpoints
    ├── sessions.py              session persistence → ~/.flexcoder/sessions/
    ├── ai.py                    AI backends (all 6 providers)
    ├── tools.py                 tool execution (create_file, shell, etc.)
    ├── system_prompt.py         dynamic system prompt (OS, shell, tree, tools)
    ├── art.py                   ASCII art
    ├── flexcoder.tcss           TUI stylesheet
    └── screens/
        ├── chat.py              main chat TUI
        ├── help.py              Ctrl+H help overlay
        ├── selector.py          Ctrl+P provider/model picker
        ├── provider_settings.py Ctrl+E API keys + Fetch Models
        ├── ai_settings.py       Ctrl+T temperature / max tokens / …
        └── session_browser.py   Ctrl+S session browser

Usage

flexcoder                           # start with saved config
flexcoder ollama gemma3:3b          # start with Ollama gemma3:3b
flexcoder continue                  # resume most recent session
flexcoder continue <session-id>     # resume specific session
flexcoder providers                 # provider settings TUI (standalone)
flexcoder settings                  # AI settings TUI (standalone)
flexcoder sessions                  # session browser TUI (standalone)

First-time setup

  1. flexcoder → press Ctrl+E
  2. Select provider, paste API key, click Save Key
  3. Click Fetch Models (queries the provider's live API)
  4. Click Done
  5. Press Ctrl+P → select model → Confirm
  6. Start chatting

Keyboard shortcuts

Key Action
Ctrl+A Toggle auto-approve (AUTO/MANUAL)
Ctrl+O Toggle output (OUT/QUIET)
Ctrl+H Help
Ctrl+N New session
Ctrl+S Session browser
Ctrl+P Provider / model selector
Ctrl+E Provider settings (API keys)
Ctrl+T AI generation settings
Ctrl+L Clear chat
Esc Interrupt / cancel
Ctrl+C Quit

Model fetch endpoints (verified March 2026)

Provider Endpoint
Ollama GET http://localhost:11434/api/tags
Claude GET https://api.anthropic.com/v1/models (x-api-key header)
ChatGPT GET https://api.openai.com/v1/models (Bearer token)
Gemini GET https://generativelanguage.googleapis.com/v1beta/models?key=…
Mistral GET https://api.mistral.ai/v1/models (Bearer token)
OpenRouter GET https://openrouter.ai/api/v1/models (Bearer token)

AI tools available to the model

Tool Syntax
Create file <create_file=[path]>content</create_file>
Move file <move_file source=[old] destination=[new] />
Read file <read_file=[path] />
Create directory <create_directory=[path] />
Search & replace <search_replace=[file]><search>…</search><replace>…</replace></search_replace>
Shell command <shell>command</shell>
Insert text <insert=[file]><for>…</for><after>…</after><text>…</text></insert>

Session storage

Sessions live in ~/.flexcoder/sessions/<session-id>.json.
Resume any session: flexcoder continue 20250306-143022-a1b2c3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flexcoder-1.0.4.tar.gz (26.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flexcoder-1.0.4-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

Details for the file flexcoder-1.0.4.tar.gz.

File metadata

  • Download URL: flexcoder-1.0.4.tar.gz
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for flexcoder-1.0.4.tar.gz
Algorithm Hash digest
SHA256 bc4ea26c2c5c7611aabf0841465f08366a31a012e15bfd5648e18c3b5fc1757c
MD5 e0bad1cef5d56dce034c839b718e34f2
BLAKE2b-256 874518b5eae6f007218697aed7c04ee3d06dd151ea9f80f35d4e4911a55f90ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for flexcoder-1.0.4.tar.gz:

Publisher: pypi-publish.yml on bren-uijl/flexcoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flexcoder-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: flexcoder-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 31.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for flexcoder-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 efdf05e55e45c2f32a285f2064ab52aea2b40a8345f8a2498f8fe655c6ceb3c1
MD5 250b7060c7909a1343e7e93af7400221
BLAKE2b-256 03821d0e3055fc2d0f2d8a1dda8c782278cb8712517ce23c81cd17c1f85f84c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for flexcoder-1.0.4-py3-none-any.whl:

Publisher: pypi-publish.yml on bren-uijl/flexcoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page