Skip to main content

doit-fm

A background AI agent that lets you control your computer via Telegram.

How it works

Telegram message → long-polling → AI model → structured JSON → OS tool → result → Telegram reply

You send a natural language message. The AI maps it to a tool + args. The tool runs as a real OS action. The result comes back to you in Telegram. In 2–5 seconds.

Install

pip install doit-fm

Or from source:

git clone <repo>
cd doit-fm
pip install -e .

Setup

doitfm init

The wizard walks you through:

  1. Checking dependencies
  2. Choosing AI provider + model (free options: Groq, OpenRouter, Ollama)
  3. Connecting your Telegram bot
  4. Sending a test message

Run

doitfm run

Background:

nohup doitfm run &

Commands

doitfm init     — Setup wizard
doitfm run      — Start the agent
doitfm stop     — Stop the agent
doitfm status   — Check if running
doitfm doctor   — Diagnostics

Telegram commands

/health         — CPU, RAM, disk, battery
/ps             — Running processes
/disk           — Disk partitions
/ip             — Public IP
/time           — Date and time
/weather <city> — Weather
/volume [0-100] — Get/set volume
/ls [path]      — List directory
/run <cmd>      — Shell command (with confirmation)
/notes          — List notes
/note <text>    — Save note
/clear          — Clear AI conversation memory
/status         — Agent status
/help           — Help

Or just talk naturally:

  • "how's my system?"
  • "what's the weather in Tokyo?"
  • "remind me to call John in 30 minutes"
  • "what's using all my CPU?"
  • "take a screenshot"
  • "what's my public IP?"
  • "calculate 847 * 23"

AI Providers

Provider Free tier Notes
Groq ✅ Yes Fast, free Llama/Mixtral
OpenRouter ✅ Yes Gemma 3, Llama 3.3 free
Ollama ✅ Local Fully offline
OpenAI ❌ Paid GPT-4o
Anthropic ❌ Paid Claude
Together AI ❌ Paid Various models

Tools

Tool Description Dangerous
system_health CPU, RAM, disk, battery No
list_processes Top processes by CPU No
kill_process Kill process by PID Yes
run_shell Execute shell command Yes
list_directory List files No
read_file Read text file No
write_file Write to file Yes
delete_file Delete file/dir Yes
move_file Move/rename Yes
copy_file Copy No
find_files Search by pattern No
ping Ping host No
get_public_ip Public IP No
dns_lookup DNS resolve No
http_get HTTP GET No
speedtest Speed test No
weather Weather by city No
get_volume Get volume No
set_volume Set volume No
screenshot Take screenshot No
get_clipboard Clipboard read No
set_clipboard Clipboard write No
set_reminder Set reminder No
get_datetime Date/time No
calculate Math expression No
add_note Save note No
list_notes Read notes No
open_app Launch app No
disk_usage Partition usage No
network_interfaces Network info No
shutdown Shutdown PC Yes
reboot Reboot PC Yes
sleep Suspend No
list_pip_packages pip list No

Security

  • Only your Telegram user ID can control the agent
  • All other messages are silently rejected
  • Dangerous tools require explicit tap-to-confirm via inline buttons
  • API key is encrypted at rest (Fernet symmetric encryption)
  • Encryption key stored at ~/.local/share/doit-fm/data/.enc_key (chmod 600)

Architecture

src/doitfm/
├── __init__.py   — package metadata
├── config.py     — constants, paths, provider registry
├── store.py      — encrypted config file (singleton)
├── tools.py      — 35 tool implementations + registry + dispatcher
├── ai.py         — AIEngine + ConversationMemory
├── bot.py        — TelegramAPI + TelegramBot
└── cli.py        — Click CLI

Adding a new tool

  1. Write an async function in tools.py — takes **kwargs, returns dict, never raises
  2. Add one entry to TOOLS dict
  3. Add one intent rule to the system prompt in ai.py
  4. Optionally add a slash command in bot.py

Adding a new AI provider

  1. Add entry to AI_PROVIDERS in config.py
  2. If not OpenAI-compatible, add a branch in AIEngine in ai.py

License

MIT

Metadata

Release files for doit-fm 3.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for doit-fm 3.0.6
File Size Uploaded
doit_fm-3.0.6.tar.gz 37.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for doit-fm 3.0.6
File Interpreter ABI Platform
doit_fm-3.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 75.2 kB

Release files / doit_fm-3.0.6.tar.gz

Download URL doit_fm-3.0.6.tar.gz
Size 37.0 kB
Tags Source
SHA-256 checksum
How to use checksums
130cd0b3d9102e007f07708c1d2d70006e43857a9219c9d4304c1d86a6146238
BLAKE2b-256 checksum
How to use checksums
b06fb44a3c8d26c01713aa71e562d8345d4127b1121c5e443df64644995d0431
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0rc1

Release files / doit_fm-3.0.6-py3-none-any.whl

Download URL doit_fm-3.0.6-py3-none-any.whl
Size 38.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2aad6f9922bae97b64210230519d88abd208936cddf3c96cd5b2bc00c25ba7a5
BLAKE2b-256 checksum
How to use checksums
72840886c623a25b985f08d01f1c7d90f9b27d71b62bcc6483d3c93e76aea84a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0rc1

Release history Release notifications | RSS feed

This release

3.0.6 This release

2 release files

3.0.5

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page