Skip to content

floating-astronaut/manus-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

manus-api

npm-less License: MIT Zero deps

A tiny, dependency-light Node.js client for the Manus API v2 — tasks, projects, files, and webhooks behind one thin RPC-style wrapper. No SDK bloat, no build step; one fetch-based module you can read end to end.

Maintained by Nuraveda Lab. MIT licensed.

Install

git clone https://github.com/floating-astronaut/manus-api.git
cd manus-api
npm install                 # only dependency: dotenv
cp .env.example .env        # add your MANUS_API_KEY

Quick start

# create a task from the CLI
npm run task:create -- "Summarize today's AI news"

# fetch a task by id
npm run task:get -- <task_id>

Or import the client:

import { tasks } from './src/client.js';

const t = await tasks.create({ message: { content: 'Summarize today\'s AI news' } });
console.log(t);

const detail = await tasks.detail(t.task_id);

Environment

MANUS_API_KEY=sk-...                  # required
MANUS_BASE_URL=https://api.manus.ai   # optional; defaults to this

.env is gitignored — never commit your key.

API surface

All methods return the parsed JSON response and throw on a non-2xx / { ok: false } body (the thrown error carries .status and .body).

Group Methods
tasks create(params) · detail(id) · list(params?) · listMessages(id, params?) · sendMessage(params) · stop(id) · delete(id)
projects create(params) · list(params?)
files upload(params) · detail(id)
webhooks create(params) · list() · delete(id)

Need an endpoint that isn't wrapped yet? Call the low-level helper directly:

import { manus } from './src/client.js';
await manus('task.list', { limit: 20 }, { http: 'GET' });

How it works

src/client.js is ~50 lines: it maps a method name (task.create) to POST/GET ${BASE_URL}/v2/<method>, attaches the x-manus-api-key header, encodes GET params as a query string and POST params as JSON, and normalizes errors. That's the whole thing — fork it and add methods as you need them.

License

MIT — use it, fork it, ship it.


Manus is a trademark of its respective owner; this is an unofficial client. Built by Nuraveda Lab.

About

Tiny dependency-light Node.js client for the Manus API v2 — tasks, projects, files, webhooks. MIT.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors