Flask Code 1.2

Linux Server — First Official Release

Latest Stable Linux Only July 11, 2026
Download
FlaskCode Universal Installer

Automatically installs selected version, edition.

Download .sh
Source Code / TAR.GZ

Full source repository on GitHub

Download TAR.GZ
System Requirements
  • OS: Linux only (shell actions and file paths are Linux-specific)
  • Python: 3.10 or later
  • Dependencies: Flask 3.0+, PyYAML 6.0+
  • Storage: SQLite (auto-created as knowledge.db)
  • API Keys: At least one Gemini, Groq, or OpenRouter key required
Linux only: The server uses Linux shell commands for its shell_actions module. Running on macOS may work partially but is not officially supported.
What's New
Core Features
  • Multi-Provider AI: Supports Gemini, Groq, and OpenRouter with per-user key management
  • REST API: Full HTTP API with JSON in/out for auth, chat, files, knowledge, and settings
  • Admin Console: Interactive terminal admin shell runs alongside the HTTP server in the same process
  • User Accounts: Registration, login, PIN auth, and per-user settings persisted on disk
  • Knowledge Engine: Local Markov-based knowledge base seeded and queryable via /learn
  • Shell Actions: AI can run bash commands on the server (Linux only)
  • File Handler: Read and write files on the server filesystem from connected clients
  • Chat Persistence: Full chat history per user, loadable by PIN, exportable to .txt
Included Modules
  • server.py — entry point, HTTP server + admin console
  • engine.py — local Markov knowledge engine
  • auth.py — user registration and login
  • chat_history.py / chat_loader.py — chat persistence
  • file_handler.py — file read/write (Linux paths)
  • shell_actions.py — bash command runner
  • gemini_client.py, groq_client.py, openrouter_client.py — AI backends
Quick Start
1. Install dependencies
pip install -r requirements.txt
2. Create your .apikeys file
key_1: "AIza..."          # Gemini key
key_2: YOUR_API_KEY_HERE  # unused slot
key_3: YOUR_API_KEY_HERE  # unused slot
3. Start the server
# Localhost only (default, safest)
python server.py

# Custom port
python server.py --port 8080

# All interfaces (LAN/remote clients)
python server.py --public --port 5000

# No admin console (pure daemon mode)
python server.py --no-console
The admin console appears in your terminal after startup. Type help to see available commands.
REST API Reference

All POST bodies are JSON. All responses are JSON with an ok boolean.

Auth
POST /auth/register          { username, password }
POST /auth/login             { username, password }
POST /auth/logout            { username }
POST /auth/change-password   { username, current_password, new_password }
POST /auth/login-pin         { pin }
Chat
POST /chat                   { username, message, model? }
GET  /chat/history?username=<u>
POST /chat/load              { username, pin }
POST /chat/clear             { username }
POST /chat/export            { username }
Files
GET  /files
POST /files/read             { username, filename }
POST /files/read-path        { username, filepath }
POST /files/write            { username, filename, content }
POST /files/save-block       { language, code, filename }
POST /files/clear-outputs    {}
Misc
POST /ping                   { username?, model? }
GET  /health
GET  /models
GET  /clock?username=<u>&model=<m>
Admin Console Commands
CommandWhat it does
statusKnowledge stats + debug mode
debug on/offToggle debug info in API responses
learn <text>Teach the local knowledge engine
resetWipe and reseed knowledge base
usersList registered accounts + PINs
chatsList saved chats
clear-outputsWipe the outputs/ folder
modelsList available AI models
exit / quitStop the server
Available Models
Model NameProvider
3.1-flash-lite defaultGemini
3.1-flashGemini
3.5-flashGemini
llama-3.3-70bGroq
gpt-oss-20bOpenRouter
Release Info
Version

1.2

Edition

Linux Server

Release Date

July 12, 2026

Status

Stable

Platform

Linux Only

License

MIT


File Structure
server.py
engine.py
auth.py
chat_history.py
chat_loader.py
saved_info.py
file_handler.py
shell_actions.py
code_extractor.py
markdown_highlighter.py
apikey_settings.py
gemini_client.py
groq_client.py
openrouter_client.py
requirements.txt
.apikeys
knowledge.db
users.env
users.pins
chats/
outputs/
saved-info/
.flask/user-settings/
.conf/server_config