Cloudflare-first agentic coding CLI untuk developer Indonesia dan global
Project description
autokeren
Cloudflare-first agentic coding CLI untuk developer Indonesia dan global.
autokeren adalah CLI agentic coding yang dirancang khusus untuk stack Cloudflare-first. Dibangun dengan Python, mendukung multi-model fallback otomatis antara Kimi K2.7-Code dan GLM 5.2, dilengkapi tools bawaan untuk file, shell, git, browser automation (Camofox), serta deploy Cloudflare Pages/Workers, KV, dan D1.
Fitur Utama
- Multi-model fallback otomatis — Kimi K2.7-Code sebagai primary, GLM 5.2 sebagai secondary, dengan retry exponential backoff dan circuit breaker.
- Streaming output — respons token-by-token langsung di terminal via HTTP/2 streaming.
- Permission system — konfirmasi sebelum menjalankan command berbahaya atau menulis file, dengan allowlist shell.
- Cross-session memory — ingatan per-project tersimpan di
~/.config/autokeren/projects/<slug>/memory.md, dimuat otomatis tiap startup. - Session save/resume — simpan state percakapan, lanjutkan kapan saja dengan
/savedan/resume. - Context tracking + /compact — pantang pemakaian context window; ringkas otomatis atau manual dengan
/compact. - AGENTS.md support — instruksi per-project untuk AI agent dimuat otomatis ke system prompt.
- Indonesian localization — UI teks dalam Bahasa Indonesia, dirancang untuk developer Indonesia.
- KV/D1 tools — baca/tulis Cloudflare KV dan jalankan query D1 langsung dari agent.
- Camofox e2e — browser automation end-to-end berbasis profile, tanpa setup tambahan.
- Tmux supervisor — spawn dan monitor long-running agent yang survive terminal close.
- CF Pages/Workers deploy — helper deploy + build (
next-on-pages) terintegrasi.
Perbandingan
| Fitur | autokeren | opencode | Claude Code | AGY |
|---|---|---|---|---|
| Open source | Ya (MIT) | Ya | Tidak | Ya |
| Multi-model fallback otomatis | Ya | Manual | Tidak | Tidak |
| Cloudflare Workers AI native | Ya | Tidak | Tidak | Tidak |
| KV / D1 tools | Ya | Tidak | Tidak | Tidak |
| Camofox e2e built-in | Ya | Tidak | Tidak | Tidak |
| Tmux supervisor | Ya | Tidak | Tidak | Tidak |
| Cross-session memory | Ya | Ya | Ya | Tidak |
| Session save/resume | Ya | Ya | Ya | Tidak |
| Context /compact | Ya | Ya | Ya | Tidak |
| Indonesian localization | Ya | Tidak | Tidak | Tidak |
| Bahasa | Python | Go/TS | TS | Python |
Instalasi
Via pipx (recommended)
pipx adalah cara standar install CLI tools Python — isolated environment, auto PATH, no conflict sama system packages.
# Install pipx dulu kalau belum ada (Debian/Ubuntu)
sudo apt install pipx
pipx ensurepath
# Install autokeren
pipx install autokeren
Via pip
pip install --user autokeren
Note: Pada sistem Linux modern (PEP 668),
pip installbiasa akan ditolak. Gunakanpipx(recommended) ataupip install --user.
Update
pipx upgrade autokeren # kalau pakai pipx
pip install --user -U autokeren # kalau pakai pip
Dari source (untuk development)
git clone https://github.com/autokeren/autokeren.git
cd autokeren
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
Quick Start
Inisialisasi konfigurasi pertama kali:
autokeren --init
Ini membuat ~/.config/autokeren/config.yaml (atau copy dari config.example.yaml dan isi account_id serta api_token Cloudflare Workers AI).
Interactive chat
autokeren
Single prompt
autokeren "buat file hello.py yang cetak hello world"
Plan mode
autokeren --plan
Pilih model
autokeren -m glm "refactor fungsi ini"
autokeren -m kimi "tulis unit test untuk modul tools"
Contoh percakapan
> baca pyproject.toml dan tambahkan field authors
> deploy project ini ke Cloudflare Pages
> jalankan pytest dan perbaiki test yang gagal
> simpan preferensi build ini ke memory
Konfigurasi
Konfigurasi disimpan sebagai YAML transparan di ~/.config/autokeren/config.yaml.
cloudflare:
account_id: "" # atau set CLOUDFLARE_ACCOUNT_ID
api_token: "" # atau set CLOUDFLARE_API_TOKEN
primary_model: "@cf/moonshotai/kimi-k2.7-code"
secondary_model: "@cf/zai-org/glm-5.2"
max_tokens: 4096
temperature: 0.3
timeout: 120.0
retry:
max_retries: 5
base_delay: 1.0
max_delay: 60.0
exponential_base: 2.0
jitter: true
circuit_failure_threshold: 5
circuit_open_seconds: 30
autokeren:
plan_mode: false
max_iterations: 25
shell_timeout: 180
shell_allowlist: ["node", "npm", "pnpm", "npx", "git", "wrangler", "python3", "pytest"]
project_root: "."
context_window: 262144
compact_tail_turns: 6
auto_compact: false
auto_compact_threshold: 0.8
camofox:
url: "http://localhost:9377"
default_profile: "pulsa"
user_id: "ajat"
Environment variables
| Variable | Deskripsi |
|---|---|
CLOUDFLARE_ACCOUNT_ID |
Cloudflare account ID (override config) |
CLOUDFLARE_API_TOKEN |
Cloudflare Workers AI API token (override config) |
AUTOKEREN_CONFIG_DIR |
Direktori konfigurasi custom (default ~/.config/autokeren) |
Commands
Perintah slash di interactive mode:
| Perintah | Deskripsi |
|---|---|
/help |
Tampilkan bantuan dan daftar perintah |
/q atau /quit |
Keluar dari sesi |
/status |
Tampilkan status context window, model aktif, dan info sesi |
/compact |
Ringkas history percakapan, pertahankan N turn terakhir |
/reset |
Reset sesi percakapan saat ini |
/memory |
Tampilkan lokasi dan isi memory per-project |
/save [nama] |
Simpan sesi saat ini |
/resume <nama|id> |
Lanjutkan sesi tersimpan |
/sessions |
Daftar semua sesi tersimpan |
Commands Reference
| Command | Deskripsi |
|---|---|
/help |
Tampilkan daftar perintah yang tersedia |
/q atau /quit |
Keluar dari sesi |
/status |
Tampilkan status: model aktif, pemakaian context, jumlah tool |
/compact |
Ringkas history percakapan untuk hemat context window |
/reset |
Bersihkan percakapan, mulai dari awal |
/memory |
Lihat lokasi file memory dan isinya |
/save [nama] |
Simpan sesi saat ini untuk dilanjutkan nanti |
/resume <nama|id> |
Resume sesi yang tersimpan |
/sessions |
Daftar semua sesi tersimpan |
Tools
autokeren membawa tools bawaan berikut. Setiap tool memiliki permission check dan schema function-calling.
| Tool | Deskripsi |
|---|---|
read_file |
Baca isi file |
write_file |
Tulis file baru atau overwrite |
patch_file |
Patch file dengan search-and-replace |
list_files |
List file dalam direktori (glob pattern) |
run_shell |
Jalankan shell command dengan allowlist + blocklist |
search_code |
Cari konten file dengan regex |
fetch_url |
Ambil konten URL |
git_status |
Status working tree git |
git_diff |
Diff git (staged/unstaged) |
git_commit |
Commit perubahan |
camofox |
Browser automation end-to-end via Camofox |
cf_deploy |
Deploy ke Cloudflare Pages/Workers via wrangler |
cf_build_next |
Build Next.js dengan next-on-pages |
cf_kv |
Baca/tulis Cloudflare KV namespace |
cf_d1 |
Jalankan query Cloudflare D1 |
tmux |
Supervisor long-running task via tmux |
todo |
Kelola todo list multi-step |
remember |
Simpan info ke cross-session memory |
Arsitektur
autokeren mengikuti pola agentic loop sederhana: agent membaca input, memanggil model, mengeksekusi tool calls, dan mengembalikan hasil ke model sampai selesai.
cli.py ──> agent.py (core loop) ──> models/ (Cloudflare client + router + retry)
tools/ (Tool base + registry + 18 tools)
context.py (session memory + token tracking)
memory.py (cross-session memory)
session.py (save/resume)
ui.py (rich terminal UI)
Detail lengkap ada di docs/ARCHITECTURE.md.
Contributing
Kontribusi sangat diterima. Lihat CONTRIBUTING.md untuk panduan setup dev environment, code style, dan proses pull request.
License
MIT — lihat LICENSE.
Disclaimer
autokeren adalah proyek independen dan tidak berafiliasi dengan, diendorsing oleh, atau sponsori oleh Cloudflare, Inc. "Cloudflare" serta produk terkait adalah merek dagang Cloudflare, Inc. autokeren menggunakan infrastruktur dan API publik Cloudflare (Workers AI, D1, R2, KV, Pages) sebagai layanan pihak ketiga.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autokeren-0.2.1.tar.gz.
File metadata
- Download URL: autokeren-0.2.1.tar.gz
- Upload date:
- Size: 66.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6c4f697fc07dbdf6c2a22be7193ff36477863733ffe79c030e5709a81cd4e05
|
|
| MD5 |
0c81f0bf9162f0e2f6a33518361bd45e
|
|
| BLAKE2b-256 |
c7286896e363421cb6f97f68d5be5a5027b76b4b7936e0bb364c44fd9083399f
|
File details
Details for the file autokeren-0.2.1-py3-none-any.whl.
File metadata
- Download URL: autokeren-0.2.1-py3-none-any.whl
- Upload date:
- Size: 62.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ef1a25cab0f848cb918147626090f0649db3c8ca00b07194d9c03281ac2b0af
|
|
| MD5 |
2765783bf0a83ee9d09a8cf61a5e4d8e
|
|
| BLAKE2b-256 |
b2563b2e276340cd33c828f4049ebc18fccad528d8b92d6a036a33e8d360f89c
|