mtxt | monitext
, short for Monitor-TXT, is a lightweight, developer-friendly logging utility built for real-time log monitoring.
Its primary mission is to eliminate silent failures in web or backend applications by forwarding your logs to our API, where you can monitor them live.
Note:
Monitor-TXT
is currently in beta.
npm install monitor-txt@beta
After installation, initialize the runtime by running:
monitext
This command generates a file named monitext.runtime.(js|cjs|ts)
at the root of your project. It exports a pre-configured instance of our logging utility (mtxt
, monitext
).
It will also attempt to auto-configure a path alias (#monitext-runtime
) in:
package.json
tsconfig.json
deno.json
Compatible with ESM, CommonJS, and TypeScript.
import { mtxt, monitext } from "#monitext-runtime";
const { mtxt, monitext } = require("#monitext-runtime");
mtxt
is the compact, inline version — ideal for quick calls.
mtxt
.info("Your message here", { yourMetaData: someInfo() }, { silent: false })
.send(); // Sends to the remote API
monitext
is the explicit, verbose version — ideal for clarity and log hygiene.
monitext
.error("First error line", "Another line", "More info if needed")
.withMeta({ yourMetaData })
.config({ silent: true }) // Silences console output
.send();
Once the runtime file is generated, you’ll find:
export const { mtxt, monitext } = defineMonitextRuntime({
project_name: "<YOUR_PROJECT_NAME>",
env: "node", // or "web"
devMode: false,
apiKey: "<YOUR_API_KEY>"
});
🧪 devMode:
true
keeps logs local (for debugging). 🔄 Set tofalse
to start forwarding logs to the Monitor-TXT API.
- All log methods are async. Logs are batched and sent in the background.
- Logs are end-to-end encrypted and sent over HTTPS.
- Running
monitext
sets up a custom runtime file, tailored to your project. - Importing from
#monitext-runtime
gives you a ready-to-use, preconfigured instance.
- Prevent silent failures
- Gain real-time visibility
- Make logs part of your dev workflow, not an afterthought
- Easily toggle between local/dev and production mode
Thanks for checking out Monitor-TXT!
📢 Contribute, raise issues, or follow development at:
👉 https://github.com/MisterChatlinks/monitor-txt
Development happens on the
dev
branch – feel free to open PRs or start discussions.